is there an easy way (via the API) in CXF to associate a class with a
service JAXB context?

Do you mean, a way to add the package containing your class to the list of
packages passed to JAXBContext.newInstance() used for marshalling the
request?

yes

Well, one way would be to use the JAX-WS Dispatch mechanism, which allows
you to explicitly associate a JAXBContext via
javax.xml.ws.Service.createDispatch() [2]


Thanks. Dispatch could be the answer. Typically, I want to create an instance of something I can invoke given just an EPR, and also configure the RequestContext. Looks like

public Dispatch<Object> createDispatch(EndpointReference endpointReference,
                                           JAXBContext context,
                                           Mode mode,
WebServiceFeature... features)

could be the number.

cheers,

Andrew

Reply via email to