2008-05-16
操作步骤_步步记录
随手一写,记录过程,达人勿怪 ^_^
AXIS2一步一步
package com.yy.ws;
/**
* @author
* @date May 15, 2008 / 3:37:32 PM
*/
public interface MobileBoss {
public ServerResponse charge(ClientRequest req);
}
E:\tmp_doc\ax>java2wsdl
Using AXIS2_HOME: D:\axis2-1.4
Using JAVA_HOME: D:\works\jdk1.5.0_06
Usage: java2wsdl [options] -cn <fully qualified class name>
where [options] include:
-o <output location> output directory
-of <output file name> output file name for the WSDL
-sn <service name> service name
-l <soap address> address of the port for the WSDL
-cp <class path uri> list of classpath entries - (urls)
-tn <target namespace> target namespace for service
-tp <target namespace prefix> target namespace prefix for service
-stn <schema target namespace> target namespace for schema
-stp <schema target namespace prefix> target namespace prefix for schema
-st <binding style> style for the WSDL
-u <binding use> use for the WSDL
-nsg <class name> fully qualified name of a class that implements NamespaceGenerator
-sg <class name> fully qualified name of a class that implements SchemaGenerator
-p2n [<java package>,<namespace] [<java package>,<namespace]...
java package to namespace mapping for argument and return types
-p2n [all, <namespace>] to assign all types to a single namespace
-efd <qualified/unqualified> setting for elementFormDefault (defaults to qualified)
-afd <qualified/unqualified> setting for attributeFormDefault (defaults to qualified)
-xc class1 -xc class2... extra class(es) for which schematype must be generated.
-wv <1.1/2.0> wsdl version - defaults to 1.1 if not specified
-dlb generate schemas conforming to doc/lit/bare style
E:\tmp_doc\ax>java2wsdl -cp . -cn com.yy.ws.MobileBoss -of MobileBoss.wsdl
Using AXIS2_HOME: D:\axis2-1.4
Using JAVA_HOME: D:\works\jdk1.5.0_06
[WARN] Unable to generate EPR for the transport : http
则生成wsdl文件:
<?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ns="http://ws.yy.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://ws.yy.com"> <wsdl:documentation>mobile</wsdl:documentation> - <wsdl:types> - <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.yy.com"> - <xs:element name="charge"> - <xs:complexType> - <xs:sequence> <xs:element minOccurs="0" name="charge" nillable="true" type="xs:anyType" /> </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="chargeResponse"> - <xs:complexType> - <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:anyType" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> - <wsdl:message name="chargeRequest"> <wsdl:part name="parameters" element="ns:charge" /> </wsdl:message> - <wsdl:message name="chargeResponse"> <wsdl:part name="parameters" element="ns:chargeResponse" /> </wsdl:message> - <wsdl:portType name="mobilePortType"> - <wsdl:operation name="charge"> <wsdl:input message="ns:chargeRequest" wsaw:Action="urn:charge" /> <wsdl:output message="ns:chargeResponse" wsaw:Action="urn:chargeResponse" /> </wsdl:operation> </wsdl:portType> - <wsdl:binding name="mobileSoap11Binding" type="ns:mobilePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> - <wsdl:operation name="charge"> <soap:operation soapAction="urn:charge" style="document" /> - <wsdl:input> <soap:body use="literal" /> </wsdl:input> - <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:binding name="mobileSoap12Binding" type="ns:mobilePortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> - <wsdl:operation name="charge"> <soap12:operation soapAction="urn:charge" style="document" /> - <wsdl:input> <soap12:body use="literal" /> </wsdl:input> - <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:binding name="mobileHttpBinding" type="ns:mobilePortType"> <http:binding verb="POST" /> - <wsdl:operation name="charge"> <http:operation location="mobile/charge" /> - <wsdl:input> <mime:content type="text/xml" part="charge" /> </wsdl:input> - <wsdl:output> <mime:content type="text/xml" part="charge" /> </wsdl:output> </wsdl:operation> </wsdl:binding> - <wsdl:service name="mobile"> - <wsdl:port name="mobileHttpSoap11Endpoint" binding="ns:mobileSoap11Binding"> <soap:address location="http://192.168.2.187:8090/axix/services/mobile.mobileHttpSoap11Endpoint" /> </wsdl:port> - <wsdl:port name="mobileHttpSoap12Endpoint" binding="ns:mobileSoap12Binding"> <soap12:address location="http://192.168.2.187:8090/axix/services/mobile.mobileHttpSoap12Endpoint" /> </wsdl:port> - <wsdl:port name="mobileHttpEndpoint" binding="ns:mobileHttpBinding"> <http:address location="http://192.168.2.187:8090/axix/services/mobile.mobileHttpEndpoint" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
wsdl2java
E:\tmp_doc\ax>wsdl2java -o . -sn MobileBoss com.yy.ws -uri MobileBoss.wsdl Using AXIS2_HOME: D:\axis2-1.4 Using JAVA_HOME: D:\works\jdk1.5.0_06 Retrieving document at 'MobileBoss.wsdl'.
则生成 build.xml及两个java类(目录自动建立):
com.yy.ws. MobileBossStub.java/MobileBossCallbackHandler.java
- 15:51
- 浏览 (158)
- 评论 (0)
- 分类: web service
- 相关推荐
发表评论
- 浏览: 12070 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
我的相册
axis2处理soap消息的架构图
共 3 张
共 3 张
最近加入圈子
链接
最新评论
-
大家帮我分析一下这个分页 ...
JS 就OK。。。建议去BAIDU一下JS分页,有很多漂亮的东西的。
-- by hifun -
java的几种对象(PO,VO,DAO ...
POJO这种东西其实是蛮奇怪的了. 面向对象在这一点上似乎走入了歧途,把一切都搞 ...
-- by liujunsong -
java的几种对象(PO,VO,DAO ...
搞那么复杂做什么 一个pojo 都搞定了岂不是很简单否则要不停的 copyPro ...
-- by jjyy2008 -
同步和异步的区别
答案三很逗,很通俗,很幽默,不过估计看了的人都会有几分理解了吧
-- by andy54321 -
应用系统架构设计
回isky, 本来想收藏的,不过收藏的话管理不太爽感觉, 所以重新作为新文章发布 ...
-- by andy54321






评论排行榜