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 "Avadhanula, Suresh " <SA...@dorado.com> on 2005/03/21 06:20:22 UTC

Error deserializing Attachements

Hi,

I have a sample echo services. I am sending an attachment that is echoed
back. It is serialized properly but throws exception while deserializing
echoed message.

The message that is sent it.



POST /services/MORServlet HTTP/1.0
Content-Type: multipart/related; type="text/xml";
start="<E889257FAFE7C0D7FD269A4C950C11B7>";
boundary="----=_Part_0_8702985.1111381063999"
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/#axisVersion#
Host: 127.0.0.1
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 979

------=_Part_0_8702985.1111381063999

Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <E889257FAFE7C0D7FD269A4C950C11B7>

<?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:callService
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="EP_REQUESTOR">
   <TEXT xsi:type="xsd:string">SAMPLE TEXT</TEXT>
   <INTEGER xsi:type="xsd:int">100</INTEGER>
   <Attachement href="cid:AE14793DD976E42B949B8B9DE6045060"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
  </ns1:callService>
 </soapenv:Body>
</soapenv:Envelope>

------=_Part_0_8702985.1111381063999
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <AE14793DD976E42B949B8B9DE6045060>

ATTACHMENT PARAM
------=_Part_0_8702985.1111381063999--




The echoed message is

HTTP/1.0 200 OK Date: Mon, 21 Mar 2005 04:57:45 GMT Server: WebLogic
WebLogic Server 7.0 SP2  Sun Jan 26 23:09:32 PST 2003 234192
Content-Type: multipart/related; type="text/xml";
start="<490EB4245654BB736E35B72489CC8CF1>";
boundary="----=_Part_0_14898358.1111381066153" Connection: Close
------=_Part_0_14898358.1111381066153 Content-Type: text/xml;
charset=UTF-8 Content-Transfer-Encoding: binary Content-Id:
<490EB4245654BB736E35B72489CC8CF1>  <?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:callServiceResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="EP_REQUESTOR">
   <RESULT xsi:type="xsd:string">AVNBS</RESULT>
   <RETAttach href="cid:D42B460490512F24782DD888DC7793FE"
xmlns:ns2="http://xml.apache.org/xml-soap"/>
  </ns1:callServiceResponse>
 </soapenv:Body>
</soapenv:Envelope> ------=_Part_0_14898358.1111381066153 Content-Type:
text/plain Content-Transfer-Encoding: binary Content-Id:
<D42B460490512F24782DD888DC7793FE>  ECHO SAMPLE ATTACHMENT
------=_Part_0_14898358.1111381066153-- 


The error during deserialization is 


faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: Deserializing parameter
&apos;RETAttach&apos;:  could not find deserializer for type
{http://xml.apache.org/axis/}Void
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}stackTrace:
org.xml.sax.SAXException: Deserializing parameter 'RETAttach':  could
not find deserializer for type {http://xml.apache.org/axis/}Void
	at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302)
	at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria
lizationContextImpl.java:963)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:
198)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j
ava:722)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
	at org.apache.axis.client.Call.invoke(Call.java:2273)
	at org.apache.axis.client.Call.invoke(Call.java:2172)
	at org.apache.axis.client.Call.invoke(Call.java:1692)
	at com.dorado.mor.client.ISClientRemote.callOperat...<snip>]
	at com.dorado.mor.log.LogUtil.rethrow(LogUtil.java:245)
	at
com.dorado.mor.client.ISClientRemote.callOperation(ISClientRemote.java:1
67)
	at
com.dorado.mor.client.ISClient.callOperation(ISClient.java:47)
	at com.dorado.mor.test.TestMain.doTest(TestMain.java:40)
	at com.dorado.mor.test.TestMain.main(TestMain.java:57)
Exception in thread "main" .


Why is Attachement not deserialized properly? What am I missing? 

Thanks for any help