Forum Discussion

Anson1000's avatar
Anson1000
Occasional Contributor
8 years ago
Solved

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

 

 

The second step input is as the following:

 

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

 

Error log and test suite xml file is attached

 


  • 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

5 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    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.

    • Anson1000's avatar
      Anson1000
      Occasional Contributor

      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

    • Anson1000's avatar
      Anson1000
      Occasional Contributor

      Hi HKosova

      One more question. If we have multiple  identifier such as 
      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's avatar
        nmrao
        Champion Level 3
        Please try
        //*:productIdentifier/*:identifier