Home

 

Resources generated by the Web Service wizard

After code generation, examine the generated code. You can see that the wizard generates the following artifacts:

A delegate class named SimpleBankBeanDelegate. The delegate class is a wrapper that contains all the methods from the Java bean as well as the JAX-WS annotation the runtime recognizes as a Web service. The annotation @javax.jws.WebService in the delegate class tells the server runtime environment to expose all public methods on that bean as a Web service. The targetNamespace, the serviceName, and the portName are what we specified in the Web Service wizard.

@javax.jws.WebService (targetNamespace="http://bank.rad75.itso/",

serviceName="BankService", portName="BankPort",

wsdlLocation="WEB-INF/wsdl/BankService.wsdl")

A webservices.xml file in the WebContent/WEB-INF folder. This is the optional Web services deployment descriptor. A deployment descriptor can be used to override or enhance the information provided in the Service. For example, if the <wsdl-service> element is provided in the deployment descriptor, then the namespace used in this element overrides the targetNamespace member attribute in the annotation.

A WSDL file (BankService.wsdl) and an XSD file (BankService_schema1.xsd) in the WEB-INF/wsdl folder. If you plan to create the client at a later time or publish the WSDL for other users, you can use this WSDL file.
ibm.com/redbooks