+ Start a Discussion
Giorgio PorroGiorgio Porro 

How to view the XML file generated by a SOAP API callout


I developed an API callout to a SOAP webservice.
How can I see the actual XML message being generate by the invoke methid?
I call the invoke method below:

              new String[]{endpoint_x,
and my webservice expects something like this

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://www.xifin.com/schema/client" xmlns:msg="http://www.xifin.com/schema/msgHeader">

Best Answer chosen by Giorgio Porro
Doug Hynes NIDoug Hynes NI
You can't see the SOAP request XML in Salesforce debug, but you can send it to some intermediary or site where you can inspect the result.

Check out: http://requestb.in/

I think there are more elegant sites that do this (but can't find right now), but this one will work. Just go to http://requestb.in in your browser, create a request bin, then set your SOAP endpoint URL to it. Then execute the call in Salesforce and you'll see the request in the bin. You'll also need to add the url to Remote Site Settings.