Hi,

 

Can anyone tell me how would the code for client look like for this WSDL?

Sorry for deviating the topic.

 

VG

 

________________________________

From: MailList Ryan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 3:33 PM
To: axis-user@ws.apache.org
Subject: Error : org.apache.axis2.databinding.ADBExcepion:Unexpected
subelement AuthInfo

 

Dear all :
I user Aixs2 1.3 .First i user axis2java command  build a webservice from a
wsdl, then I delploy it on axis2 under tomcat 5.5.12. Every thing goes well,
but when i call this web service use delphi 2007 , error occured . When call
the web service in delphi, here raise a " org.apache.axis2.databinding

.ADBExcepion:Unexpected subelement AuthInfo " exception. I had searched
achieved mails, some one said that this error mostly caused by wrong name
spaces of wsdl file. I had checked my wsdl file again and again and valid it
wiht netbean and cxf validate tools, but all those tools said that the wsdl
file is correct. I am fighting with this problem for nearly one week, but do
not have any progress. Can anyone help ? Any idea or suggest will be highly
appreciated.

WSDL file and soap message for request and response can be found in the
following.

Thanks
Ryan.  

WSDL file
<?xml version ="1.0" encoding ="utf-8"?>
<wsdl:definitions
    targetNamespace = "http://example.com <http://example.com/> "
    xmlns:tns ="http://example.com <http://example.com/> "
    xmlns:wsoap12 ="http://schemas.xmlsoap.org/wsdl/soap12/";
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
    xmlns:xs ="http://www.w3.org/2001/XMLSchema";>
    <wsdl:types>
        <xs:schema
            targetNamespace="http://example.com <http://example.com/> " 
            blockDefault="#all"
            elementFormDefault="qualified">
            <xs:complexType name="AuthInfo">
                <xs:sequence>
                    <xs:element name="UserName" minOccurs="0" nillable="true"
type="xs:string"/>
                    <xs:element name="AuthPass" minOccurs="0" nillable="true"
type="xs:string"/>
                    <xs:element name="Timestamp" minOccurs="0"
nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
            <xs:element name="HelloResponse" >
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="return"
nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="Hello" >
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="AuthInfo"
nillable="true" type="tns:AuthInfo"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
        
    </wsdl:types>
    <wsdl:message name="HelloWorldMessageOut">
        <wsdl:part name="return" element="tns:HelloResponse"/>
    </wsdl:message>
    <wsdl:message name="HelloWorldMessageIn">
        <wsdl:part name="AuthInfo" element="tns:Hello"/>
    </wsdl:message>
    <wsdl:portType name="Test"> 
        <wsdl:operation name="HelloWorld">
            <wsdl:input message="tns:HelloWorldMessageIn"/>
            <wsdl:output message="tns:HelloWorldMessageOut"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TestSoap12Binding" type="tns:Test">
        <wsoap12:binding transport="http://schemas.xmlsoap.org/soap/http";
                         style="document"/>
        <wsdl:operation name="HelloWorld">
            <wsoap12:operation
                soapAction="http://example.com/Test/HelloWorldRequest";
                soapActionRequired="true" style="document"/>
            <wsdl:input >
                <wsoap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <wsoap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloWorld">
        <wsdl:port name="HellowWordSoap12" binding="tns:TestSoap12Binding">
            <wsoap12:address location="http://localhost/helloword"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

SOAP for request
<?xml version='1.0' encoding='utf-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <SOAP-ENV:Body xmlns:NS2="http://example.com <http://example.com/> "
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
    <NS1:HelloWorld xmlns:NS1="http://example.com <http://example.com/> ">
      <AuthInfo href="#1" />
    </NS1:HelloWorld>
    <NS2:Hello id="1" xsi:type="NS2:Hello">
      <AuthInfo href="#2" />
    </NS2:Hello>
    <NS2:AuthInfo id="2" xsi:type="NS2:AuthInfo">
      <UserName xsi:type="xsd:string">test username</UserName>
      <AuthPass xsi:type="xsd:string">authpass</AuthPass>
      <Timestamp xsi:type="xsd:string">timestamp</Timestamp>
    </NS2:AuthInfo>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SOAP for response 

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> ">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Server</faultcode>
      <faultstring>org.apache.axis2.databinding.ADBException: Unexpected
subelement AuthInfo</faultstring>
      <detail />
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>



DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. If you have received this message by mistake please notify the 
sender by return e-mail and delete this message from your system. Any 
unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for 
viruses and defects. While MindTree Consulting Limited (MindTree) has put in 
place checks to minimize the risks, MindTree will not be responsible for any 
viruses or defects or any forwarded attachments emanating either from within 
MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages 
sent to or from MindTree e-mail address. Messages sent to or from this e-mail 
address may be stored on the MindTree e-mail system or else where.

Reply via email to