- 1、本文档共19页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
webservice配置文件及样例(国外英文资料)
webservice配置文件及样例(国外英文资料)
AXIS 5: AXIS advanced applications, passing javabeans between the AXIS services and their secure solution of 2008-07-21 17:41 is the last piece of AXIS learning notes. We discussed the simplest HelloWorld service in the previous section, and the client is not on the server side
Pass the parameter, now lets pass the javabeans. Of course, you can also pass your own defined JAVA class, but you must create it yourself
Specialized XML serializers and deserializers; For javabeans, AXIS provides a ready-made serializer. (some people say: laziness is the greatest virtue of programmers. I love it, so I pass it on to javabeans.)
One, the server side
CLASS CLASS, ordertest.class, is located in % TOMCAT_HOME % \ webapps \ axis \ web-inf \ classes
Both of these classes give the source code directly, no longer explained
The Order. The Java
Public class Order {
Private String id;
Private String name;
Public void setId (String id) {
This. Id = id;
}
Public String getId () {
Return the id;
}
Public void setName (String name) {
This. Name = name;
}
Public String getName () {
Return the name;
}
}
OrderTest. Java
Public class OrderTest {
Public Order returnOrder
Order newOrder = new Order ();
If (order. GetId (). Equals ( 1 ))
Neworder.setname ( annlee );
Else neworder.setname ( leeann );
Return newOrder.
}
}
Modify the server-side configuration file server-config.wsdd
Add the following code to the corresponding location in the server-config.wsdd
service name = Order provider = Java: RPC
parameter name = allowedMethods value = returnOrder /
parameter name = className value = OrderTest /
beanMapping languag-type = Java: Order qname = ns1: Order
XMLNS: ns1 = urn: BeanService /
/ service
You can see just one line of code compared to the previous release service code
beanMapping languag-type = Java: Order qname = ns1: Order
XMLNS: ns1 = urn: BeanService /
The languagspecific fictype attribute specifies the JavaBean class file location, for example:
The
文档评论(0)