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 Eric Rajkovic <er...@oracle.com> on 2002/08/27 03:23:35 UTC

Re: Axis Client with MSSoap 3.0 Server - 'Invalid Element' Deserializing Complex Type

David,

I have seen this type of error when the code used to handle untyped response does not handle mixed case (Result)
instead of lower case (result).

Normaly, the top element should be irrelevant to the deserialization process.

eric

"Riggs, David" wrote:

> I'm trying to communicate with a MS Soap Toolkit 3.0 web
> service using the latest CVS Axis. The method I'm trying
> to call returns a complex data type which MS Soap 3.0
> claims to know how to describe in a WSDL and how to
> serialize properly.
>
> WSDL2Java generates the client code properly, and builds
> the bean structure just as I expect it to look (I've got
> limited contact with the developers of the provider side),
> however I receive the following error when I make the remote
> call:
>
> - Exception:
> org.xml.sax.SAXException: Invalid element in org.tempuri._JMission -
> MissionThingy
>         at
> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeseriali
> zer.java:252)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
> lizationContextImpl.java:861)
>         at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
> 199)
>         at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
> ava:666)
>         at
> org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.
> java:371)
>         at
> org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeseriali
> zer.java:171)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
> lizationContextImpl.java:874)
>         at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
> 199)
>         at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
> ava:666)
>         at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:252)
>         at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:276)
>         at org.apache.axis.client.Call.invoke(Call.java:1867)
>         at org.apache.axis.client.Call.invoke(Call.java:1772)
>         at org.apache.axis.client.Call.invoke(Call.java:1312)
>         at
> org.tempuri.PexServicesSoapBindingStub.getMissionsObjByDateRange(PexServ
> icesSoapBindingStub.java:470)
>         at TestClient.callService(TestClient.java:26)
>         at TestClient.main(TestClient.java:14)
>
> ( _JMission is a complex type with two properties, MissionThingy
> and MissionName...it's just being used for testing right now  :-)
>
> The MSSoap generated WSDL file describes the _Jmission type like
> this:
> --------------- WSDL Type Snippet ------------------
> <complexType name ='_JMission'>
>         <sequence>
>                 <element name='MissionThingy' type='string'/>
>                 <element name='MissionName' type='string'/>
>         </sequence>
> </complexType>
> -----------------------------------------------------
>
> However, I've grabbed the SOAP envelope with TCPMonitor, and
> the payload looks rather odd...The _Jmission type is declared
> with a namespace, but it's properties are not (there is no
> default namespace). Could this be the problem?
>
> ---------------- SOAP Response Envelope ---------------------
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
> xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>         <SOAP-ENV:Body
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>                 <SOAPSDK4:GetMissionsObjByDateRangeResponse
> xmlns:SOAPSDK4="http://tempuri.org/PexWebService/message/">
>                         <Result href="#id1"/>
>                 </SOAPSDK4:GetMissionsObjByDateRangeResponse>
>                 <SOAPSDK5:_JMission
> xmlns:SOAPSDK5="http://tempuri.org/PexWebService/type/" id="id1"
> SOAPSDK3:root="0" SOAPSDK2:type="SOAPSDK5:_JMission">
>                         <MissionThingy>This is a Test</MissionThingy>
>                         <MissionName>TestTestTesT</MissionName>
>                 </SOAPSDK5:_JMission>
>         </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> --------------------------------------------------------------
>
> Attachments:
> 1. PexWebService.WSDL - the MSSoap 3.0 generated WSDL file
> 2. envelope.xml - The SOAP response envelope grabbed with TCPMonitor
> 3. TestClient.java - The simple SOAP client I'm calling the service
> with
>
> Thanks for reading this far!
>
> David A. Riggs
> Science Applications International Corporation - SAIC
>  (304)284-9000x201                  driggs@asset.com
>
>                                                   -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>                             Name: PexWebService.WSDL
>    PexWebService.WSDL       Type: Web Service Description Language (application/x-unknown-content-type-wsdlfile)
>                         Encoding: base64
>                      Description: PexWebService.WSDL
>
>                          Name: TestClient.java
>    TestClient.java       Type: unspecified type (application/octet-stream)
>                      Encoding: base64
>                   Description: TestClient.java
>
>                       Name: envelope.xml
>    envelope.xml       Type: ACT Project (text/xml)
>                   Encoding: base64
>                Description: envelope.xml