Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending calls from SOAP files

 
ramesh agarwal
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 19
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    SAAJ downloaded independently versus the package that comes with JDK 1.6 - is there any difference?
     
    Ulf Dittmer
    Rancher
    Pie
    Posts: 42966
    73
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I think they're the same. SAAJ hasn't changed in some time.
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic