Hello again,

I've looked through all the documentation I can find (javadoc is pretty sparse!) and I can't find a good concise description of the javaType parameter of the SOAPMappingRegistry.mapTypes() method.

In this example the meaning seems quite clear - use the beanSerializer to serialize classes of type LoginParam:

mapTypes(Constants.NS_URI_SOAP_ENC,
         new QName(OBJECT_NAMESPACE, "LoginParam"),
         LoginParam.class, beanSerializer, null);


But I had to write a specialized integer deserializer because a session id is returned as an integer much larger than 32bit. So if it's a loginResponse I need to return a string, otherwise return integers as integers:


mapTypes(Constants.NS_URI_SOAP_ENC,
         new QName(Constants.NS_URI_2001_SCHEMA_XSD, "int"),
         int.class, null, new Int2StrDeserializer());


So the Int2StrDeserializer may return an int or a string, so what is the int.class parameter saying here. It works like this but I don't fully understand why. If anyone can shed some light I'd be grateful.


Thanks,
Barry





Reply via email to