This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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?
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.