标签:生成 odi receiver plain ebs pcm class mon sms
使用jetty+axis2实现webservice服务端,且无需使用axis2命令生成服务端代码。仅仅要services.xml配置实现类。
project为gradleproject配置文件在src/main/resources/axis2/WEB-INF/services.xml:
<?xml version="1.0" encoding="UTF-8"?> <serviceGroup> <service name="wifiecService"> <Description> Please Type your service description here </Description> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </messageReceivers> <parameter name="ServiceClass" locked="false">com.smsservice.webservices.SmsService </parameter> </service> </serviceGroup>
解决方法:使用axis1的wsdl2java命令来生成client代码:
脚本:wsdl2java.bat
set Axis_Lib=G:\jar-lib\axis1.4 set Java_Cmd=java -Djava.ext.dirs=%Axis_Lib% set Output_Path=C:\Users\tower\Desktop\test set Package=wcf %Java_Cmd% org.apache.axis.wsdl.WSDL2Java http://x.x.x.x:9002/services/xxxService?wsdl -o%Output_Path% -p%Package%
dos下运行此脚本,会生成服务端代码和client代码到test文件夹。
G:\jar-lib\axis1.4 的文件夹 2007-10-17 11:05 56,290 activation.jar 2006-04-22 18:56 33,202 axis-ant.jar 2006-04-22 18:56 1,599,570 axis.jar 2006-04-22 18:56 71,442 commons-discovery-0.2.jar 2006-04-22 18:56 38,015 commons-logging-1.0.4.jar 2006-04-22 18:56 31,191 jaxrpc.jar 2011-06-02 16:30 391,834 log4j-1.2.15.jar 2006-04-22 18:56 921 log4j.properties 2009-08-02 15:04 436,053 mail.jar 2006-04-22 18:56 18,979 saaj.jar 2006-04-22 18:56 126,771 wsdl4j-1.5.1.jar
axis2的wsdl无法使用eclipse axis1插件来生成client--解决方法
标签:生成 odi receiver plain ebs pcm class mon sms
原文地址:http://www.cnblogs.com/jzssuanfa/p/6884653.html