aspose file tools
The moose likes Web Services and the fly likes Sending calls from SOAP files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Sending calls from SOAP files" Watch "Sending calls from SOAP files" New topic
Author

Sending calls from SOAP files

ramesh agarwal
Greenhorn

Joined: Jun 10, 2008
Posts: 19
I have a web service running on a service.

I also have 10 XML files that have SOAP messages in them.

I want to use some API that can read a SOAP XML file, build and invoke a request and print the response.

To build such a simple utility which API do I use?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12268
    
    1
It sounds like you could use the standard Java library methods for creating HTTP requests.

Study the java.net package URLConnection and HttpURLConnection classes.

Bill


Java Resources at www.wbrogden.com
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
As Billl said, you can use HttpClient provided by apache. It's more comprehensive and easy to use than java.net package. You can set the the soap envelope as request body and different http header. After executing http method you will get SOAP response envelope as http response.


SCJP 1.5(97%) My Blog
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
If you have one of the following requirements:
  • Perform validation or additional processing of SOAP messages prior to sending requests.
  • Use the Dispatch mechanism to send request and receive response.
  • Use SAAJ to send request and receive response.


  • Then you can use SAAJ to read SOAP messages from the file(s):

    Best wishes!
    ramesh agarwal
    Greenhorn

    Joined: Jun 10, 2008
    Posts: 19
    Thanks everyone.

    Yes. I was looking for something more than a HTTP API, and wanted to be within the SOAP framework.

    Will use SAAJ.
    ramesh agarwal
    Greenhorn

    Joined: Jun 10, 2008
    Posts: 19
    SAAJ downloaded independently versus the package that comes with JDK 1.6 - is there any difference?
    Ulf Dittmer
    Marshal

    Joined: Mar 22, 2005
    Posts: 35243
        
        7
    I think they're the same. SAAJ hasn't changed in some time.


    Android appsImageJ pluginsJava web charts
     
    I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
     
    subject: Sending calls from SOAP files
     
    Similar Threads
    Calling a ColdFusion Web Service method
    soap change prefix for response
    Attaching an XML Message to the SoapBody
    Writing a web service to read XML message
    Generate Soap xml from WSDL