-
1. Re: How to log WS response message
objectiser Jul 16, 2015 9:15 AM (in response to horyna)The message that is logged is based on the information provided by the specific event hook (i.e. switchyard event listener). So in the case of the response, at the point the event listener is triggered, the exchange contains a Java object. This is then transformed as part of the binding when returning the response to the client.
One thing you could try, is to define a transformer in the ip.json for the returned type (my.packages.OperationOutput) using an mvel expression that invokes a utility (that you would need to provide) to transform the message content into XML. If the utility classes are packages in the same war as the ip.json, then it should work - although I've not actually tried this out.
-
2. Re: How to log WS response message
horyna Jul 16, 2015 9:43 AM (in response to objectiser)So bad
Is it possible to define some listener which will be activated on activity creating to edit it? Or define a custom switchyard listener with will create and record self activity? My next idea was create and record my self activity in soa.composer.decompose - but aktivity unit is already closed and newly created record has new unit ID
-
3. Re: How to log WS response message
objectiser Jul 16, 2015 10:14 AM (in response to horyna)The switchyard listener mechanism used in rtgov is a separate component (which can be undeployed), so if you find a more appropriate interceptor point for your needs, then you could write your own listener and create the same types of rtgov activity events.
The code used by RTGov to listener for switchyard events and report them as activity events is here: https://github.com/Governance/rtgov/tree/master/integration/switchyard/src/main/java/org/overlord/rtgov/internal/switchyard
-
4. Re: How to log WS response message
horyna Jul 17, 2015 2:22 AM (in response to objectiser)May be is not a bad idea somehow consider to log WS payload after SW composers are finish. Our need is just log request/response how its come/leaves the server - within one activity unit. Some of this can i do with custom code (like you mention above). But SW composer (decompose method) is executed AFTER activity unit is closed - and at this point i have no chance to log server response into same activity unit. Or am i wrong? Can i somehow control the activity unit end?
-
5. Re: How to log WS response message
horyna Jul 17, 2015 2:12 AM (in response to horyna)I was looking for some events with Switchyard fire after calling message composer, but it looks like there are no one ...
-
6. Re: How to log WS response message
objectiser Jul 17, 2015 4:24 AM (in response to horyna)That is why in my previous response I said that you should replace the current overlord-rtgov-switchyard.war with your own integration with switchyard - then you are in control of when the activity unit starts and ends.
-
7. Re: How to log WS response message
horyna Jul 28, 2015 3:49 AM (in response to horyna)I need to replace ExchangeCompletionEventProcessor with me own. Any possibility? After looks into EventProcessorManager i dont see any chance.
-
8. Re: How to log WS response message
objectiser Jul 28, 2015 6:34 AM (in response to horyna)As mentioned before, simply take a copy of ALL of the code in the overlord-rtgov-switchyard.war module (rtgov/integration/switchyard at master · Governance/rtgov · GitHub) and build your own version of that war making whatever code changes you want.