4

Is there a way to log the incoming SOAP request before concerned apex call is called. I mean what is responsible for converting SOAP request into call to apex class?

Also for call out to SOAP web service hosted at external system, is there a way to log the generated SOAP request.

2 Answers 2

3

The application layer, the part responsible for responding to API calls, page views, and so on, directs requests to /services/Soap/class/ to an appropriate handler that loads the application binary for that class (much like the Java Class Loader loads classes) and translates the parameters from XML to native objects, runs the code, and handles the translation back from native objects to XML.

The internal logging systems will record every request, even those that fail, and several class of employees have access to some version of the logs. However, depending on when the call fails, you might not have access to those logs. For example, if you don't have a session header, then there's no way you could possibly log that on the salesforce.com end.

In fact, it seems like anything that causes an error before the transaction starts never reaches the client-level logging system. For assistance with SOAP problems where you can't even get a log, you'll need to contact Developer Support, or ask a specific question here on SFSE. We'll do our best to help you out. Also, consider using a SOAP client like SOAPClient.com against your WSDL and see what happens.

If you need to ask a question here, be sure to include a (redacted) sample of your SOAP request and response, and possibly even the relevant part of your WSDL, plus the exact error message. The more information we have, the better we can help assist you.

2

For a callout to an external SOAP web service you can examine the CALLOUT_REQUEST and CALLOUT_RESPONSE debug log entries. These are created when the Callout logging category is set to INFO or finer.

Note that these are only available in developer edition orgs. See View Callout Request and Response XML in Sandbox.

I've never seen logging for inbound SOAP requests. Especially outside of the target Apex class.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .