Discussion:
Need simple code to get SOAP XML request/response
Arnold Morein
2018-09-11 02:20:35 UTC
Permalink
I’ve reviewed the intercepter framework and tried my hand at it, as well as using code from both the CXF library of examples and lots other peoples attempts, but all to no avail.

The problem I am encountering is that the complexity of these situations:

I need an in and out interceptor for web service CLIENTS
Some clients are SOAP 1.1
Some clients are SOAP 1.2
I need an in and out interceptor for web service SERVERS
Some servers are SOAP 1.1
Some servers are SOAP 1.2

So it would appear I need eight intercepters?! The reason I bring these up is the example code seemed to be working but not if the client was SOAP 1.1. Don’t ask me why but there was some subtle SAAJ stuff going on.

I need to capture the initial XML in or out (the request), log it to a database table, store that record id as a property in the exchange, and then have the response XML return the same exchange property so that the two records can be tied together.

As I said, I had something working but it broke when I hit the next service client and I couldn’t figure out why until I stumbled across the fact that it was SOAP 1.1.

I do not need to alter the message or the security of the XML (beyond adding the id property).

I just want to capture the XML. Can someone PLEASE just give me the barest-boned simple logic to do this? Can it be two simple classes or can I get it down to four?

Thanks.

Continue reading on narkive:
Loading...