Hi All,
I am doing a XPATH filter on the 2 different requests coming from 2 different systems onto a single Virtual Services and I am getting an exception mentioned below:
So here are the technical details of what I am doing.
XPATH1: /soap:Envelope/soap:Body/:inqMulti/:inqMultiRequest/@cardNbr
Request 1:
<?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:Header>
<TSYSprofileInq xmlns="urn://tsys.com/xmlmessaging/CH">
<clientID>7624</clientID>
<userID>XXXX</userID>
<vendorID>00000018</vendorID>
<securityID>7624</securityID>
<logID>APE002</logID>
<TSYSInfo>TSYS1</TSYSInfo>
</TSYSprofileInq>
</soap:Header>
<soap:Body>
<inqMulti xmlns="urn://tsys.com/xmlmessaging/CH">
<inqMultiRequest cardNbr="5305674001144***">
<inquireRequest xsi:type="inqCustInfoRequestType" cardNbr="5305674001144***" version="2.6.0" />
<inquireRequest xsi:type="inqCustAddrRequestType" cardNbr="5305674001144***" version="1.2.0" />
</inqMultiRequest>
</inqMulti>
</soap:Body>
</soap:Envelope>
EXPECTED RESULT : 5305674001144***
XPATH1 FILTER RESULT: 5305674001144***
------------------------------------------
XPATH2: /SOAP-ENV:Envelope/SOAP-ENV:Body/ns0:inqMulti/ns0:inqMultiRequest/@custID
Request 2:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns:TSYSprofileInq xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn://tsys.com/xmlmessaging/CH" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<ns:clientID>7624</ns:clientID>
<ns:userID>XXXX</ns:userID>
<ns:vendorID>00000019</ns:vendorID>
</ns:TSYSprofileInq>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns0:inqMulti xmlns:ns0="urn://tsys.com/xmlmessaging/CH">
<ns0:inqMultiRequest custID="000063111">
<ns0:inqCustCardInfoRequest version="1.5.0" acctID="80000940000"/>
</ns0:inqMultiRequest>
</ns0:inqMulti>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
EXPECTED RESULT: 000063111
XPATH2 FILTER RESULT: Invalid XPath defined in XML XPath filter: /SOAP-ENV:Envelope/SOAP-ENV:Body/ns0:inqMulti/ns0:inqMultiRequest/@custID
org.apache.xpath.domapi.XPathStylesheetDOM3Exception: Prefix must resolve to a namespace: soap
at org.apache.xpath.compiler.XPathParser.errorForDOM3(XPathParser.java:655)
at org.apache.xpath.compiler.Lexer.mapNSTokens(Lexer.java:647)
Can anyone help as what would be resolution to resolve this issue? I will appreciate your help
Thanks,
Salman