• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sample for sending a raw SOAP message to a service?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you said, it's just an HTTP POST of some text, so something like this should work.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic