I don't really have any idea what I am doing, but trying to get a value from this response.
There is only one field in the return, and i see it when I send to email.
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <LoginResponse xmlns="http://...../webservices"> <LoginResult>string</LoginResult> </LoginResponse> </soap12:Body> </soap12:Envelope>
I have tried to read most blog post, but I just can't get it to work. I am all over the place with xPath 🙂
Solved! Go to Solution.
Hi @crmkeeper ,
The issue might be because of the Namespaces in your XML. Please try to use the following expression to get the string.
Expression reference:
xpath(xml(outputs('Compose')), '//*[local-name()="Envelope"]/*[local-name()="Body"]/*[local-name()="LoginResponse"]/*[local-name()="LoginResult"]/text()')[0]
Image reference:
Best Regards,
Hi @crmkeeper ,
The issue might be because of the Namespaces in your XML. Please try to use the following expression to get the string.
Expression reference:
xpath(xml(outputs('Compose')), '//*[local-name()="Envelope"]/*[local-name()="Body"]/*[local-name()="LoginResponse"]/*[local-name()="LoginResult"]/text()')[0]
Image reference:
Best Regards,
I owe you a beer!!! ❤️
I have no idea how I would be able to understand this without you. Do you mind sharing what I should think about next time i see a similar XML? I am not 100% sure what namespaces are but gessing it is related to the "Soap12:Envelope", and it not just being "Envelope"?
Also could you try to explain why you use //* in the beginning?
Can I use the "local-name" every time even if there is a namespace issue or not?
I see you added the /text() at the end and that, and others have put things in a String(' '). I am guessing that is the same result?
The end [0] you are treating it like an array, is that because there could be more than one response?
Thank you again for helping me with this!!:)
User | Count |
---|---|
6 | |
3 | |
2 | |
2 | |
2 |