views:

61

answers:

2

I have a SOAP web service and I'm trying to figure how to save/log the last 10 requests for each user. Each user is required to send their user/pass in each request, so it's easy to know who the request originated from. With these last 10 requests saved, my goal is to develop some sort of page that will allow them to log-in with their credentials and view the raw request, the actual SOAP message, http header information, and anything relevant that I can think of.

The point is to allow people to troubleshoot their own connection issues instead of having to contact me each time they can't connect, have trouble formatting their request, etc....

My first thought was to store all this information in memory in a hashtable or something, but that may have scalability issues when we have hundreds/thousands of users hitting the web service.

We could use our database to store these requests. Instead of hitting the database each time, I may need to create some "buffer" mechanism that will only update the database after the buffer gets to a certain number of requests. Is there an existing library or mechanism that will do this?

We can't store these requests on the file system on the machine hosting the web service. Since these requests can potentially contain sensitive information, it's a business decision that I'll need to work around.

Or maybe there's a better way to achieve what I'm trying to do?

+2  A: 

I see two alternatives.

1.- Mix your two approaches: Create the hashtable in memory and, when it hits a limit (say, 1000 requests), push them to the database. No need for a special library for this. The hastable is your in memory buffer.

2.- Set up a totally different process sniffing the requests, and offer the clients to download the packet captures (or process and present them yourself.) This is arguably more work, but separates the request saving from your application. You could even then move the sniffer to another machine if load so demanded.

Vinko Vrsalovic
A: 

We use the open source tool Membrane SOA Monitor to capture and log SOAP calls. It works as a proxy or reverse proxy and can be placed at the client computer or somewhere between. It has a very comfortable GUI with XML formatter and syntax highlighting. It is also possible to store the requests using an interceptor. You can also programm an interceptor in Java and plug it into the monitor that reads out the username and logs the message to the disk.

SOAP Monitor

An other tool that can help you to troubleshoot Web Services problems with your uers is Membrane Registry. It is a Java Web Application where you can register the WSDLs of your services. The services are automatically monitored for performance and availability. You get also alerts over an Atom newsfeed about WSDL modifications that are also tracked by the tool. For testing it has a dynamic SOAP client.

baranco