First, we don't have the WSDL content before the modification.
at this point the service-side class
after the modified
Note the following
1 PackageCom.xiaostudy;2 3 ImportJavax.jws.WebMethod;4 ImportJavax.jws.WebParam;5 ImportJavax.jws.WebResult;6 ImportJavax.jws.WebService;7 ImportJavax.xml.ws.BindingType;8 Importjavax.xml.ws.soap.SOAPBinding;9 Ten /** One * @desc Server Interface Implementation class A * @authorXiaostudy - * - */ the @WebService ( -Targetnamespace= "Http://www.xiaostudy.com",//Modify the Web site that the client accesses -Name= "Addsoap",//Modify client access to get the class name of the view -Portname= "Addsoapport",//Modify the Client Service implementation class name +Servicename= "Add")//Modify the Client service name -@BindingType (soapbinding.soap12http_binding)//SOAP1.2 Statement + Public classTest_serviceimplImplementsTest_service { A at /** - * @desc processing the client's data and returning the data - * @paramNumber parameter - * @returnString return Data type - */ - @WebMethod ( inOperationname= "Getadd",//Modify the Client access method name -Exclude=false)//false to begin annotation modification to@Override//The first note below: @WebResult (name= "result") modifies the client display to return a parameter name that is worth @WebParam (name= "number") to modify the client parameter name + Public@WebResult (name= "result") String GetNumber (@WebParam (name= "number") (String number) { - theSYSTEM.OUT.PRINTLN ("My server side has performed ....") "); * $ returnnumber+ "_ Added later";Panax Notoginseng } - the}
Test_serviceimpl.java
WebService modifying WSDL content using annotations