According to your wsdl, the following elements under the complex type User belongs to http://ws.apache.org/axis1/xsd namespace.
<element name="daysValid" nillable="true" type="xsd:string"/> <element name="lastUserUpdate" nillable="true" type="xsd:string"/> <element name="resumeDate" nillable="true" type="xsd:string"/> <element name="suspendFlag" nillable="true" type="xsd:string"/> <element name="userFirstName" nillable="true" type="xsd:string"/> <element name="userInitials" nillable="true" type="xsd:string"/> <element name="userLastName" nillable="true" type="xsd:string"/> <element name="userName" nillable="true" type="xsd:string"/> <element name="vaxID" nillable="true" type="xsd:string"/> But According to the response they belongs to a different namesapce. So the response is invalid. thanks, Amila. On Feb 12, 2008 12:26 AM, <[EMAIL PROTECTED]> wrote: > > Paul, > Thanks for the reply > > I get this wsdl from the server i am suppused to connect to. > How does the http://ws.apache.org/axis1/xsd namespace come to play? > "<schema targetNamespace="*http://ws.apache.org/axis1/xsd*"> > xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">" > > My generated client code is trying to locate the reply elements in this > namespace. > ( ireformatted the generated code for better readability ) > > if (reader.isStartElement() && new javax.xml.namespace.QName(*" > http://ws.apache.org/axis1/xsd","daysValid"*).equals(reader.getName())) > { > nillableValue = reader.getAttributeValue(" > http://www.w3.org/2001/XMLSchema-instance","nil"); > if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) > { > java.lang.String content = reader.getElementText(); > object.setDaysValid( > org.apache.axis2.databinding.utils.ConverterUtil.convertToString > (content)); > } > else > { > reader.getElementText(); // throw away text nodes if any. > } > reader.next(); > } // End of if for expected property start element > else > { > // A start element we are not expecting indicates an invalid parameter > was passed > throw new org.apache.axis2.databinding.ADBException("Unexpected > subelement " + reader.getLocalName()); > } > > thanks > LF > > ------------------------------ > *Leonid Flom · *The Bank of New York Mellon > Treasury Systems - CA$H-Register Plus* ·* Tel 212.815.7023* ·* Fax > 212.815.8200* ·* [EMAIL PROTECTED] <[EMAIL PROTECTED]>* * > > > > *"Paul Fremantle" <[EMAIL PROTECTED]>* > > 02/11/2008 01:46 PM > Please respond to > [email protected] > > To > [email protected] cc > Subject > Re: WSDL / SOAP reply namespaces problem. > > > > > Leonid > > The response element is defined in the second schema which has the > <schema targetNamespace="http://server.ws.te0.com"> > > So the response matches the WSDL as far as I can see. > To be honest its a really strange WSDL! Wouldn't it make sense to clean it > up? > > Paul > > > > On Feb 11, 2008 6:15 PM, <[EMAIL PROTECTED]> wrote: > > > > > > hello, everybody > > > > Can anybody tell me if this SOAP reply message is valid for the given > wsdl? > > I am using Axis2 to generate the client stub and when running the > client I > > get the > > "org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: > > Unexpected subelement" exception. > > WSDL is generated by Axis1. > > > > It seems that the problem is the namespace of the nested elements of > the > > <getUserReturn>. > > In wsdl they are defined to be in the "http://ws.apache.org/axis1/xsd" > > namespace, but the reply has them in the "http://server.ws.te0.com". > > I traced the generated source code it is exactly where it is failing. > > > > Thanks > > LF > > > > SOAP reply: > > > > <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> > > <getUserResponse xmlns="http://server.ws.te0.com"> > > <getUserReturn> > > <daysValid>39 </daysValid> > > <lastUserUpdate>20080211084047 </lastUserUpdate> > > <resumeDate>1-01-01 </resumeDate> > > <suspendFlag>N </suspendFlag> > > <userFirstName>MASTER </userFirstName> > > <userInitials/> > > <userLastName>SECURITY </userLastName> > > <userName>MAS </userName> > > <vaxID>12027 </vaxID> > > </getUserReturn> > > </getUserResponse> > > </soapenv:Body> > > </soapenv:Envelope> > > > > WSDL: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <wsdl:definitions > > targetNamespace=" > https://www-nr.qa.thebank.com/services/EntitlementWebServices" > > xmlns="http://schemas.xmlsoap.org/wsdl/" > > xmlns:apachesoap="http://xml.apache.org/xml-soap" > > xmlns:impl=" > https://www-nr.qa.thebank.com/services/EntitlementWebServices" > > xmlns:intf=" > https://www-nr.qa.thebank.com/services/EntitlementWebServices" > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:tns1="http://ws.apache.org/axis1/xsd" > > xmlns:tns2="http://server.ws.te0.com" > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > > > <wsdl:types> > > <schema targetNamespace="http://ws.apache.org/axis1/xsd" > > xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> > > <complexType name="User"> > > <sequence> > > <element name="daysValid" nillable="true" type="xsd:string"/> > > <element name="lastUserUpdate" nillable="true" type="xsd:string"/> > > <element name="resumeDate" nillable="true" type="xsd:string"/> > > <element name="suspendFlag" nillable="true" type="xsd:string"/> > > <element name="userFirstName" nillable="true" type="xsd:string"/> > > <element name="userInitials" nillable="true" type="xsd:string"/> > > <element name="userLastName" nillable="true" type="xsd:string"/> > > <element name="userName" nillable="true" type="xsd:string"/> > > <element name="vaxID" nillable="true" type="xsd:string"/> > > </sequence> > > </complexType> > > </schema> > > <schema targetNamespace="http://server.ws.te0.com" > > xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> > > <element name="getUser"> > > <complexType> > > <sequence> > > <element name="requestingKNumber" type="xsd:string"/> > > <element name="requestingSubID" type="xsd:string"/> > > <element name="requestingBankNumber" type="xsd:string"/> > > <element name="transactionBankNumber" type="xsd:string"/> > > <element name="transactionKNumber" type="xsd:string"/> > > <element name="transactionSubID" type="xsd:string"/> > > </sequence> > > </complexType> > > </element> > > <element name="getUserResponse"> > > <complexType> > > <sequence> > > <element name="getUserReturn" type="tns1:User"/> > > </sequence> > > </complexType> > > </element> > > </schema> > > </wsdl:types> > > > > <wsdl:message name="getUserResponse"> > > <wsdl:part element="tns2:getUserResponse" name="parameters"/> > > </wsdl:message> > > <wsdl:message name="getUserRequest"> > > <wsdl:part element="tns2:getUser" name="parameters"/> > > </wsdl:message> > > <wsdl:portType name="EntReadWebServices"> > > <wsdl:operation name="getUser" parameterOrder=""> > > <wsdl:input message="impl:getUserRequest" name="getUserRequest"/> > > <wsdl:output message="impl:getUserResponse" > name="getUserResponse"/> > > </wsdl:operation> > > </wsdl:portType> > > <wsdl:binding name="EntitlementWebServicesSoapBinding" > > type="impl:EntReadWebServices"> > > <wsdlsoap:binding style="document" > > transport="http://schemas.xmlsoap.org/soap/http"/> > > <wsdl:operation name="getUser"> > > <wsdlsoap:operation soapAction=""/> > > <wsdl:input name="getUserRequest"> > > <wsdlsoap:body use="literal"/> > > </wsdl:input> > > <wsdl:output name="getUserResponse"> > > <wsdlsoap:body use="literal"/> > > </wsdl:output> > > </wsdl:operation> > > </wsdl:binding> > > <wsdl:service name="EntReadWebServicesService"> > > <wsdl:port binding="impl:EntitlementWebServicesSoapBinding" > > name="EntitlementWebServices"> > > <wsdlsoap:address > > location="https://www-nr.qa.thebank.com/services/EntitlementWebServices > "/> > > </wsdl:port> > > </wsdl:service> > > </wsdl:definitions> > > > > ________________________________ > > Leonid Flom · The Bank of New York Mellon > > Treasury Systems - CA$H-Register Plus · Tel 212.815.7023 · Fax > 212.815.8200 > > · [EMAIL PROTECTED] > > > > The information contained in this e-mail, and any attachment, is > > confidential and is intended solely for the use of the intended > recipient. > > Access, copying or re-use of the e-mail or any attachment, or any > > information contained therein, by any other person is not authorized. If > you > > are not the intended recipient please return the e-mail to the sender > and > > delete it from your computer. Although we attempt to sweep e-mail and > > attachments for viruses, we do not guarantee that either are virus-free > and > > accept no liability for any damage sustained as a result of viruses. > > > > Please refer to http://disclaimer.bankofny.com/eu.htm for certain > > disclosures relating to European legal entities. > > > > > > -- > Paul Fremantle > Co-Founder and VP of Technical Sales, WSO2 > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > The information contained in this e-mail, and any attachment, is > confidential and is intended solely for the use of the intended recipient. > Access, copying or re-use of the e-mail or any attachment, or any > information contained therein, by any other person is not authorized. If you > are not the intended recipient please return the e-mail to the sender and > delete it from your computer. Although we attempt to sweep e-mail and > attachments for viruses, we do not guarantee that either are virus-free and > accept no liability for any damage sustained as a result of viruses. > > Please refer to http://disclaimer.bankofny.com/eu.htm for certain > disclosures relating to European legal entities. > -- Amila Suriarachchi, WSO2 Inc.
