-
Aug 6th, 2008, 02:58 PM
#1
How to exclude an endpoint from GenericMarshallingMethodEndpointAdapter ?
I currently have a number of annotation based endpoints that are using GenericMarshallingMethodEndpointAdapter configured to marshall jaxb objects
I want to add an additional Endpoint that does not use jaxb, rather dom4j instead. I also want to continue using PayloadRootAnnotation to support multiple methods within the Endpoint and the following method suffices.
atPayloadRoot(localPart = SUBMIT_AUTH_REQUEST, namespace = CP_SERVICE_NAMESPACE)
public Source submitAuthRequest(Source request) throws DatatypeConfigurationException {
Document document=null;
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
DocumentResult result = new DocumentResult();
transformer.transform(request, result);
document = result.getDocument();
} catch (TransformerConfigurationException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
If I disable GenericMarshallingMethodEndpointAdapter within ws-servlet.xml the above method is invoked and all is well. However, the Endpoints that use jaxb no longer can work since no marshaller is defined. If I invoke the method above with GenericMarshallingMethodEndpointAdapter I receive the following "No adapter for endpoint [public javax.xml.transform.Source org.cvc.click.endpoint.CpServicesEndpoint.submitAu thRequest(javax.xml.transform.Source) throws javax.xml.datatype.DatatypeConfigurationException]: Does your endpoint implement a supported interface like MessageHandler or PayloadEndpoint?".
This is obvious since the Source object is not a jaxb element.
Is it possible to mix endpoint types in a given context?
How do I configure my spring-ws-servlet to exclude an Endpoint from marshalling jaxb when using GenericMarshallingMethodEndpointAdapter ?
Any alternative suggestions appreciated.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules