WebService modifying WSDL content using annotations

Source: Internet
Author: User
Tags wsdl

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.