Ask a Question

content is not allowed in prolog when transferring property

SOLVED
Anson1000
Occasional Contributor

content is not allowed in prolog when transferring property

My first step response is as the following:

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
<soap:Body>
<svc:determineCustomerRatesResponse xmlns:acct="http://bac.com/baclws/ngen2/account" xmlns:cmd="http://bac.com/baclws/ngen2/command" xmlns:cmn="http://bac.com/baclws/ngen2/common" xmlns:comm="http://bac.com/baclws/ngen2/communication" xmlns:doc="http://bac.com/baclws/ngen2/document" xmlns:event="http://bac.com/baclws/ngen2/event" xmlns:icase="http://bac.com/baclws/ngen2/icase" xmlns:ienum="http://bac.com/baclws/ngen2/ienum" xmlns:ns13="http://bac.com/wsdl/ngen2/PricingLocationReportingV001" xmlns:prod="http://bac.com/baclws/ngen2/product" xmlns:ref="http://bac.com/baclws/ngen2/reference" xmlns:role="http://bac.com/baclws/ngen2/role" xmlns:svc="http://bac.com/wsdl/ngen2/DepositCustomerPricingReportingV001" xmlns:trn="http://bac.com/baclws/ngen2/transaction">
<svc:rates>
<cmn:lineOfBusiness>
<cmn:code>CON</cmn:code>
<cmn:name>Consumer</cmn:name>
</cmn:lineOfBusiness>
<cmn:location>
<cmn:state>
<cmn:code>MO</cmn:code>
</cmn:state>
<cmn:FIPSStateCode>29</cmn:FIPSStateCode>
<cmn:FIPSCountyCode>005</cmn:FIPSCountyCode>
</cmn:location>
<cmn:minimumTermDuration>P120M</cmn:minimumTermDuration>
<cmn:rates>
<cmn:identifier>51c1162d-857e-49b1-9a09-6053459e6af9</cmn:identifier>

 

I transfer identifier 51c1162d-857e-49b1-9a09-6053459e6af9 to the second step

 

2017-04-21 14_14_20-New Message - SmartBear Community.png

 

The second step input is as the following:

 

  <cmn:identifier>${#TestCase#identifier</cmn:identifier>

 

Error log and test suite xml file is attached

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anson1000
Occasional Contributor

Re: content is not allowed in prolog when transferring property


@HKosova wrote:

@Anson1000 wrote:

 

The second step input is as the following:

 

  <cmn:identifier>${#TestCase#identifier</cmn:identifier>


It's missing the closing "}":

<cmn:identifier>${#TestCase#identifier}</cmn:identifier>

 

By the way, in your Property Transfer, if the response contains only one <cnm:identifier>, the source expression can be simplified to

//*:determineCustomerRatesResponse//*:identifier

or even

//*:identifier

There's no need for saxon: parse here - it's only needed to parse XML inside CDATA.


Hi HKosova,

 

Thank you . it works

View solution in original post

5 REPLIES 5
HKosova
Moderator

Re: content is not allowed in prolog when transferring property


@Anson1000 wrote:

 

The second step input is as the following:

 

  <cmn:identifier>${#TestCase#identifier</cmn:identifier>


It's missing the closing "}":

<cmn:identifier>${#TestCase#identifier}</cmn:identifier>

 

By the way, in your Property Transfer, if the response contains only one <cnm:identifier>, the source expression can be simplified to

//*:determineCustomerRatesResponse//*:identifier

or even

//*:identifier

There's no need for saxon: parse here - it's only needed to parse XML inside CDATA.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Anson1000
Occasional Contributor

Re: content is not allowed in prolog when transferring property


@HKosova wrote:

@Anson1000 wrote:

 

The second step input is as the following:

 

  <cmn:identifier>${#TestCase#identifier</cmn:identifier>


It's missing the closing "}":

<cmn:identifier>${#TestCase#identifier}</cmn:identifier>

 

By the way, in your Property Transfer, if the response contains only one <cnm:identifier>, the source expression can be simplified to

//*:determineCustomerRatesResponse//*:identifier

or even

//*:identifier

There's no need for saxon: parse here - it's only needed to parse XML inside CDATA.


Hi HKosova,

 

Thank you . it works

View solution in original post

Anson1000
Occasional Contributor

Re: content is not allowed in prolog when transferring property

Hi HKosova

One more question. If we have multiple  identifier such as 
2017-04-24 09_54_58-Untitled - Notepad.png
first Xpath
 <svc:determineCustomerRatesResponse xmlns:acct="http://bbb.com/baclws/ngen2/account" 

          <cmn:rates>
                   <cmn:identifier>4ca68a23-93bd-46f4-8b04-15346988e3e6</cmn:identifier>

 

Second Xpath

 

<svc:determineCustomerRatesResponse xmlns:acct="http://bbb.com/baclws/ngen2/account" 

 

      </cmn:tiers>
                 <cmn:productIdentifier>
                                <cmn:identifier>FSDPTDZZC107</cmn:identifier>

 

what is xpath for the second identifier?

 

//*:determineCustomerRatesResponse//cmn:productIdentifier/*:identifier?

 

Thanks

 

 

 

nmrao
Community Hero

Re: content is not allowed in prolog when transferring property

Please try
//*:productIdentifier/*:identifier


Regards,
Rao.
Anson1000
Occasional Contributor

Re: content is not allowed in prolog when transferring property

Hi Rao,

 

Thank you!

 

cancel
Showing results for 
Search instead for 
Did you mean: