cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected token name beyond expression

Occasional Contributor

Unexpected token name beyond expression

While trying to store a session ID from a SOAP response into a property I am encountering a problem.

 

 

 

The response I want to retrieve info from is:

<SOAP-ENV:Envelope xmlnsSmiley FrustratedOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlnsSmiley FrustratedOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS1="urn:InvokableUserManagement-IinvUserManagement">
<NS1:CreateSessionResponse>
<return xsi:type="xsd:string">6Tx5Lq33VLVWQiLLmKlRbQ==</return>
</NS1:CreateSessionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

When pressing the ns button to declare the namespaces I receive this:

 

declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='urn:InvokableUserManagement';
declare namespace ns2='***';
declare namespace ns3='***';

 

Then when setting the path to what I want to return:

 

//ns1:CreateSessionResponse/return xsi:type="xsd:string"

 

I get the errorXPath syntax error{...} Unexpected token name "xsi:type" beyond end of expression.

 

//return xsi:type="xsd:string" gives me the same error while //return stores the entire return (including header info) in the transferred property.

What is it that goes wrong? The space or special characters in the return tag???

 

Any help is greatly appreciated

4 REPLIES 4
Regular Contributor

Re: Unexpected token name beyond expression

Hi @Rkoornneef,

 

Your approach is correct but you can get help from XmlHolder.

 

For now, use below, Hope this works:

 

//*:CreateSessionResponse/return

 

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
Occasional Contributor

Re: Unexpected token name beyond expression

Hi 

 

Regular Contributor

Re: Unexpected token name beyond expression

can you please share the screenshot of error.

 

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
Occasional Contributor

Re: Unexpected token name beyond expression

Here are some screenshots:

In one instance (with your solution) it gives back to much info

The other screenshot is with the "solution" I found.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors