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 17:09:27 UTC

RE: Complex types within complex types serialization/deserialization[Scanned]

I agree axis would work in this instance as i started with this solution but the use of
AXIS breaks applet security policy, which is what we are designing. So i need another solution.

The untyped nature of MS SDK means that it does not qualify each element with its type so you would see entries like

<id>123</id> and not typed to an integer (or whatever)

mapTypes calls
mapTypes called in the B8DISPLAYCONTEXT structure which consists of 6 doubles only.
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "blX"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "blY"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "trX"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "trY"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "width"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "height"), null, null, new org.apache.soap.encoding.soapenc.DoubleDeserializer());

mapTypes called in the B8ELEMENTTILE structure which contains a string, a struct (B8DISPLAYCONTEXT), and 2 ints
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "url"), null, null, new org.apache.soap.encoding.soapenc.StringDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "imageInfo"), B8DisplayContext.class, null, new org.apache.soap.encoding.soapenc.BeanSerializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "repositoryID"), null, null, new org.apache.soap.encoding.soapenc.IntDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new org.apache.soap.util.xml.QName("", "mapLevelID"), null, null, new org.apache.soap.encoding.soapenc.IntDeserializer());

Input wire dump (ignore the '-'s they are put in by IE5)
 <?xml version="1.0" encoding="UTF-8" ?> 
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <ns1:GetImageIDs xmlns:ns1="http://blue8.uk.com/message/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <user xsi:type="xsd:string">mike.curtis</user> 
  <password xsi:type="xsd:string">mike.curtis</password> 
  <mapLevelID xsi:type="xsd:int">17</mapLevelID> 
- <viewContext xmlns:ns2="http://blue8.uk.com/type/" xsi:type="ns2:imageInfo">
  <blX xsi:type="xsd:double">10000.0</blX> 
  <blY xsi:type="xsd:double">10000.0</blY> 
  <height xsi:type="xsd:double">1000.0</height> 
  <trX xsi:type="xsd:double">20000.0</trX> 
  <trY xsi:type="xsd:double">20000.0</trY> 
  <width xsi:type="xsd:double">1000.0</width> 
  </viewContext>
  <imageID xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="xsd:string[]" xsi:nil="true" /> 
  </ns1:GetImageIDs>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Output wire dump (ignore the '-'s they are put in by IE5)
  <?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:GetImageIDsResponse xmlns:SOAPSDK4="http://blue8.uk.com/message/">
- <Result xmlns:SOAPSDK5="http://blue8.uk.com/type/" SOAPSDK3:arrayType="SOAPSDK5:B8ELEMENTTILE[1]" SOAPSDK3:offset="[0]" SOAPSDK2:type="SOAPSDK3:Array">
  <SOAPSDK5:B8ELEMENTTILE href="#id1" /> 
  </Result>
  </SOAPSDK4:GetImageIDsResponse>
- <SOAPSDK6:B8ELEMENTTILE xmlns:SOAPSDK6="http://blue8.uk.com/type/" id="id1" SOAPSDK3:root="0">
  <id>36438017</id> 
  <url>\\B8_ops\Development\data\maps\wh100\key/000001.GIF</url> 
  <imageInfo href="#id2" /> 
  <repositoryID>139</repositoryID> 
  <mapLevelID>17</mapLevelID> 
  </SOAPSDK6:B8ELEMENTTILE>
- <SOAPSDK7:B8DISPLAYCONTEXT xmlns:SOAPSDK7="http://blue8.uk.com/type/" id="id2" SOAPSDK3:root="0">
  <blX>0</blX> 
  <blY>0</blY> 
  <trX>100000</trX> 
  <trY>100000</trY> 
  <width>1000</width> 
  <height>1000</height> 
  </SOAPSDK7:B8DISPLAYCONTEXT>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

rgds

Ian Minshall

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: 15 October 2002 15:17
To: soap-user@xml.apache.org
Subject: Re: Complex types within complex types
serialization/deserialization[Scanned]


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>


--
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>.
Ian,

Do you also map Result, e.g.

        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "Result"), B8ElementTile.class, null,
new org.apache.soap.encoding.soapenc.BeanSerializer());

If so, it looks to me like Apache SOAP should be able to deserialize the
response.  If you do have this mapping and it does not deserialize,
could you post the stack trace from the SOAP exception?

As for the message you are sending, is the server handling the
parameters correctly?  STK 2 and .NET ignore parameters that have
xsi:type attributes when literal encoding is expected.  If you need to
send literal encoding (well, if you want to suppress the xsi:type
attributes), you can do so with a nightly build of Apache SOAP.  The
doclit sample shows how to specify "doc/lit" serialization by using the
new  call.setDocLitSerialization(true) method.  Caveat: don't be fooled
by the method name.  This is a hack for improving interop that is not
perfect; it merely suppresses xsi:type and encodingStyle attributes.

