• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Code to get SOAP request

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I am doing a Sample Calculator Webservice Application using JAX-WS .

I making a request to Webservice from servlet, It is working

demo.CalAddService service = new demo.CalAddService();
demo.CalAdd port = service.getCalAddPort();
int result = port.add(a, b);
out.println("Result = "+result);
--------------------------------------------------------------------------
My WebService Code :

@WebService()
public class CalAdd {

@WebMethod(operationName = "add")
public int add(@WebParam(name = "a")
int a, @WebParam(name = "b")
int b) {
return a+b;
}

}


But I would like to catch the SOAP request, can we get ? , if, could you please tell the code to catch the SOAP XML request
 
Master Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "catch a SOAP request"? If you mean watching it in transit, you can use a tool like tcpmon (on dev.java.net) or SoapUI (on SourceForge).
 
ashok ballu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply.

like ,I want SOAP XML response, actually, I am going to give a seminar on Webservices, so it is better to give seminar with live examples......., that's why I am trying to read the SOAP request/response..... through the code

for WSDL we can shown,
But ,for SOAP XML request/response ?
 
Ulf Dittmer
Master Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use one of the tools I mentioned; they can show SOAP requests and responses.
 
ashok ballu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I downloaded SoapUI tool, Now Iam able to view the Soap messages, can we also see http request wich conssists of SOAP reuest message
 
Ulf Dittmer
Master Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at the SOAPUI GUI, I see the HTTP request headers displayed in the lower left. The HTTP request is nothing more than the HTTP headers plus the HTTP body (which consists of nothing but the SOAP request). So all the information is right there; what else are you looking for?

The docs also mention tcpmon integration, if you prefer that kind of view. But it wouldn't show anything that SOAPUI doesn't show as well.
 
ashok ballu
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much, I also found http request/response + SOAP message in SOAPUI tool through raw option

May i know something about yourself?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic