0

I created a Soap web service. Now I want to fetch all the details of the request and response in that web service using another application. It's not like hacking. We can say that its like monitoring. But how can we write a separate application to fetch the details from a soap web service without the knowledge of both the client and the server?

Can anybody please send me the code for the above mentioned problem or send me a link where I can find a solution for the same?

halfer
  • 19,824
  • 17
  • 99
  • 186
  • As per [your most recent question](https://stackoverflow.com/questions/50207384/how-can-we-implement-packet-sniffing-in-web-services), this appears to be a request for code or free labour, and neither of those are usually well-received here. If you can, I suggest you rewrite it to show what research you have done, and what sort of web service you have written to test your monitoring solution. – halfer May 07 '18 at 21:59

1 Answers1

1

Use TCPMon from Apache Axis SOAP API. It's specifically developed for use cases like yours.

This link has all the details.

halfer
  • 19,824
  • 17
  • 99
  • 186
Red Boy
  • 5,429
  • 3
  • 28
  • 41
  • But its a feature inside Eclipse IDE right.But I want to code a java program separately to intercept the request and response in a soap web service.I have used interceptor inside the program itself.But its not the user story I have to work with.We should create a separate java application to fetch/monitor/intercept the request and response details.Can you please help me out for this? –  May 04 '18 at 06:16
  • I'm sorry, I couldn't understand fully, what your are trying to do. If you are not interested in SoapHandler/Interceptor, the only way its possible to use Proxy, so that your all traffic pass through the Proxy and you could interception/monitor and TCPMon is nothing but a separate Java App that acts as Proxy. Similarly, you could use Apache/Nginx web server to traffic In/Out traffic passing through it and finally going to your Tomcat or Application server where SOAP service hosted. Even web-server/proxy doesn't work, you may need to phrase your question for others to understand. – Red Boy May 04 '18 at 06:32
  • I think the below mentioned is what i meant...but i need a separate java program to track/intercept/monitor a web service ...Please find the below link and help me by sending a code (Which is separate.Like another java program.Not like adding some piece of code in our existing web service code) to intercept the request and response in a web service...https://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws –  May 04 '18 at 06:38
  • But...can you please send me the code for your above mentioned method.I mean proxy method?I tried getting the code by couldn't able to find it.Please do send me the java code for proxy method to intercept the soap web service request and response details. Thank You –  May 04 '18 at 06:58
  • Interesting but people there talking about the same program, its nothing but built in javax.ws system logging utilities, while what your looking for is external program, and external program is abstract word if think in deep. e.g Tomcat is nothing but a public void static main program written in Java, so technically you may or may not call it external program. Anyways external program can't be possible until and unless its Proxy which seems you are not interested in. I don't know if I could help you. Thanks. – Red Boy May 04 '18 at 06:59
  • thank you so much for your time to reply for my query.I request you to send me the proxy method code as soon as possible..Once again Thank You... –  May 04 '18 at 07:08
  • @LalithaPG I have provided a link in above answer, if you need code of TCMMon, you could download source code from Apache WS liberary and extend the same class to make changes if needed. Otherwise its fully functional source code provided by Apache only. You could find it here https://ws.apache.org/tcpmon/source-repository.html – Red Boy May 04 '18 at 09:07