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 sample for sending a raw SOAP message to a service? 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 "sample for sending a raw SOAP message to a service?" Watch "sample for sending a raw SOAP message to a service?" New topic
Author

sample for sending a raw SOAP message to a service?

Jeff Boucher
Greenhorn

Joined: Aug 18, 2008
Posts: 14
Hi,

I've looked at a number of examples that show how to use a client-api for sending a SOAP message to a service, as well as how to view the incoming SOAP message as XML... however, I've looked around and haven't been able to find a simple case where creates a SOAP message as raw XML and submits it directly to the service (maybe as a post?) Does anyone know of samples out there where this is done?

Thanks!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
As you said, it's just an HTTP POST of some text, so something like this should work.


Ping & DNS - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Here is what I used, where the reqT object reads a text template of the SOAP message and fills in a couple of values. The main things here are to get the various HttpURLConnection parameters set right before connecting AND to read the response before closing the connection.



The response variable is an instance String.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sample for sending a raw SOAP message to a service?
 
Similar Threads
Strip Out XML From SOAP to Validate
Conversion of message to SOAP in web service
Putting string in soap message
Webservices Client
Printing Raw Request HTML