richie
8 years agoCommunity Hero
Extract SOAP XML attribute value from datafile to provide JDBC request with query filter value
Hi,
Its been years since I used SoapUI Pro (I was never that good with it to begin with) and I'm now using ReadyAPI! v1.9.0 and I'm struggling.
I have 80 test data files (XML) which will be used to populate the body of a Soap message being posted to a web service. Within these XML files is an attribute value (RecordID) I need to source to populate the where clause of a query filter in a JDBC step. I've followed the instructions that I've found and done various google searches, however, I'm still struggling so I'm hopeful someone can help!
My hierarchy is as follows:
Datasource step (Type=File, Property = FileContent, no separator, charset=UTF-8) Soap step (body tag value = ${DataSource#FileContent}) Property Transfer step (Property=GetRecordID, Source=Datasource, Property=FileContent, PathLanguage=XPath, value=//*:RootElement/Element/@RecordID) JDBC step (select * from table where RecordID='value I need from XML datafile')
I apologise if I'm asking a stupid question or for wasting anyone's time.
I do appreciate any and all guidance anyone can provide!
Cheers!
- richie,
Ok. Thank you for the clarification. Once you lost the touch with programming, difficult to remember suddenly unless one keeps practise it daily life. Of course, you should restart again, will be able to grasp it quickly.
Anyways, looks already Radford replied to your point to get the requested info in his solution. Please try that one.