In my web application, I need to log all the SOAP messages to my SQL 2005 database whenever I make a web service call to my business partners' web service. How do I accomplish that?
Thanks in Advance,
Tony
In my web application, I need to log all the SOAP messages to my SQL 2005 database whenever I make a web service call to my business partners' web service. How do I accomplish that?
Thanks in Advance,
Tony
You haven't specified what language you are using but assuming C# / .NET you could use SOAP extensions.aspx) to get the SOAP content as a string and then use a simple INSERT to add to an arbitrary DB table.
There are probably far more elegant methods but I've implemented the above and it works fine.
Just remember to have a large column size in the DB table since the SOAP output could potentially be large.
Note: seems to be a bug in stackoverflow - the URL is: http://msdn.microsoft.com/en-us/library/esw638yk(VS.71).aspx
The sample of logging all the traffic for the web service from MSDN
You may also want to take a look at responses to this question => How do I get access to SOAP response
Consider using Log4net configured with an Appender that targets the database table.