Unable to get node using xpath in soapUI
Posted
by
R.S
on Stack Overflow
See other posts from Stack Overflow
or by R.S
Published on 2012-11-29T11:01:58Z
Indexed on
2012/11/29
11:03 UTC
Read the original article
Hit count: 718
How can i access "AccountId" node from following response file using Xpath in soapUI 4.0.0?
Thanks in advance.
Response file is as follow,
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetResponse xmlns="http://www.tieto.com/cmw/tcm/account">
<GetResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Account>
<AccountId>14338049839</AccountId>
<AccountLabel>Spara Femman</AccountLabel>
<AccountRoleDTOList>
<AccountRole>
<AddressTypeId>REC</AddressTypeId>
<EndDay i:nil="true"/>
<ExtPosReference i:nil="true"/>
<HolderId>10533</HolderId>
<HolderName>TÄRNHOLMS HOTELL AB</HolderName>
<HolderTypeId>COR</HolderTypeId>
<IdentificationId>005164006917</IdentificationId>
<ReportProfileId>3</ReportProfileId>
<ReportProfileName>Standard</ReportProfileName>
<RoleDocumentPath i:nil="true"/>
<RoleId>HOL</RoleId>
<RoleName>Holder</RoleName>
<ShareOfAccount>100.00000</ShareOfAccount>
</AccountRole>
</AccountRoleDTOList>
<AccountTypeId>AGG</AccountTypeId>
<CloseDay i:nil="true"/>
<CurrencyId>SEK</CurrencyId>
<CustodianAccountId i:nil="true"/>
I have tried it by using following code... but it's not working
declare namespace i='http://www.w3.org/2001/XMLSchema-instance';
//i:GetResult[1]/Account[1]
But i am getting error like, Missing content for xpath declare namespace i='http://www.w3.org/2001/XMLSchema-instance'; //i:GetResult[1]/Account[1] in response
© Stack Overflow or respective owner