This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes How to catch a request SOAP message? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to catch a request SOAP message?" Watch "How to catch a request SOAP message?" New topic
Author

How to catch a request SOAP message?

Pablo Zuazua
Greenhorn

Joined: Feb 07, 2012
Posts: 6
Hi everyone, I'm building a web application that will receive a SOAP message and will reply with another SOAP message. The SOAP message I will receive from a external provider is like the next one:


and the response it's like this:



I'm able to send the response, you can check it here: Webpage. But I don´t know how to catch the request SOAP message, ¿how can I obtain it?, because I must store some of the data of the message.

I know my solution it's not the best but I had to built it fast, particularly the sending message part.
Thanks in advance.

PD: I'm using JAVA, jsp, NetBeans and Tomcat.
Pablo Zuazua
Greenhorn

Joined: Feb 07, 2012
Posts: 6
I already solved this issue, I did what it follows:

I created a servlet that it's gonna be the entry point.
  • This servlet intercepts the message.
  • I use the request object to get the InputStream.


  • Then I have to change the content to a String.



  • Now I can extract the data I want from the String.
  • And last I serve the response.



  • Maybe this helps someone who has the same problem or similar.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: How to catch a request SOAP message?
     
    Similar Threads
    SOAP Header problem SAAJ
    SOAP Request and Response problem
    Spring-ws client with Jax-ws web service
    Issues while creating a SOAP message
    namespace mismatch in webservice