Develop Web services deployment descriptor templates for a JavaBeans implementation

 

Before you begin

To develop the JavaBeans implementation templates and bindings, obtain the URL of the WSDL file. If the WSDL file is a local file the URL looks like this example:

file:/path/file_name.wsdl
We can also specify local files using the absolute or relative file system path.

Implementation templates are generated using the WSDL2Java command, which also generates bindings and deployment descriptors.

WSDL2Java -verbose \
          -role develop-server \
          -container web 
          wsdlURL 

The following example uses the AddressBook JavaBeans implementation and AddressBook.wsdl to generate template files...

WSDL2Java -verbose \
          -role develop-server \
          -container web \
          AddressBook.wsdl  

Parsing XML file:  file:e:/example/app/topdown/step1/AddressBook.wsdl 
WSWS3185I: Info: Parsing XML file:  AddressBook.wsdl
WSWS3282I: Info: Generating addr\Address.java.
WSWS3282I: Info: Generating addr\Phone.java.
WSWS3282I: Info: Generating addr\StateType.java.
WSWS3282I: Info: Generating addr\AddressBook.java.
WSWS3282I: Info: Generating addr\AddressBookSoapBindingImpl.java..
WSWS3282I: Info: Generating WEB-INF\webservices.xml.
WSWS3282I: Info: Generating WEB-INF\ibm-webservices-bnd.xmi.
WSWS3282I: Info: Generating WEB-INF\AddressBook_mapping.xml.
WSWS3282I: Info: Generating WEB-INF\ibm-webservices-ext.xmi.

The AddressBookSOAPBindingImpl.java file is the template for the implementation bean. It is named after the port in the WSDL file. Generally, this class is renamed to a more meaningful name.

 

What to do next

Complete the Java bean implementation.


 

Related Tasks


Completing the JavaBeans implementation
Developing a new Web service with an existing WSDL file using JavaBeans technology