This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sample for sending a raw SOAP message to a service?

 
Jeff Boucher
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you said, it's just an HTTP POST of some text, so something like this should work.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic