PutsReq vs. Requestb for testing Salesforce Outbound Messages

Many people are using https://requestb.in to test Salesforce Outbound Messages.

It is often suggested by different bloggers to use https://requestb.in/ service.

Under such posts you could find plenty messages where users are complaining that outbound messages are not coming to that service but instead error like (403)Forbidden is seen.

By the way, to find any outbound message failures you can easily go to Monitor\Outbound Messages

MonitorOM

If you use https://requestb.in/ then you might see (403)Forbidden message in Delivery Failure Reason column.

DeliveryFailureReason.png

However, there is another service PutsReq, which works well, however a few people know about it. I personally have found it in the Pablo Cantero comment on July 31, 2014 at 17:21 under this post.

After I finished my investigation I have found also some other posts suggesting using PutsReq for testing Salesforce Outbound messages, for example this one and this one.

The last one is really cool since it also provides you an example of response acknowledgement  message which should be sent back from PutsReq to Salesforce.

Salesforce documentation doesn’t provide an example of acknowledgement response, and I couldn’t find that post with example during my investigation, so I ended up finding the correct response by trial and error approach until I got the option which didn’t bring me any errors like org.xml.sax.SAXException: Bad envelope tag: element or org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to d or others like “nack” or something like that.

This is code example to get correct response in Javascript for PutsReq service


// Build a response
var msg = '<?xml version="1.0" encoding="UTF-8"?>\r\n'+
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r\n'+
'<soapenv:Body>\r\n'+
'<element name="notificationsResponse">\r\n'+
'<Ack>true</Ack>\r\n'+
'</element>'+
'\r\n</soapenv:Body>\r\n</soapenv:Envelope>';

response.body = msg;

and this is correct acknowledgement response XML example


<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<element name="notificationsResponse">
<Ack>true</Ack>
</element>
</soapenv:Body>
</soapenv:Envelope>

A few more points: I didn’t put PutsReq to my Remote Site Settings on my sandbox and I see that it is working quite fine despite it is suggested to include it by  this post.

Also I believe requestb.in has banned all Salesforce requests since Salesforce keeps resending failed outbound messages for 24 hours and if many users are misusing requestb.in and burden it with high traffic then  requestb.in owners might have decided to ban Salesforce Outbound Messages completely. I have asked John Sheehan <help@runscope.com> if this is the case and if there is any document which might explain why Salesforce Outbound Messages are blocked by requestb.in but he didn’t answer to me.

On the putsreq.com however we can define by javascript correct response so Salesforce will not send many times outbound messages. We should definitely define it to prevent putsreq.com from banning also Salesforce requests. So please, if you are going to use putsreq, please define correct acknowledgment response messages.

Enjoy. Click like if you feel this post is super awesome 😉

This entry was posted in salesforce, SOAP and tagged , , , , , , , , , , , . Bookmark the permalink.

3 Responses to PutsReq vs. Requestb for testing Salesforce Outbound Messages

  1. lifeofguenter says:

    unfortunately requestb.in is offline (redirects to the opensource) – for this reason I created httpreq.com which is a super simple replacement

  2. Pingback: PutsReq With Outbound Messages | MST Solutions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s