Hi,

I'm using gsoap to generate the wsdl file that I wanted to access with Axis 1.1.  I 
used wsdl2java to generate the stub classes.  However, I ran into the following 
problem:
-----------------------------------------------------
...
 faultString: org.xml.sax.SAXException: Deserializing parameter 'result':  
could not find deserializer for type {urn:cees}QueryResponseCollection
 faultActor: 
 faultNode: 
 faultDetail: 
        {http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: 
Deserializing parameter 'result':  could not find deserializer for type 
{urn:cees}QueryResponseCollection
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
...
-----------------------------------------------------

Can somebody tell me what can possibly go wrong?  It seems like it can't seem to 
deserialize the <result> tag in the response.  I only have one function that returns 
an array of QueryResponse (that consists of just a subject line and id).  It should be 
pretty simple.  One thing I realized is that the wsdl2java generated the 
QueryResonse.java stub but not the QueryResponseCollection (the array) that I defined 
in gsoap.  The gsoap client that uses the same library can access the service fine.  
The schema section for the wsdl file generated by gsoap looks like:

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Cees"
 xmlns="http://schemas.xmlsoap.org/wsdl/";
 targetNamespace="http://localhost:8080/Cees.wsdl";
 xmlns:tns="http://localhost:8080/Cees.wsdl";
 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:ns="urn:cees"
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/";
 xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/";>

<types>

 <schema targetNamespace="urn:cees"
  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:ns="urn:cees"
  xmlns="http://www.w3.org/2001/XMLSchema";
  elementFormDefault="unqualified"
  attributeFormDefault="unqualified">
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  <complexType name="QueryResponse">
   <sequence>
    <element name="docID" type="xsd:string" minOccurs="0" maxOccurs="1" 
nillable="true"/>
    <element name="subject" type="xsd:string" minOccurs="0" maxOccurs="1" 
nillable="true"/>
   </sequence>
  </complexType>
  <complexType name="QueryResponseCollection">
   <sequence>
    <element name="item" type="ns:QueryResponse" minOccurs="0" maxOccurs="unbounded" 
nillable="true"/>
   </sequence>
  </complexType>
  <element name="query" type="xsd:string"/>
  <element name="result" type="ns:QueryResponseCollection"/>
 </schema>

</types>

<message name="queryRequest">
 <part name="query" element="ns:query"/>
</message>

<message name="queryResponse">
 <part name="result" element="ns:result"/>
</message>

<portType name="CeesPortType">
 <operation name="query">
  <documentation>Service definition of function ns__query</documentation>
  <input message="tns:queryRequest"/>
  <output message="tns:queryResponse"/>
 </operation>
</portType>

<binding name="Cees" type="tns:CeesPortType">
 <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="query">
  <SOAP:operation soapAction=""/>
  <input>
   <SOAP:body use="literal" namespace="urn:cees"/>
  </input>
  <output>
   <SOAP:body use="literal" namespace="urn:cees"/>
  </output>
 </operation>
</binding>

<service name="Cees">
 <documentation>gSOAP 2.5.2 generated service definition</documentation>
 <port name="Cees" binding="tns:Cees">
  <SOAP:address location="http://localhost:8080"/>
 </port>
</service>

</definitions>
----------------------------------------------------

Note the interface CeesPortType.java generated is (I know the package name is messed 
up...):

---------------------------------------------------
package localhost.Cees_wsdl;

public interface CeesPortType extends java.rmi.Remote {

    // Service definition of function ns__query
    public cees.soap.QueryResponse[] query(java.lang.String query) throws 
java.rmi.RemoteException;
}
-----------------------------------------------------

Note that there is no QueryResponseCollection generated by wsdl2java.  Is there a 
reason why?

Thanks,

Will

--
William (Will) Lee 
Email: [EMAIL PROTECTED]
Computer Science, University of Illinois at Urbana-Champaign

Reply via email to