My hands are tied and I'm fairly limited in what is available to me to make a SOAP request (not all of 1.6 is available I think, but please recommend a library if you know of a native one that will make this easier, I may be able to get it added to the server) so I'm hand rolling a POST to a SOAP service. We have a proprietary HttpClient and HttpResponse (wrappers more or less) that after some tweaking I'm able to get a 200 OK but the moment I try and send some actual parameters to the service I get a 403.
That is the packet I send that gives me a 200 OK but the response says it's an invalid XML request. Fair enough as I didn't actually send any parameters.
Here is what I send that gives me the 400:
I also set the SOAP Action to the method I want to call as well as set the content type to "text/xml; charset=utf-8" per SOAP 1.1.
I'm completely lost as to what is wrong with my request as everything is a String created manually.
Does anything pop out as erroneous? Do I need to encode the string or something?
Thanks for the help everyone. I'm at a point now where communication is consistent. The only issue now is the integration of the xml into the soap. I realize it was said that I should remove the second xml definition tag but until I get confirmation from the client for my current server side errors (as reported by their service....not 500 or 403 or anything like that) this is how it's set up in the documentation.
My problem currently is when printing to the console using System.out.println I intially get an output of this for the xml I create as outputted by XMLOutputter#outputString() from JDOM:
However, when I try and print the request/response to the System.out.println I get something that looks like this using SOAPMessage.writeTo():
The soap message itself prints out just fine to system.out for both the request and response. It's just the created textNode I guess.
Any thoughts? I've thought of CDATA as an option for the xml between the <xml></xml> tags but still figuring out how JDOm does that.
Addendum: I'm confused. The code I printed here is exactly what I get yet it displays normally on the web.