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 Rob Bugh <rb...@journee.com> on 2002/12/15 05:10:06 UTC

Deserialization Problem

Hello All,

  Can someone give me some advice regarding the following deserialization
error. See error message below.

My setup is as follows. Win2K with JDK1.3.1_02. I downloaded and unzipped
wsif-all-2.0alpha3.zip. I also downloaded activation.jar (v1.0.2) and
mail.jar (v1.3) and copied them into their respective locations under the
wsif-2.0alpha3/lib directory.

When I run the sample:

java complexsoap.client.dynamic.Run samples/complexsoap/Zip2Geo.wsdl 78729

I get the following error message.

-------------------------
AxisFault

faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: org.xml.sax.SAXException: Deserializing parameter
'GetLatLongResult':  could not find deserializer for type
{http://ws.cdyne.com}LatLongReturn
faultActor: null
faultDetail: stackTrace: org.xml.sax.SAXException: Deserializing parameter
'GetLatLongResult': could not find deserializer for type
{http://ws.cdyne.com}LatLongReturn
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.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:241)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
at org.apache.axis.client.Call.invoke(Call.java:1871)
at org.apache.axis.client.Call.invoke(Call.java:1777)
at org.apache.axis.client.Call.invoke(Call.java:1315)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeAXI
SDocStyle(Unknown  Source)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeReq
uestResponseOperationDocument(Unknown Source)
at
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.executeRe
questResponseOperation(Unknown Source)
at complexsoap.client.dynamic.Run.main(Unknown Source)
-------------------------

Peeking at the code (Run.java) it clearly is registering the LatLongReturn
type, i.e., calls

service.mapType(new QName("http://ws.cdyne.com","LatLongReturn"),
 
Class.forName("complexsoap.client.stub.com.cdyne.ws.LatLongReturn") );

If this sample is supposed to work then I guess I have a
configuration/installation problem. Any one else seen this problem?

Thanks,
Rob Bugh
Journee Software

Re: Deserialization Problem

Posted by Rob Bugh <rb...@journee.com>.

I think I've traced down the problem I'm having with the 
complexsoap.client.dynamic.Run sample. The problem I was seeing was a 
deserialization error on the output part of the operation which should not 
have happened because it was explicitly registered in the sample app 
(Run.java). The problem is due to the encodingStyle of the call object 
changing between the time the output part was registered and the call 
object invoked. Specifically, in the invokeRequestResponseOperationDocument 
method in 
org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis there is 
a section of code that looks like this (my comments are preceeded by "//  
<=="):

      Call call = wsifPort.getCall();  // <==call object created with 
default encodingStyle ="http://schemas.xmlsoap.org/soap/encoding/"

       // Make sure we're making a fresh start.
       call.removeAllParameters();
       call.clearHeaders();

       //TODO need to sort out the namespace  QName bindingQN = 
wsifPort.getBindingName();
       if (bindingQN != null) {
         setInputNamespace(bindingQN.getNamespaceURI());
       }

//     if (inputSOAPParts == null) {
        prepare(call);  // <== Registers the output part with AXIS. The 
TypeMapping object retrieved from AXIS to hold the mapping is keyed by the 
Call object's encodingStyleName.
//     }

       call.setSOAPActionURI(getSoapActionURI());
       call.setTargetEndpointAddress(wsifPort.getEndPoint());
       call.setEncodingStyle(null);  // <== Resets the encodingStyle to 
null. After the call completes the deserializer for the registered part is 
not found because AXIS is looking in the wrong TypeMapping.

So the question is should the encodingStyle be set to null? If so, maybe it 
should be set before the call to prepare(call).

Hope this helps,
Rob Bugh









On Sat, 14 Dec 2002 22:10:06 -0600, Rob Bugh <rb...@journee.com> wrote:

> Hello All,
>
> Can someone give me some advice regarding the following deserialization
> error. See error message below.
>
> My setup is as follows. Win2K with JDK1.3.1_02. I downloaded and unzipped
> wsif-all-2.0alpha3.zip. I also downloaded activation.jar (v1.0.2) and
> mail.jar (v1.3) and copied them into their respective locations under the
> wsif-2.0alpha3/lib directory.
>
> When I run the sample:
>
> java complexsoap.client.dynamic.Run samples/complexsoap/Zip2Geo.wsdl 
> 78729
>
> I get the following error message.
>
> -------------------------
> AxisFault
>
> faultCode: {http://xml.apache.org/axis/}Server.userException
> faultString: org.xml.sax.SAXException: Deserializing parameter
> 'GetLatLongResult':  could not find deserializer for type
> {http://ws.cdyne.com}LatLongReturn
> faultActor: null
> faultDetail: stackTrace: org.xml.sax.SAXException: Deserializing 
> parameter
> 'GetLatLongResult': could not find deserializer for type
> {http://ws.cdyne.com}LatLongReturn
> at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:276)
> at
> org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa 
>
> tionContextImpl.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:241)
> at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
> at org.apache.axis.client.Call.invoke(Call.java:1871)
> at org.apache.axis.client.Call.invoke(Call.java:1777)
> at org.apache.axis.client.Call.invoke(Call.java:1315)
> at
> org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeAXI 
>
> SDocStyle(Unknown Source)
> at
> org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeReq 
>
> uestResponseOperationDocument(Unknown Source)
> at
> org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.executeRe 
>
> questResponseOperation(Unknown Source)
> at complexsoap.client.dynamic.Run.main(Unknown Source)
> -------------------------
>
> Peeking at the code (Run.java) it clearly is registering the 
> LatLongReturn
> type, i.e., calls
>
> service.mapType(new QName("http://ws.cdyne.com","LatLongReturn"),
> Class.forName("complexsoap.client.stub.com.cdyne.ws.LatLongReturn") );
>
> If this sample is supposed to work then I guess I have a
> configuration/installation problem. Any one else seen this problem?
>
> Thanks,
> Rob Bugh
> Journee Software
>



-- 

Rob Bugh
Journee Software