写道
1) 生成工具: Myeclipse
2) 准备好WSDL文件
3) 创建dynmic project
4) 在项目创建文件夹wsdl,将wsdl文件放置此处
5) 右击wsdl文件--web services--generate javaben skeleton
6) 配置web service两步即可完成
7) 配置WEB-INF\server-config.wsdd,进行发布,服务发布可参考deploy.wsdd
2) 准备好WSDL文件
3) 创建dynmic project
4) 在项目创建文件夹wsdl,将wsdl文件放置此处
5) 右击wsdl文件--web services--generate javaben skeleton
6) 配置web service两步即可完成
7) 配置WEB-INF\server-config.wsdd,进行发布,服务发布可参考deploy.wsdd
1、创建项目并将wsdl文件导入
2、 生成服务端代码配置
3、生成结果图如下
4、服务发布,若生成代码时未生成server-config.wsdd,则需要手工创建
<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration> <!-- 变量设定 --> <parameter name="sendMultiRefs" value="true" /> <parameter name="disablePrettyXML" value="true" /> <parameter name="adminPassword" value="admin" /> <!--parameter name="attachments.Directory" value="D:\myproject\calileo\xxx\WebContent\WEB-INF\attachments" /--> <parameter name="dotNetSoapEncFix" value="true" /> <parameter name="enableNamespacePrefixOptimization" value="true" /> <parameter name="sendXMLDeclaration" value="true" /> <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl" /> <parameter name="sendXsiTypes" value="true" /> <requestFlow> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="session" /> </handler> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="request" /> <parameter name="extension" value=".jwr" /> </handler> </requestFlow> </globalConfiguration> <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder" /> <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper" /> <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler" /> <!-- 核心重点:服务发布,name:表示发布的service名 --> <service name="Trans" provider="java:RPC" style="wrapped" use="literal"> <parameter name="wsdlTargetNamespace" value="http://webservice.tfc.tmri.com"/> <parameter name="wsdlServiceElement" value="TransService"/> <parameter name="schemaQualified" value="http://webservice.tfc.tmri.com"/> <parameter name="wsdlServicePort" value="Trans"/> <parameter name="className" value="com.tmri.tfc.webservice.TransSoapBindingSkeleton"/> <parameter name="wsdlPortType" value="Trans"/> <parameter name="typeMappingVersion" value="1.2"/> <parameter name="allowedMethods" value="*"/> </service> <transport name="http"> <requestFlow> <handler type="URLMapper" /> <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler" /> </requestFlow> <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler" /> <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler" /> <parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler" /> <parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler" /> <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler" /> <parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler" /> </transport> <transport name="local"> <responseFlow> <handler type="LocalResponder" /> </responseFlow> </transport> </deployment>
节点service,直接将从deploy.wsdd中service拷备过来即可。
服务准备完成,等待部署运行。