axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12758] - Deserialization of complex classes throws SAXException
Date Fri, 27 Sep 2002 06:03:58 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12758>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12758

Deserialization of complex classes throws SAXException

nbrennan@touchcorp.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |



------- Additional Comments From nbrennan@touchcorp.com  2002-09-27 06:03 -------
Thanks for the attention so far!

The problem now appears to be fixed for that specific case, but not more 
complex cases.

Using another WSDL from the same site: 

http://tims.moveyourselftrailer.com.au:8000/scripts/Hire.dll/wsdl/IHire

I generate the appropriate java classes using WSDL2Java, then try this simple 
piece of code:

        IHireservice locator = new IHireserviceLocator();
	IHire client = locator.getIHirePort();
	THireInfo info = client.getHireFromCustomerLicence
("9876543", "VIC", "TWEED");

With my previous HACK, I get this (appropriate) result:

<THireInfo>
        <Number>335</Number>
        <SourceDepot>TWEED</SourceDepot>
        <DestinationDepot>TWEED</DestinationDepot>
        <StartTime>2002-09-24 16:34:30</StartTime>
        <FinishTime>2002-09-24 20:34:30</FinishTime>
        <TimeLength>4</TimeLength>
        <TrailerTypeCode>HORSE</TrailerTypeCode>
        <TrailerCode>902</TrailerCode>
        <ApplySackTruck>false</ApplySackTruck>
        <SackTruckCode/>
        <ApplyContentsInsurance>false</ApplyContentsInsurance>
        <LeavingMetro>false</LeavingMetro>
        <Returned>true</Returned>
        <ReturnedTime>2002-09-26 14:49:26</ReturnedTime>
        <CustomerNumber>76</CustomerNumber>
        <TotalPrice>-2.0</TotalPrice>
        <THireItemInfo>
                <Item>LF</Item>
                <Name>Late Fee</Name>
                <Price>48.0</Price>
        </THireItemInfo>
        <THireItemInfo>
                <Item>RTD</Item>
                <Name>Returned Trailer Deposit</Name>
                <Price>-50.0</Price>
        </THireItemInfo>
</THireInfo>

But with the latest overnight build (26 Sept 02) I get:
- Exception:
org.xml.sax.SAXException: Bad types (class 
com.touchcorp.soap.ihire.THireItemInfo -> class 
com.touchcorp.soap.ihire.THireInfo)
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:893)
        at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
        at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
        at org.apache.axis.client.Call.invoke(Call.java:1863)
        at org.apache.axis.client.Call.invoke(Call.java:1769)
        at org.apache.axis.client.Call.invoke(Call.java:1307)
        at com.touchcorp.soap.ihire.IHirebindingStub.getHireFromCustomerLicence
(IHirebindingStub.java:252)
        at com.touchcorp.remote.party.MystHireService.getHireFromCustomerLicence
(MystHireService.java:156)
        at com.touchcorp.remote.party.MystHireService.main
(MystHireService.java:236)
Exception in thread "main" AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.userException
 faultString: org.xml.sax.SAXException: Bad types (class 
com.touchcorp.soap.ihire.THireItemInfo -> class 
com.touchcorp.soap.ihire.THireInfo)
 faultActor: null
 faultDetail:
        stackTrace: org.xml.sax.SAXException: Bad types (class 
com.touchcorp.soap.ihire.THireItemInfo -&gt; class 
com.touchcorp.soap.ihire.THireInfo)
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:893)
        at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
        at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
        at org.apache.axis.client.Call.invoke(Call.java:1863)
        at org.apache.axis.client.Call.invoke(Call.java:1769)
        at org.apache.axis.client.Call.invoke(Call.java:1307)
        at com.touchcorp.soap.ihire.IHirebindingStub.getHireFromCustomerLicence
(IHirebindingStub.java:252)
        at com.touchcorp.remote.party.MystHireService.getHireFromCustomerLicence
(MystHireService.java:156)
        at com.touchcorp.remote.party.MystHireService.main
(MystHireService.java:236)

org.xml.sax.SAXException: Bad types (class 
com.touchcorp.soap.ihire.THireItemInfo -> class 
com.touchcorp.soap.ihire.THireInfo)
org.xml.sax.SAXException: Bad types (class 
com.touchcorp.soap.ihire.THireItemInfo -> class 
com.touchcorp.soap.ihire.THireInfo)
        at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:285)
        at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:893)
        at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:200)
        at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:684)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:243)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:267)
        at org.apache.axis.client.Call.invoke(Call.java:1863)
        at org.apache.axis.client.Call.invoke(Call.java:1769)
        at org.apache.axis.client.Call.invoke(Call.java:1307)
        at com.touchcorp.soap.ihire.IHirebindingStub.getHireFromCustomerLicence
(IHirebindingStub.java:252)
        at com.touchcorp.remote.party.MystHireService.getHireFromCustomerLicence
(MystHireService.java:156)
        at com.touchcorp.remote.party.MystHireService.main
(MystHireService.java:236)

There appears to now be some kind of confusion between the complex type 
returned and its embedded member...

Is this fixable or is the water now too deep?

Regards,

Neil Brennan

Mime
View raw message