You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Ian Minshall <ia...@blue8.uk.com> on 2002/10/15 14:38:11 UTC

Complex types within complex types serialization/deserialization

I have a problem with a complex type going into and out of a SOAP routine in that it will not deserialize the resulting structure.

The setup is ..

I have a structure - DISPLAYCONTEXT that is send to a rpc service. This service returns another structure, ELEMENT, that contains a DISPLAYCONTEXT structure. So in effect I have

DISPLAYCONTEXT { int x; int y; }   (as the input parameter)
ELEMENT { int z; String s; DISPLAYCONTEXT dc; }    (as the output parameter)
They are both configured as JavaBeans.

The problem is in mapping the types in the call. If i map the DISPLAYCONTEXT and the returned 'dc' using SMR.mapTypes(), both as beans, then the SOAP client complains that it there is no deserializer for 'dc'. If i try any other way of mapping them i get the same message. Note it doesnt work if i only map it once as a bean.

It seems that you can only map ONE class per call. i.e.  i require to map the same class twice (one for the output and one for the input), but the mapping registry will only look for one and ignore the other causing an error on deserialization.

Is there a correct way of mapping this ... or is it a bug in SOAP 2.3.1 ??

MS SDK v3 returns a correct XML response.

Client is Apache SOAP 3.2.1, Server is MS SDK v3 (untyped).

rgds

Ian Minshall

I 

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Complex types within complex types serialization/deserialization

Posted by Scott Nichol <sn...@scottnichol.com>.
I am not certain what "Server is MS SDK v3 (untyped)" means, or more
specifically, what "(untyped)" means.  Does that mean the server uses
literal encoding of messages?  If so, you should understand that Apache
SOAP has a couple of hacks to help it work in literal environments, but
does not have a full implementation.  If you need to work with literal
encoding, you would do well to switch from Apache SOAP to Axis
(http://xml.apache.org/axis), which has much more complete support for
this.

If you want to resolve the issue you are having with Apache SOAP, could
you please post the mapTypes calls you are making?  Also, wire dumps of
the SOAP messages would be of great help.

Scott Nichol
----- Original Message -----
From: "Ian Minshall" <ia...@blue8.uk.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 15, 2002 8:38 AM
Subject: Complex types within complex types
serialization/deserialization


I have a problem with a complex type going into and out of a SOAP
routine in that it will not deserialize the resulting structure.

The setup is ..

I have a structure - DISPLAYCONTEXT that is send to a rpc service. This
service returns another structure, ELEMENT, that contains a
DISPLAYCONTEXT structure. So in effect I have

DISPLAYCONTEXT { int x; int y; }   (as the input parameter)
ELEMENT { int z; String s; DISPLAYCONTEXT dc; }    (as the output
parameter)
They are both configured as JavaBeans.

The problem is in mapping the types in the call. If i map the
DISPLAYCONTEXT and the returned 'dc' using SMR.mapTypes(), both as
beans, then the SOAP client complains that it there is no deserializer
for 'dc'. If i try any other way of mapping them i get the same message.
Note it doesnt work if i only map it once as a bean.

It seems that you can only map ONE class per call. i.e.  i require to
map the same class twice (one for the output and one for the input), but
the mapping registry will only look for one and ignore the other causing
an error on deserialization.

Is there a correct way of mapping this ... or is it a bug in SOAP 2.3.1
??

MS SDK v3 returns a correct XML response.

Client is Apache SOAP 3.2.1, Server is MS SDK v3 (untyped).

rgds

Ian Minshall

I

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Complex types within complex types serialization/deserialization

Posted by Scott Nichol <sn...@scottnichol.com>.
I am not certain what "Server is MS SDK v3 (untyped)" means, or more
specifically, what "(untyped)" means.  Does that mean the server uses
literal encoding of messages?  If so, you should understand that Apache
SOAP has a couple of hacks to help it work in literal environments, but
does not have a full implementation.  If you need to work with literal
encoding, you would do well to switch from Apache SOAP to Axis
(http://xml.apache.org/axis), which has much more complete support for
this.

If you want to resolve the issue you are having with Apache SOAP, could
you please post the mapTypes calls you are making?  Also, wire dumps of
the SOAP messages would be of great help.

Scott Nichol
----- Original Message -----
From: "Ian Minshall" <ia...@blue8.uk.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 15, 2002 8:38 AM
Subject: Complex types within complex types
serialization/deserialization


I have a problem with a complex type going into and out of a SOAP
routine in that it will not deserialize the resulting structure.

The setup is ..

I have a structure - DISPLAYCONTEXT that is send to a rpc service. This
service returns another structure, ELEMENT, that contains a
DISPLAYCONTEXT structure. So in effect I have

DISPLAYCONTEXT { int x; int y; }   (as the input parameter)
ELEMENT { int z; String s; DISPLAYCONTEXT dc; }    (as the output
parameter)
They are both configured as JavaBeans.

The problem is in mapping the types in the call. If i map the
DISPLAYCONTEXT and the returned 'dc' using SMR.mapTypes(), both as
beans, then the SOAP client complains that it there is no deserializer
for 'dc'. If i try any other way of mapping them i get the same message.
Note it doesnt work if i only map it once as a bean.

It seems that you can only map ONE class per call. i.e.  i require to
map the same class twice (one for the output and one for the input), but
the mapping registry will only look for one and ignore the other causing
an error on deserialization.

Is there a correct way of mapping this ... or is it a bug in SOAP 2.3.1
??

MS SDK v3 returns a correct XML response.

Client is Apache SOAP 3.2.1, Server is MS SDK v3 (untyped).

rgds

Ian Minshall

I

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>