Scott Nichol

----- Original Message -----
From: "Ian Minshall" <ia...@blue8.uk.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 15, 2002 11:09 AM
Subject: RE: Complex types within complex types
serialization/deserialization[Scanned]


I agree axis would work in this instance as i started with this solution
but the use of
AXIS breaks applet security policy, which is what we are designing. So i
need another solution.

The untyped nature of MS SDK means that it does not qualify each element
with its type so you would see entries like

<id>123</id> and not typed to an integer (or whatever)

mapTypes calls
mapTypes called in the B8DISPLAYCONTEXT structure which consists of 6
doubles only.
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "blX"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "blY"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "trX"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "trY"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "width"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "height"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());

mapTypes called in the B8ELEMENTTILE structure which contains a string,
a struct (B8DISPLAYCONTEXT), and 2 ints
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "url"), null, null, new
org.apache.soap.encoding.soapenc.StringDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "imageInfo"), B8DisplayContext.class,
null, new org.apache.soap.encoding.soapenc.BeanSerializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "repositoryID"), null, null, new
org.apache.soap.encoding.soapenc.IntDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "mapLevelID"), null, null, new
org.apache.soap.encoding.soapenc.IntDeserializer());

Input wire dump (ignore the '-'s they are put in by IE5)
 <?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <ns1:GetImageIDs xmlns:ns1="http://blue8.uk.com/message/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <user xsi:type="xsd:string">mike.curtis</user>
  <password xsi:type="xsd:string">mike.curtis</password>
  <mapLevelID xsi:type="xsd:int">17</mapLevelID>
- <viewContext xmlns:ns2="http://blue8.uk.com/type/"
xsi:type="ns2:imageInfo">
  <blX xsi:type="xsd:double">10000.0</blX>
  <blY xsi:type="xsd:double">10000.0</blY>
  <height xsi:type="xsd:double">1000.0</height>
  <trX xsi:type="xsd:double">20000.0</trX>
  <trY xsi:type="xsd:double">20000.0</trY>
  <width xsi:type="xsd:double">1000.0</width>
  </viewContext>
  <imageID xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Array" ns3:arrayType="xsd:string[]" xsi:nil="true" />
  </ns1:GetImageIDs>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Output wire dump (ignore the '-'s they are put in by IE5)
  <?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:GetImageIDsResponse
xmlns:SOAPSDK4="http://blue8.uk.com/message/">
- <Result xmlns:SOAPSDK5="http://blue8.uk.com/type/"
SOAPSDK3:arrayType="SOAPSDK5:B8ELEMENTTILE[1]" SOAPSDK3:offset="[0]"
SOAPSDK2:type="SOAPSDK3:Array">
  <SOAPSDK5:B8ELEMENTTILE href="#id1" />
  </Result>
  </SOAPSDK4:GetImageIDsResponse>
- <SOAPSDK6:B8ELEMENTTILE xmlns:SOAPSDK6="http://blue8.uk.com/type/"
id="id1" SOAPSDK3:root="0">
  <id>36438017</id>
  <url>\\B8_ops\Development\data\maps\wh100\key/000001.GIF</url>
  <imageInfo href="#id2" />
  <repositoryID>139</repositoryID>
  <mapLevelID>17</mapLevelID>
  </SOAPSDK6:B8ELEMENTTILE>
- <SOAPSDK7:B8DISPLAYCONTEXT xmlns:SOAPSDK7="http://blue8.uk.com/type/"
id="id2" SOAPSDK3:root="0">
  <blX>0</blX>
  <blY>0</blY>
  <trX>100000</trX>
  <trY>100000</trY>
  <width>1000</width>
  <height>1000</height>
  </SOAPSDK7:B8DISPLAYCONTEXT>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

rgds

Ian Minshall

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: 15 October 2002 15:17
To: soap-user@xml.apache.org
Subject: Re: Complex types within complex types
serialization/deserialization[Scanned]


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>


--
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>.
Ian,

Do you also map Result, e.g.

        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "Result"), B8ElementTile.class, null,
new org.apache.soap.encoding.soapenc.BeanSerializer());

If so, it looks to me like Apache SOAP should be able to deserialize the
response.  If you do have this mapping and it does not deserialize,
could you post the stack trace from the SOAP exception?

