Use Jetty+axis2 to implement the WebService service side without using the AXIS2 command to generate the service-side code. Just services.xml Configure the implementation class.
Project for gradleproject configuration file in 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>
Browser access to the service-side WSDL address, the saved WSDL file cannot generate the client code through Eclipse Luna's Axis1 plugin, missing a Xxxporttype class.
Workaround: Use the AXIS1 wsdl2java command to generate the client code:
Script: Wsdl2java.bat
Set Axis_lib=g:\jar-lib\axis1.4set Java_cmd=java-djava.ext.dirs=%axis_lib%set output_path=c:\users\tower\desktop\ Testset package=wcf%java_cmd% Org.apache.axis.wsdl.WSDL2Java Http://x.x.x.x:9002/services/xxxService?wsdl-o%O utput_path%-p%package%
Running this script under DOS generates the server-side code and the client code to the test folder.
G:\jar-lib\axis1.4 folder 2007-10-17 11:05 56,290 activation.jar2006-04-22 18:56 33,202 Axis-ant.jar2006-04-22 18:56 1,599,570 axis.jar2006-04-22 18:56 71,442 Commons-discovery-0.2.jar2006-04-22 18:56 38,015 commons-logging-1.0.4.jar2006-04-22 18:56 31,191 jaxrpc.jar2011-06-02 16:30 391,834 log4j-1.2.15.jar2006-04-22 18:56 921 log4j.properties2009-08-02 15:04 436,053 mail.jar2006-04-22 18:56 18,979 saaj.jar2006-04-22 18:56 126,771 Wsdl4j-1.5.1.jar
Axis2 WSDL cannot use the Eclipse Axis1 plugin to generate client--workaround