Axis wsdl2java -generated codes


I

itsprabhu

Hello Everyone ,

I am using Axis 1.4 for converting WSDl2Java and testing my web
services . I am writing a client which uses these generated codes.
WSDL2Java is successful but the generated codes are missing some
informations means,

It creates a stub files which has a method like this login(AesLogin
AL);

but in my wsdl i have define like this
<xs:element name="Login" type="LoginMethodArgs"/>
<!-- Login -->
<xs:complexType name="LoginMethodArgs">
<xs:sequence>
<xs:element ref="AesLogin"/>
</xs:sequence>
</xs:complexType>

<!-- AesLogin-->
<xs:element name="AesLogin" type="AesLogin" abstract="true"/>
<xs:complexType name="AesLogin">
<xs:complexContent>
<xs:extension base="AesObject">
<xs:attribute name="userName" type="xs:string" />
<xs:attribute name="password" type="xs:string" />
</xs:extension>
</xs:complexContent>
</xs:complexType>

I am expecting method like this login(LoginMethodArgs parameter) in
the stub and port file generated . I am able to get properly like this
when i use Axis2 framework .

Because of this my soap requests goes like this

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"><soapenv:Body><AesLogin
changedOn="0" mask="0" objectId="0" options="0" parentId="0"
password="admin" userName="admin" xmlns="http://xyz.com/abc/types"/></
soapenv:Body></soapenv:Envelope>

But my server expects a request like

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"><soapenv:Body><Login><AesLogin
changedOn="0" mask="0" objectId="0" options="0" parentId="0"
password="admin" userName="admin" xmlns="http://xyz.com/abc/types"/></
Login></soapenv:Body></soapenv:Envelope>


Note: I am able to achieve this through Axis2 framework .

Can anyone help me on this . Is there any way to overcome this issue.

Thanks in Advance,
Prabhu
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top