As for the message you are sending, is the server handling the
parameters correctly?  STK 2 and .NET ignore parameters that have
xsi:type attributes when literal encoding is expected.  If you need to
send literal encoding (well, if you want to suppress the xsi:type
attributes), you can do so with a nightly build of Apache SOAP.  The
doclit sample shows how to specify "doc/lit" serialization by using the
new  call.setDocLitSerialization(true) method.  Caveat: don't be fooled
by the method name.  This is a hack for improving interop that is not
perfect; it merely suppresses xsi:type and encodingStyle attributes.

Scott Nichol

----- Original Message -----
From: "Ian Minshall" <ia...@blue8.uk.com>
To: <so...@xml.apache.org>
Sent: Tuesday, October 15, 2002 11:09 AM
Subject: RE: Complex types within complex types
serialization/deserialization[Scanned]


I agree axis would work in this instance as i started with this solution
but the use of
AXIS breaks applet security policy, which is what we are designing. So i
need another solution.

The untyped nature of MS SDK means that it does not qualify each element
with its type so you would see entries like

<id>123</id> and not typed to an integer (or whatever)

mapTypes calls
mapTypes called in the B8DISPLAYCONTEXT structure which consists of 6
doubles only.
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "blX"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "blY"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "trX"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "trY"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "width"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "height"), null, null, new
org.apache.soap.encoding.soapenc.DoubleDeserializer());

mapTypes called in the B8ELEMENTTILE structure which contains a string,
a struct (B8DISPLAYCONTEXT), and 2 ints
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "url"), null, null, new
org.apache.soap.encoding.soapenc.StringDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "imageInfo"), B8DisplayContext.class,
null, new org.apache.soap.encoding.soapenc.BeanSerializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "repositoryID"), null, null, new
org.apache.soap.encoding.soapenc.IntDeserializer());
        smr.mapTypes(org.apache.soap.Constants.NS_URI_SOAP_ENC, new
org.apache.soap.util.xml.QName("", "mapLevelID"), null, null, new
org.apache.soap.encoding.soapenc.IntDeserializer());

Input wire dump (ignore the '-'s they are put in by IE5)
 <?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <ns1:GetImageIDs xmlns:ns1="http://blue8.uk.com/message/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <user xsi:type="xsd:string">mike.curtis</user>
  <password xsi:type="xsd:string">mike.curtis</password>
  <mapLevelID xsi:type="xsd:int">17</mapLevelID>
- <viewContext xmlns:ns2="http://blue8.uk.com/type/"
xsi:type="ns2:imageInfo">
  <blX xsi:type="xsd:double">10000.0</blX>
  <blY xsi:type="xsd:double">10000.0</blY>
  <height xsi:type="xsd:double">1000.0</height>
  <trX xsi:type="xsd:double">20000.0</trX>
  <trY xsi:type="xsd:double">20000.0</trY>
  <width xsi:type="xsd:double">1000.0</width>
  </viewContext>
  <imageID xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:Array" ns3:arrayType="xsd:string[]" xsi:nil="true" />
  </ns1:GetImageIDs>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Output wire dump (ignore the '-'s they are put in by IE5)
  <?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:GetImageIDsResponse
xmlns:SOAPSDK4="http://blue8.uk.com/message/">
- <Result xmlns:SOAPSDK5="http://blue8.uk.com/type/"
SOAPSDK3:arrayType="SOAPSDK5:B8ELEMENTTILE[1]" SOAPSDK3:offset="[0]"
SOAPSDK2:type="SOAPSDK3:Array">
  <SOAPSDK5:B8ELEMENTTILE href="#id1" />
  </Result>
  </SOAPSDK4:GetImageIDsResponse>
- <SOAPSDK6:B8ELEMENTTILE xmlns:SOAPSDK6="http://blue8.uk.com/type/"
id="id1" SOAPSDK3:root="0">
  <id>36438017</id>
  <url>\\B8_ops\Development\data\maps\wh100\key/000001.GIF</url>
  <imageInfo href="#id2" />
  <repositoryID>139</repositoryID>
  <mapLevelID>17</mapLevelID>
  </SOAPSDK6:B8ELEMENTTILE>
- <SOAPSDK7:B8DISPLAYCONTEXT xmlns:SOAPSDK7="http://blue8.uk.com/type/"
id="id2" SOAPSDK3:root="0">
  <blX>0</blX>
  <blY>0</blY>
  <trX>100000</trX>
  <trY>100000</trY>
  <width>1000</width>
  <height>1000</height>
  </SOAPSDK7:B8DISPLAYCONTEXT>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

rgds

Ian Minshall

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: 15 October 2002 15:17
To: soap-user@xml.apache.org
Subject: Re: Complex types within complex types
serialization/deserialization[Scanned]


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>


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