Debugging SOAP Responses with Web Services 2.0

This topic discusses Web Services 2.0. For information on Web Services 1.0, see Web Services 1.0.

Overview

This article will give you some tips for debugging SOAP responses.

Administration

  1. Check the Error logs. Here’s what we are most likely to see: 

    …Could open connection.java.io.IOException: Server returned HTTP response code: 400 for URL: https://secure-ausomxdia.crmondemand...on/object;jses...

  2. Review/verify the following: 
    • We used a valid session
    • We built the SOAP input
    • We prepared the URL
    • We made a POST HTTP request.
  3. Use a Web Developer tool to debug the request.
  4. Build out the entire request to see what the 400 actually refers to.
  5. Add the required URL along with the session ID.
  6. Change the request type to POST.
  7. Pass the soapInput in the post data.
  8. Execute the request.

    The first thing you may notice is that headers are required.

  9. Add the content type header and try again.

    This time, look at the response XML and notice that you need to add the SOAPAction.

  10. Look at SoapUI and notice that it's header contains the following: 
  11. SOAPAction: "document/urn:crmondemand/ws/account/10/2004:AccountQueryPage"
  12. Navigate back to CPQ.
  13. Add a fourth parameter to URLDATABYPOST, which will be a diction that can contain custom headers.
  14. Add SOAPAction and Content-type to the parameter you just created. The script should resemble: 

    headerDict=dict('string');
    put(headDict, "Content-Type", "text/xml:charset=utf-8");
    put(headDict, "SOAPAction",
    "\"document/urn:crmondemand/ws/account/10/2004:AccountQueryPage\"");

Notes

Don't forget to escape the double quotes (\") in the SOAP Action header.
SOAP requests must include "Agent" information.

Related Topics

Related Topics Link IconSee Also