Hello,

 

I’m having a little trouble with my webservice. I have written a wsdl and generated associated source code. I edited the IMPL file and deployed without fail. Using InfoPath as a client I tried to connect to my webservice and got the following error when I ran a query with the webservice method:

 

Element 'getStringsReturn' is unexpected according to content model of parent element '{urn:ConfigTest}getStringsResponse'.

Expecting: {urn:ConfigTest}getStringsReturn.

 

The actual soap message over the wire:

 

<?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>

  <getStringsResponse xmlns="urn:ConfigTest">

   <getStringsReturn xmlns="">

    <ids>paul</ids>

    <ids>skye</ids>

    <ids>luci</ids>

    <ids>manu</ids>

    <values>apples</values>

    <values>oranges</values>

   </getStringsReturn>

  </getStringsResponse>

 </soapenv:Body>

</soapenv:Envelope>

 

As indicated by InfoPath the xmlns value is missing for the getStringsReturn element. Is it an Axis error or InfoPath problem?

What do I need to modify/implement so that getStringsReturn will have namespace associated with it? Any help is much appreciated. Attached is my wsdl.

 

Thanks,

-Bolek

 

 

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:ConfigTest" xmlns:tns="urn:ConfigTest" xmlns:impl="urn:ConfigTest" xmlns:intf="urn:ConfigTest" xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns="http://schemas.xmlsoap.org/wsdl/";>
 <wsdl:types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="urn:ConfigTest">
   <element name="getStrings">
   <complexType />
   </element>
   <element name="getStringsResponse" namespace="urn:ConfigTest">
    <complexType>
     <sequence>
      <element name="getStringsReturn" type="tns:AuthorData"  namespace="urn:ConfigTest"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="AuthorData" namespace="urn:ConfigTest">
   <sequence>
         <element minOccurs="0" maxOccurs="unbounded" name="ids" type="xsd:string" />
	 <element minOccurs="0" maxOccurs="unbounded" name="values" type="xsd:string" />
   </sequence>	 
  </complexType>
  </schema>
 </wsdl:types>

   <wsdl:message name="getStringsRequest">
     <wsdl:part name="parameters" element="impl:getStrings"/>
   </wsdl:message>

   <wsdl:message name="getStringsResponse">
      <wsdl:part name="parameters" element="impl:getStringsResponse"/>
   </wsdl:message>

   <wsdl:portType name="ConfigurationClient">
      <wsdl:operation name="getStrings" parameterOrder="">
         <wsdl:input name="getStringsRequest" message="impl:getStringsRequest"/>
         <wsdl:output name="getStringsResponse" message="impl:getStringsResponse"/>
      </wsdl:operation>
   </wsdl:portType>

   <wsdl:binding name="ConfigTestSoapBinding" type="impl:ConfigurationClient">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="getStrings">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getStringsRequest">
            <wsdlsoap:body use="literal" namespace="urn:ConfigTest"/>
         </wsdl:input>
         <wsdl:output name="getStringsResponse">
            <wsdlsoap:body use="literal" namespace="urn:ConfigTest"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="ConfigurationClientService">
      <wsdl:port name="ConfigTest" binding="impl:ConfigTestSoapBinding">
         <wsdlsoap:address location="http://localhost:8080/axis/services/ConfigTest"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

Reply via email to