You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by dweber <dw...@asyst-connect.com> on 2002/11/09 18:07:11 UTC

Cannot find deserializer error

I'm using stubs generated by wsdlToJava, and not having much luck.

The WSDL is:

<xs:complexType name="ErrorType">
  <xs:sequence>
    <xs:element name="ErrorTime" type="xs:dateTime"/>
    <xs:element name="ErrorType" type="xs:string"/>
    <xs:element name="ErrorCode" type="xs:string"/>
    <xs:element name="ErrorDesc" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

<xs:element name="IsEdaEnabled">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="eda:EquipmentID"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="IsEdaEnabledResponse">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="IsEnabled" type="xs:boolean"/>
      <xs:element name="Error" type="eda:ErrorType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<wsdl:message name="IsEdaEnabledIn">
  <wsdl:part name="IsEdaEnabledRequest" element="eda:IsEdaEnabled"/>
</wsdl:message>

<wsdl:message name="IsEdaEnabledOut">
  <wsdl:part name="IsEdaEnabledResponse"
element="eda:IsEdaEnabledResponse"/>
</wsdl:message>

<wsdl:operation name="IsEdaEnabled">
  <wsdl:input name="IsEdaEnabledInput" message="IsEdaEnabledIn"/>
  <wsdl:output name="IsEdaEnabledOutput" message="IsEdaEnabledOut"/>
</wsdl:operation>

For some reason, the WSDL parser generates a function signature of:
public void isEdaEnabled(EquipmentIdType equipmentID, BooleanHolder
isEnabled, ErrorTypeHolder error)

Ok, fine, those are the values I'm interested in, so I don't complain.  But
it does:

org.xml.sax.SAXException: Deserializing parameter 'Result':  could not find
deserializer for type IsEdaEnabledResponse

I have no idea where Axis is looking for deserializers, the response
message, of course, has the IsEdaEnabledResponse tag, just like the WSDL
would make you believe:

<?xml version='1.0' encoding='UTF-8'?>
   <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
      <soap:Body>
         <n:IsEdaEnabledResponse xmlns:n='urn:semi-org:schema:eda_ps_v0_0'>
            <Result href='#id0'></Result>
         </n:IsEdaEnabledResponse>
         <id0 id='id0' soapenc:root='0' xsi:type='IsEdaEnabledResponse'>
            <IsEnabled xsi:type='xsd:boolean'>false</IsEnabled>
            <Error href='#id1'></Error>
         </id0>
         <id1 id='id1' soapenc:root='0' xsi:type='ErrorType'>
            <ErrorTime
xsi:type='xsd:dateTime'>2002-11-08T00:31:52.546Z</ErrorTime>
            <ErrorType xsi:type='xsd:string'>Client Not Found</ErrorType>
            <ErrorCode xsi:type='xsd:string'>0</ErrorCode>
            <ErrorDesc xsi:type='xsd:string'>Unknown client id:
demo</ErrorDesc>
         </id1>
      </soap:Body>
   </soap:Envelope>

This is in rpc format, but doc/literal gives me the same error.  I am having
some trouble on the server side getting the namespaces correct in
doc/literal, but I'm not convinced this is the issue.  The above XML looks
correct to the naked eye.

Note that the stub client does not have any reference to
IsEdaEnabledResponse in it's constructor cache section.  Adding the class as
a parameter doesn't help.  Setting the return value of the invoke call
doesn't help.  The class does exist, and has a getDeserializer function on
it.

I'm about at my wits end on this one.  Any help appreciated.