[jboss-user] [JBossWS] - Re: How to register SerializerFactory and DeSerializerFactor
czhao07
do-not-reply at jboss.com
Thu Mar 29 14:13:14 EDT 2007
I think I found the problem. The web service I need to call uses soap encoding style (http://schemas.xmlsoap.org/soap/encoding/), hence EncodedTypeMapping is used which registers type mapping for xsd:anyType as this:
// register mapping for xsd:anyType
registerInternal(SOAPElement.class, Constants.TYPE_SOAP11_ANYTYPE, new SOAPElementSerializerFactory(), new SOAPElementDeserializerFactory());
registerInternal(Element.class, Constants.TYPE_SOAP11_ANYTYPE, new ElementSerializerFactory(), new ElementDeserializerFactory());
In above code, it registers (De)SerializerFactory for a wrong QName. While the fix in LiteralTypeMapping is correct:
// register mapping for xsd:anyType
registerInternal(SOAPElement.class, Constants.TYPE_LITERAL_ANYTYPE, new SOAPElementSerializerFactory(), new SOAPElementDeserializerFactory());
registerInternal(Element.class, Constants.TYPE_LITERAL_ANYTYPE, new ElementSerializerFactory(), new ElementDeserializerFactory());
So I think the above lines of code should be moved to TypeMappingImpl.registerStandardLiteralTypes() in order to fix the problem with both literal and soap encoding styles.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032888#4032888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032888
More information about the jboss-user
mailing list