Hi,
I use Axis 1.0 in my SOAP client and try to call a server that is implemented on gSOAP.

I have generated the Axis-stubbs from a WSDL-file (below) which contains an operation 
that takes an enumeration as request parameter.

When I call the operation, I get a fault-response from the gSOAP Server.
Have I done something wrong with my WSDL or is there a compatibility problem between 
Axis and gSOAP?

Best Regards!
/Marcus


The request generated by Axis:

<?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>
  <ns1:testEnum soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns1="urn:test">
  <theStatus href="#id0" /> 
  </ns1:testEnum>
  <multiRef id="id0" soapenc:root="0" 
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
xsi:type="ns2:STATUS" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:ns2="urn:test">Passive</multiRef> 
  </soapenv:Body>
  </soapenv:Envelope>

The fault response returned by gSOAP:

<?xml version="1.0" encoding="UTF-8" ?> 
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="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"; xmlns:ns1="urn:test" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
  <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Client</faultcode> 
  <faultstring>Data type 'ns2:STATUS' mismatch in element 'multiRef'</faultstring> 
  <detail /> 
  </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

The WSDL File:

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ns1"
 xmlns="http://schemas.xmlsoap.org/wsdl/";
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/";
 xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 targetNamespace="urn:test"
 xmlns:tns="urn:test"
 xmlns:ns1="urn:test">

<types>
 <schema
  xmlns="http://www.w3.org/2001/XMLSchema";
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
  targetNamespace="urn:test"
  xmlns:ns1="urn:test">

  <simpleType name="STATUS">
   <restriction base="xsd:string">
    <enumeration value="Active"/>
    <enumeration value="Passive"/>
   </restriction>
  </simpleType>

  <complexType name="testEnumResponse">
   <all>
    <element name="theResult" type="xsd:string" minOccurs="1" maxOccurs="1" 
nillable="true"/>
   </all>
  </complexType>

 </schema>
</types>

<message name="testEnumRequest">
 <part name="theStatus" type="ns1:STATUS"/>
</message>

<message name="testEnumResponse">
 <part name="theResult" type="xsd:string"/>
</message>

<portType name="ns1PortType">
 <operation name="testEnum">
  <documentation>Service definition of function ns1__testEnum</documentation>
  <input message="tns:testEnumRequest"/>
  <output message="tns:testEnumResponse"/>
 </operation>
</portType>

<binding name="ns1Binding" type="tns:ns1PortType">
 <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="testEnum">
  <SOAP:operation soapAction="urn:test#testEnum"/>
  <input>
   <SOAP:body use="encoded" namespace="urn:test" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  </input>
  <output>
   <SOAP:body use="encoded" namespace="urn:test" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  </output>
 </operation>
</binding>

<service name="ns1">
 <documentation>gSOAP 2.1.6b generated service definition</documentation>
 <port name="ns1Port" binding="tns:ns1Binding">
  <SOAP:address location="http://localhost:7777/ns1.cgi"/>
 </port>
</service>

</definitions>

Reply via email to