Sally Naga
2011-08-15 17:10:42 UTC
Hello,
I consider myself as a beginner in CXF so pardon me if these are naive questions.
We are using CXF to expose a java service/api as a soap webservice. The service works well accepting an incoming soap request, unmarshalling to java objects, exeuting the webmethod and marshalling the xml response.
Now, I have a requirement to intercept the response soapbody, pass the xml to a 3rd party transformer api. The transformer will return new xml and this needs to be replaced and returned as soapbody (instead of the default one generated from return objects).
The pseudo code for the requirement is as follows:
String strResponseBody = GetSoapBodyForResponse();
String strNewResponseBody = thirdPartyTransformer.transform(strResponseBody);
SetOutSoapBodyContent(strNewResponseBody);
I must extract and replace the response soap body in xml format and cannot transform at the java object level.
What phase should this interceptor intercept and in what order? What base interceptor class should be used? What would be the api's to extract and set soap body content for response?
Thank you
Sally
I consider myself as a beginner in CXF so pardon me if these are naive questions.
We are using CXF to expose a java service/api as a soap webservice. The service works well accepting an incoming soap request, unmarshalling to java objects, exeuting the webmethod and marshalling the xml response.
Now, I have a requirement to intercept the response soapbody, pass the xml to a 3rd party transformer api. The transformer will return new xml and this needs to be replaced and returned as soapbody (instead of the default one generated from return objects).
The pseudo code for the requirement is as follows:
String strResponseBody = GetSoapBodyForResponse();
String strNewResponseBody = thirdPartyTransformer.transform(strResponseBody);
SetOutSoapBodyContent(strNewResponseBody);
I must extract and replace the response soap body in xml format and cannot transform at the java object level.
What phase should this interceptor intercept and in what order? What base interceptor class should be used? What would be the api's to extract and set soap body content for response?
Thank you
Sally