Forum Discussion

jkcroke's avatar
jkcroke
New Contributor
15 years ago

Datasource with response not working

Hello,
I'm trying to use a datasource to pass value from response to a request.  The Datasource is always blank.  Not sure what is wrong.
Thanks.
Jenn

Response

 

      2c0e9ec2-9a53-4dd7-bd56-57b9cf996279
 

 
     
       
           
              Customer:373
              Bugs Bunny
           

           
              Customer:104214
              Customer1
           

           
              Customer:104217
              Customer2
           

           
              Customer:104233
              Customer3
           

           
              Customer:104314
              Customer4
           

       

     

 


Datasource
  Row XPath:
  declare namespace ns1='http://CustomerResponse';
  declare namespace a='http://Some-Company.com/2009/12';
  //ns1:Container[1]/a:Customers[1]/a:Customer[1]

  Column XPaths:
  a:CustomerId
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    I think this is a defect. I get a RunTime exception when I try to run it.

    For now try changing the order of the namespace declarations in the Row XPath (make 'namespace a' come first.) I was able to get results then.

    I have submitted this as a defect.
  • I'm running into a similar issue with a data source needing 3 namespace declarations. Seems the whichever one comes first is the only one that gets parsed.  Since my column Xpaths usually reference multiple namespaces this is kind of a deal breaker for me.

    Any known workarounds? Is there a way to do a global project wide declaration maybe?
  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    What about an initial datasource that strips the namespaces from the response, then use that as the source for the "real" datasource?