java - JAXB generated classes serializable with JAX-WS binding -
having jaxb-ri , cxf. wsdl first. want generated class of mine implement serializable
. have following binding xml, works (the sei class name gets changed)
<jaxws:bindings xmlns:xsd="http://www.w3.org/2001/xmlschema" ...> <bindings node="wsdl:definitions/wsdl:porttype[@name='foo']"> <!-- change generated sei class --> <class name="ifooservice" /> </bindings> </jaxws:bindings>
no, in context, , should add. tried:
<xsd:annotation> <xsd:appinfo> <jaxb:globalbindings> <xjc:serializable uid="12343" /> </jaxb:globalbindings> </xsd:appinfo> </xsd:annotation>
and
<jxb:globalbindings> <jxb:serializable/> </jxb:globalbindings>
both inside , outside <bindings>
tag - either serializable
not added, or classes not generated @ (without error).
see this thread
so, how that
i made work in 2 ways:
using second binding file, jaxb-only, 1 pascal showed in his answer
by specifying
<bindings>
tag handles whole namespace:<bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetnamespace='http://www.yoursite.com/services/mynamespace']"> <jxb:globalbindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/xmlschema"> <jxb:serializable /> </jxb:globalbindings> </bindings>
Comments
Post a Comment