Forum Discussion

VladAtVerient's avatar
10 years ago

How to retrieve element value with XPath

Hello friends:

I am trying to retrieve a value from a response XML using "Property Transfer" step.
The hierarchy is as below:
###
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">Validation error</faultstring>
<detail>
<spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">
cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '4' for type '#AnonType_IssuerIdentifierGenerateVirtualCardRequest'.
</spring-ws:ValidationError>

###

So the ultimate tag I need to access is:

<spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">

Any suggestions would be greatly appreciated.

Regards,
Vladimir.
voleynik@verient.com

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3
    In the property transfer step, you may say

    declare namespace spring-ws="http://springframework.org/spring-ws";
    //spring-ws:ValidationError/text()