function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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="" xmlns:cli="" xmlns:msg="">

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:

I think there are more elegant sites that do this (but can't find right now), but this one will work. Just go to 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.