Hi Keith , Here is my wsdl and xsd file . Please note iam able to get as expected using Axis2 that is
stub file will have method like login(LoginMethodArgs parameter); Let me know if you want more informations . Thanks, Prabhu On Thu, Jul 3, 2008 at 9:53 PM, keith chapman <[EMAIL PROTECTED]> wrote: > Hi Prabhu, > > Can you post your WSDL please. > > Thanks, > Keith. > > > On Thu, Jul 3, 2008 at 6:42 PM, prabhu p <[EMAIL PROTECTED]> wrote: > >> 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<http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLogin>changedOn="0" >> mask="0" objectId="0" options="0" parentId="0" >> password="admin" userName="admin" xmlns=" >> http://xyz.com/abc/types"/></soapenv:Body></soapenv:Envelope<http://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/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<http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLogin>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<http://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/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 >> >> > > > -- > Keith Chapman > Senior Software Engineer > WSO2 Inc. > Oxygenating the Web Service Platform. > http://wso2.org/ > > blog: http://www.keith-chapman.org
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xyz.com/abc/types" targetNamespace="http://xyz.com/abc/types" name="loc"> <types> <xs:schema> <xs:import namespace="http://xyz.com/abc/types" schemaLocation="loc.xsd"/> </xs:schema> </types> <message name="ResponseMsg"> <part name="parameter" element="tns:Response"/> </message> <message name="LoginRequest"> <part name="Login" element="tns:Login"/> </message> <message name="LoginResponse"> <part name="parameter" element="tns:Response"/> </message> <portType name="AaaPort"> <operation name="Login"> <input message="tns:LoginRequest"/> <output message="tns:LoginResponse"/> </operation> </portType> <binding name="AaaBinding" type="tns:AaaPort"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="Login"> <soap:operation soapAction="Login" style="document"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="aaaService"> <port name="soap" binding="tns:AaaBinding"> <soap:address location="https://0.0.0.0/aaa"/> </port> </service> </definitions>
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xyz.com/abc/types" xmlns="http://xyz.com/abc/types" elementFormDefault="qualified" attributeFormDefault="qualified"> <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"/> <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> <!-- AesObject definition --> <xs:element name="AesObject" type="AesObject" /> <xs:complexType name="AesObject"> <xs:sequence/> <xs:attribute name="objectId" type="xs:long"/> <xs:attribute name="parentId" type="xs:long"/> <xs:attribute name="changedOn" type="xs:long"/> <xs:attribute name="mask" type="xs:int"/> <xs:attribute name="options" type="xs:int"/> </xs:complexType> <!-- AesResult Definition --> <xs:element name="AesResult" type="AesResult"/> <xs:complexType name="AesResult" mixed="false"> <xs:complexContent mixed="false"> <xs:extension base="AesObject"> <xs:attribute name="result" type="xs:boolean"/> <xs:attribute name="resultArg" type="xs:string"/> <xs:attribute name="resultArgClass" type="xs:string"/> <xs:attribute name="message" type="xs:string"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- Session definition --> <xs:element name="AesBusinessSession" type="AesBusinessSession"/> <xs:complexType name="AesBusinessSession"> <xs:complexContent> <xs:extension base="AesObject"> <xs:attribute name="id" type="xs:int" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- RESPONSE --> <xs:element name="Response" type="Response"/> <xs:complexType name="Response"> <xs:choice> <xs:element ref="AesBusinessSession"/> <xs:element ref="AesResult"/> </xs:choice> </xs:complexType> </xs:schema>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]