Skip to main content
Jul 15, 2013 1:26 PM UTC
Solved

Webhooks - need help with syntax for parsing the return

Ok, I have gone through all the documentation and community article and it is NOT obvious what is the syntax for the webhook response syntax.

I have tried the "." method as in the article, XPath type "/" and nothing works.  The webhook call is a success but the field value is never updated.

If this is my webhook return:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <loginResponse>
         <result>
            <metadataServerUrl>https://cs3.salesforce.com/services/Soap/m/28.0/00DQ00000001SA2</metadataServerUrl>
            <passwordExpired>false</passwordExpired>
            <sandbox>true</sandbox>
            <serverUrl>https://cs3.salesforce.com/services/Soap/c/28.0/00DQ00000001SA2</serverUrl>
            <sessionId>00DQ00000001SA2!ARkAQFY5v3bpC3YJsHQguSgPw.sptBCKnOSidNdEiEl6XtO37Ygv6T3blGfkpnTE4b7fC3ZAcv8myLSsSiTzTAkLySD5xdna</sessionId>
            <userId>005Q000000I229cIAB</userId>

What should the response mapping be to store the sessionId? Xpath? "dot" syntax? from the root or relative to the SoapBody ???

I have tried all of the above with no success. HELP


Cheers,
Dazed and Confused
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Accepted solution
Aug 26, 2013 10:28 PM UTC
Fixed in Aug release

7 replies

Mar 6, 2014 11:55 PM UTC
It would be helpful if the fix and solution were documented in this post.
Translate
Accepted solution
Aug 26, 2013 10:28 PM UTC
Fixed in Aug release
Translate
Jul 16, 2013 2:19 AM UTC
Thanks Elliot,

I was trying to see if they used a XPath type parse but as you point out that is not the case.
 
Posted as support ticket.
 
Case #: 00169748 - (ref:_00D506sHb._50050MlNLU:ref)

Cheers,
Eric
Translate
Jul 15, 2013 4:58 PM UTC
Hey Eric,  I am also having a similar problem.  I get the response, but it is not written into the field.  Tech support indicates that they use OGNL to parse responses and spaces are not permitted for Response Attribute names. We're in the process of revising our webservice to use underscores for the Response Attribute names - hopefully that will solve the problem.  I wonder if the slashes in your Response Attribute name are causing a problem?
Translate
Jul 15, 2013 4:23 PM UTC
Eric,
Please do so - we'll have someone investigate this asap

Raj
Translate
Jul 15, 2013 1:58 PM UTC
Thanks Raj, I really appricate the help.

Ok tried it.  Same as before. Webhook generates a sucess but the field does not get updated. I think I am going to have to raise a support ticket.

Cheers,
Eric

FYI: 
Here is the activity Details

Translate
Jul 15, 2013 1:36 PM UTC
Eric,
You should use the dot syntax from the root of the XML tree.  Please try the following -

soapenv:Envelope.soapenv:Body.loginResponse.result.sessionId

Raj
Translate