Property transfer Missing match for source xpath
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Property transfer Missing match for source xpath
Hello people, I am new to SOAPUI, I hope any of you could help me.
From the following XML I'm trying to get the <ns3:segmentReference> VALUE with a PROPERTY TRANSFER teststep.
For that I clicked in the "ns" button to bring me the namespaces and declare them, and what I typed afterwards is:
//ns3:segmentReference
But that doesn't seem to work, it says "null" or "Missing match for source xpath"
I tried the longer version of the path but still won't work.
Could you point out what I am doing wrong?
Thanks in advance
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<add:MessageID xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing">0c1d47f3-9c97-4e26-9f47-57d8134e6743</add:MessageID>
</S:Header>
<S:Body>
<querySegmentsResponse xmlns="http://www.telefonica.com/schemas/UNICA/SOAP/OCSProvisioning/accountManagement/v2/types" xmlns:ns0="http://www.telefonica.com/schemas/UNICA/SOAP/common/v2" xmlns:ns3="http://www.telefonica.com/schemas/UNICA/SOAP/OCSProvisioning/v2/types">
<ns3:segmentInfoList>
<ns3:segmentInfo>
<ns3:segmentId>AltaPrepSur</ns3:segmentId>
<ns3:segmentReference>43751735500</ns3:segmentReference>
<ns3:timeInterval>
<ns3:startTime>
<ns3:date>2021-12-15T11:37:34.0-03:00</ns3:date>
</ns3:startTime>
</ns3:timeInterval>
</ns3:segmentInfo>
<ns3:segmentInfo>
<ns3:segmentId>CAMPC100</ns3:segmentId>
<ns3:segmentReference>43751751374</ns3:segmentReference>
<ns3:timeInterval>
<ns3:startTime>
<ns3:date>2021-12-15T11:40:32.0-03:00</ns3:date>
</ns3:startTime>
</ns3:timeInterval>
</ns3:segmentInfo>
</ns3:segmentInfoList>
</querySegmentsResponse>
</S:Body>
</S:Envelope>
Thanks in advance
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To drill down to single value, use the reference of segmentId
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your quick reply @nmrao 😊
In order to do this: To drill down to single value, use the reference of segmentId. Do I have to use Xquery?
Could you teach me how to do it?
Sorry for the basic questions, It's been days since I'm using the program.
Cheers
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been reading other posts and articles about Xquery and I wrote this piece of code
<asdf>
{
for $a in //ns3:segmentInfoList/ns3:segmentInfo
where $a/ns3:segmentId='AltaPrepSur'
return <ns3:segmentReference> {data($a/ns3:segmentReference/text())} </ns3:segmentReference>
}
</asdf>
but it doesn't seem to work, it returns the tag <asdf>
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
//*:segmentInfo[*:segmentId='AltaPrepSur']/*:segmentReference/text()
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awesome!
That worked perfectly
I have a lot to learn about xquery language
Do you have any guide recomendation?
Thanks a lot @nmrao !
