Originally posted by Gowtham Ganamukala:
when i tried to create with axis2 , all i got is so weired ..... classes get generated.
You cannot expect to get the classes that exist on the server - there simply isn't enough information in a WSDL. The classes that you do get are the "pieces" that you need to build the requests that can be sent to the service - other "pieces" are used to hold the information that was contained in the response form the service.
The
Client Sample from
Axis Data Binding (ADB) actually shows a fairly simple model:
- Initialize a "{operation_name}Request" object with the required information - Submit the Request to the web service by calling "stub.{operation_name}( {operation_name}Request )" - Use the accessors of the returned "{operation_name}Response" instance to obtain the information required. Axis2 WSDL2Java Option Reference There are some extension options available for
ADB Integration With Axis2. For example "WSDL2Java ... -Ew true" enables ADBs "Wrapped Mode"
Notice that ADB has three
generation modes. "Expanded Mode" creates a bean for each top level XML element
and each complex XML type (easily doubling the number of classes that you would have seen under Axis 1.x) used in the
SOAP payload. I suspect that "Expanded Mode" is the one that WSDL2Java uses by default - using the extension option "-Ew true" on WSDL2Java will probably place it into "Wrapped Mode" which will limit the number of classes that are generated.