[jboss-user] [JBossWS] - custom java type mapping in WS in JBoss

mpelze do-not-reply at jboss.com
Wed Oct 22 08:31:13 EDT 2008


is it possible to customize the JAXB mapping Jboss uses when deserializing an incoming SOAP message for a web service or serializing an outgoing message?

My problem is that I want to send and receive maps containing lists over a web service (implemented as EJB stateless session bean annotated as @WebService) in JBoss. JBoss uses jax-ws for web services and jax-ws uses jaxb for mapping Java classes to XML structures. Jaxb is not able to handle maps containing lists, so I have to define a custom mapping providing custom serializers / deserializers. I found out that there is the possibility in jaxb to write a configuration file for custom mappings that can look like this:

<bindings xmlns="http://java.sun.com/xml/ns/jaxb" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  | 	<globalBindings>
  | 		<javaType name="my.package.MyClas" xmlType="xs:someName"
  | 			parseMethod="my.package.MyParser.parse"
  | 			printMethod="my.package.MyParser.print"
  | 		/>
  | 	</globalBindings>
  | </bindings>

Ist there a possibility to provide such a file to JBoss so that it will be used when (de-)serializing SOAP messages for or from my web services?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183830#4183830

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183830

More information about the jboss-user mailing list