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
tocktock 

what is the format of an outbound message when you receive it?

Hello,
   I'm just looking at outbound messages.
   I have set one up that is triggered on the creation of a Lead, the idea is for it to post data to a php script on another server for example:
 
 
fields to send: FirstName
                        LastName
 
what are names of the values when they are posted and hit the remote server script. I presumed it would be:
$_REQUEST["FirstName"];
$_REQUEST["LastName"];
 
cheers.
 
tocktock
I am also getting this error message in the 'Outbound Messaging Delivery Status'
 
org.xml.sax.SAXParseException: Content is not allowed in prolog
SuperfellSuperfell
Your response is not a valid SOAP response. The format of the message we send is described in the WSDL/Schema on the outbound message page.
tocktock
Hi Simon,
 
Thanks for the reply.
 
 I am now reading the values but  what does this error mean  in the 'Outbound Messaging Delivery Status'?
 
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
 
 
Also the outbound message from Salesforce appears to be hitting my server 4 times instead of the expected once, is there a reason for this?
 
cheers
SuperfellSuperfell
The error message indicates that it thinks your response is UTF-8 encoded, but the actual byte stream is not valid for UTF-8

We'll attempt delivery until we get a explict acknowlegement, or until we eventually give up (24 hours later).
tocktock

Hi Simon, Can you see why the following response would create the error

'com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.'?

 

Code:

         print '<–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>
                   <notifications xmlns="http://soap.sforce.com/2005/09/outbound">
                      <Ack>true</Ack>
                   </notifications>
                  </soapenv:Body>
                </soapenv:Envelope>';


 

tocktock
sussed it! turns out you need question marks in the line where you declare your XML :
<–xml version="1.0" encoding="UTF-8"˜>
 
should be like this:
 
<?xml version="1.0" encoding="UTF-8"?>
 
 
Thanks for your help!
Venkat777Venkat777

Is there any sample code available for C# to consume Sforce Outband Message?

 

Thanks in advance

 

Venkat

SuperfellSuperfell
Yes, the Outbound Messaging part of the API docs include a walk through on generating a C# based listener.
Varun99Varun99

Hi tock,

 

 

I have seen your post like 

 

Re: what is the format of an outbound message when you receive it? [ New ]
I am also getting this error message in the 'Outbound Messaging Delivery Status'
 
org.xml.sax.SAXParseException: Content is not allowed in prolog
 
 
Am also facing same error how did solve your issue? Please tell me 
 
 
Thank you