You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by an...@attglobal.net on 2001/08/14 20:20:41 UTC

problem with mapping registry

I have the following situation:

I am calling a SOAP service that takes an input parameter and returns
one result element. Let's assume the input parameter is called "in" and
is of type string. Here is how this looks in the request envelope:
<in type="xsd:string">some input value</in>

The result is called "out" and is of type string, too. Seems that I
shouldn't have to do any type mapping, however, the service I am calling
returns the following in the response:
<out>some value</out>

instead of returning
<out type="xsd:string">some value</out>

So when calling the service, my SOAP client complains about a missing
deserializer for type "out". Okay, I though, let's add one with the
following line of code:
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "out"),
String.class, null, new StringDeserializer());

Works great, the response is now properly deserialized. However, my
request document now looks different. The request contains the
following:
<in xmlns:ns2="" xsi:type="ns2:out">the input value</in>

It looks as if the mapping of the deserializer with the String class
leads to a change in how the request parameter is serialized, by adding
a type that does not exist. Can someone explain this to me? How can I
work around this problem? I realize that I could interpret the return as
literal XML, however, that is not what I want to do unless I don't have
a choice.

Thanks in advance,
Andre