Hi there, I created an Ivy webservice, and now from the service, I want to capture the raw XML from SOAP Message that user requests to my webservice to save to save somewhere. Is there any method to do it in Ivy ? I did a bit research and it seems possible in pure Java Could you give me any idea ? Thanks. |
Answer for 6.4.1 or younger By default the request and response SOAP-ENVELOPE is logged to the runtimeLogger with the category web_service_process.
Answer for 6.0 until 6.4 This is possible by registering a LogginIn/Out Intercepter for the webservice technology that we use (CXF). See http://stackoverflow.com/questions/8065737/how-to-log-apache-cxf-soap-request-and-soap-response-using-log4j Unfortunately it seems like Designer users have no access to get into the relevant code parts to register custom interceptors. But I think that would be cool improvement for the future... For now I can provide you a patch where these logging interceptors are in use. Just tell me the ivy version where you need it and whether you need it for a designer or an engine. Hi Reguel, dyumao and me need it for IVY 6.0.4 Designer & Engine. Can you provide us this patch please? The following jars will print CXF soap envelops to the system.error stream: - patch for the engine: patch.jar (simply drop into the /lib/patch directory of the engine - plugin for the designer: webservice.jar (may difficult to replace. Try to remove the old plugin within the /plugins directory and copy this replacement into it. Start the designer again.) Thank you Reguel, we can log the SOAP request to our log file for now. But we're facing a problem, from the Interceptor Customizing, we can't make reference to our implementation, or at least Ivy variables. Do you have any idea about this ? Can you describe in detail what you would like to expose? I see that it would may be interesting to see stuff like the process-element PID, session user/id, or the application/pmv. But most of them are already visible by the existing web_service_process runtime log which is sent on INFO level. In SOAP Request, it has this data, <noun>NOUN_DATA</noun>. I want to save the SOAP Request to a separated file named (0)-(1)-(2).xml, with (0) is value from noun param, (1) is Ivy Case Id for the current Webservice request, and (2) is value from Ivy Global Variable. Do you have any idea to deal with this in the Interceptor implementation ? |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 20.10.2016 at 11:55
Seen: 3,221 times
Last updated: 07.03.2018 at 10:20