Forum Discussion
GMSoapUI
12 years agoContributor
I have the same issue and, unless I missed something, this doesn't address the problem.
I get a namespace back in the format [...]/accounts/441164964032/devices/[xxx]
The [...] part is always consistent and so not a problem but the [xxx] part is always different and consists of one or more numbers.
The suggestion proposed by slg12345 doesn't address this as it seems they are suggesting that the namespace is effectively hardcoded to a project property. If I were to follow this I would be hardcoding the following (as an example) https://www.myurl.com/accounts/441164964032/devices/123 as property xmlns (or whatever I might choose to call it).
When I then substitute this into my assertion as:
declare namespace ns1='${#Project#xmlns}';
This will simply resolve as https://www.myurl.com/accounts/441164964032/devices/123 and will fail as I will get something other than 123 at the end. I tried wildcarding this to https://www.myurl.com/accounts/441164964032/devices/* but it didn't work and I then tried using pradeepbishnoi's suggestion of:
//*:Node1
Except I used //*:Response[1]. This worked but I can't help feeling this is a bit of a hack since, if I understand correctly, this is simply saying anything that comes back passes. Could someone please explain what exactly this nomenclature is doing for me to make it clearer. I'd be very grateful for the assistance. It's nice that it seems to work now but I want to be able to understand why it is working.
Thank you.
I get a namespace back in the format [...]/accounts/441164964032/devices/[xxx]
The [...] part is always consistent and so not a problem but the [xxx] part is always different and consists of one or more numbers.
The suggestion proposed by slg12345 doesn't address this as it seems they are suggesting that the namespace is effectively hardcoded to a project property. If I were to follow this I would be hardcoding the following (as an example) https://www.myurl.com/accounts/441164964032/devices/123 as property xmlns (or whatever I might choose to call it).
When I then substitute this into my assertion as:
declare namespace ns1='${#Project#xmlns}';
This will simply resolve as https://www.myurl.com/accounts/441164964032/devices/123 and will fail as I will get something other than 123 at the end. I tried wildcarding this to https://www.myurl.com/accounts/441164964032/devices/* but it didn't work and I then tried using pradeepbishnoi's suggestion of:
//*:Node1
Except I used //*:Response[1]. This worked but I can't help feeling this is a bit of a hack since, if I understand correctly, this is simply saying anything that comes back passes. Could someone please explain what exactly this nomenclature is doing for me to make it clearer. I'd be very grateful for the assistance. It's nice that it seems to work now but I want to be able to understand why it is working.
Thank you.