Configure the path to token field in the HTTP response body
I am using XML based SOAP APIs.
For the configure refresh token section I need to put a XML request body to the same base URI as the one in the connection. The request body is:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AuthenticationTokenGet xmlns="http://rex11.com/webmethods/">
<WebAddress>******************</WebAddress>
<UserName>************</UserName>
<Password>*********************</Password>
</AuthenticationTokenGet>
</soap:Body>
</soap:Envelope>
And the Response Body is:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<AuthenticationTokenGetResponse xmlns="http://rex11.com/webmethods/">
<AuthenticationTokenGetResult>***********************************</AuthenticationTokenGetResult>
</AuthenticationTokenGetResponse>
</soap:Body>
</soap:Envelope>
For the setting "Path to token field in HTTP response" I am choosing the HTTP response body option:
But I am not sure how to find out the Path to token field in the HTTP response body.
When I pass the response body above in the Celigo Playground XML parser this is what I get as a JSON response:
[
{
"page_of_records": [
{
"record": {
"soap:Body": {
"AuthenticationTokenGetResponse": {
"AuthenticationTokenGetResult": "*******************************",
"xmlns": "http://rex11.com/webmethods/"
}
},
"xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/",
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"xmlns:xsd": "http://www.w3.org/2001/XMLSchema"
}
}
]
}
]
Any idea what should be the path to token field here. The path that you see in the screenshot does not seem to work here.
0
Comments
Sujit Desai I would try something like this:
This is xpath notation and I usually use a website like http://xpather.com/ to figure out what is needed.
You could also try a normal path expression like below, but not sure if it will work here.
Tyler Lamparter thanks for the insight. I tried both the suggestions but none of them worked.
Sujit Desai are you getting any particular error? Do you have anything in the "how to test connection" section?
Tyler Lamparter I am getting the invalid authentication string error. I tried to use the path you suggested above in the refresh token settings of my HTTP connection and then using the {{{connection.http.auth.token.token}}} handlebar to provide the authentication string in the request body of the Import Step. I tried doing a test send and actually running the flow. In both the cases it gave me invalid authentication string error.
The only way we can test the connection is by trying to post some test data to some endpoint. While posting the data in the request body we would need to put the token itself. Not sure if we can use the handlebar {{{connection.http.auth.token.token}}} OR {{{connection.http.auth.token.refreshToken}}} in the request body in the 'How to test connection' section.
I would be happy to jump on a call, probably the IO office hours to troubleshoot this issue. Is this something we can do? Send me the link for you calendly or link to book the session if that is possible.
Thanks!
Sujit Desai yes feel free to come by office hours next week. https://docs.celigo.com/hc/en-us/articles/360045798291
Is this working?
Please sign in to leave a comment.