> -----Original Message-----
> From: Sergey Beryozkin [mailto:[email protected]]
> 
> jaxrs:binding is reserved for plugging in alternative binding
> implementations. For example it is the XMLBinding which is used by the
> JAXRS
> runtime under the hood.
> 
> Are the properties declared by jaxb:bindings meant to be set on JAXB
> Marshaller ? If yes then you can set a marshallerProperties map
> property on
> a JAXBElementProvider.

The following is an excerpt from an example I found in the CXF source
tree that shows the kind of things you might do in "jaxb:bindings":

--------------
<jaxws:bindings wsdlLocation="hello_world.wsdl"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
        xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        node="wsdl:definitions/wsdl:types/xsd:schema">
        <jaxb:bindings version="2.0"
node="xsd:eleme...@name='CreateProcess']/xsd:complexType/xsd:sequence/xs
d:eleme...@name='MyProcess']/xsd:simpleType">
                <jaxb:typesafeEnumClass name="MyProcess">
                        <jaxb:typesafeEnumMember name="BLUE"
value="BLUE" />
                        <jaxb:typesafeEnumMember name="RED" value="RED"
/>
                        <jaxb:typesafeEnumMember name="GREEN"
value="GREEN" />
                </jaxb:typesafeEnumClass>
        </jaxb:bindings>
</jaxws:bindings>
--------------

What I'm not sure about is whether these constructs just control code
generation, or whether it can be used to modify the XML structure that
is used when marshalling an instance to XML.

> KARR, DAVID (ATTCINW) wrote:
> >
> > If I need to customize the Java->XML binding by creating a
> > "jaxb:bindings" element, where would I put that?  Would it go in the
> > "jaxrs:bindings" element that is contained within the "jaxrs:server"
> > element?  If so, is this possible in 2.2.3, or only in the trunk?

Reply via email to