sprice9161
15 years agoNew Contributor
How to: Datasouce->XML ->Column XPath
Newbee:
Very few examples on datasources. My goal is to take a SOAP response from my get method and use it to feed a datasource. There is an value returned, one or more (example a document chapter id or sub chapters) times and it can appear many levels deep in the response tree.
The datasource is defined as type XML
The source step is set to the previous "get..."
The source property is set to Response
The Row Path is an xpath string of the first returned response value that I want to capture.
declare namespace ns2='http://retriever.rps.se.epnet.com/';
//ns2:getLogicalPartsResponse[1]/return[1]/childLogicalParts/lpid[1]
**in the XPath statement I changed the predicate for the "ChildLogicalParts to a wild card "*" from a "1" because this element can occur multiple times. It it the child node "lpid" that I want to capture and pass on.
The properties has a new item defined called lpid (to pass through the data-source)
Question: What does "Column XPath do and how does it work? There is an "Edit" and "Select" button but I don't understand the significance of them.
The SOAP request step that would accept this lpid value required that an "add" take place for me to populate the possible list of items. I thought that it would be best to create a local property value and preload it into the request ${lpid}. This makes me think that the next logical thing to do would be to take the output of the data-source and pass it to a Transfer Property, whereby each value is used to initialize ${lpid}.
Question: Does the above description seem reasonable to implement? With so little documentation on the use of Data-sources and Property Transfers, its very difficult to know. All of my attempts keep failing. From what I can see the data isn't coming out using wildcards in my XPath statement.
Any thoughts, comments or direction to material would be appreciated
Very few examples on datasources. My goal is to take a SOAP response from my get method and use it to feed a datasource. There is an value returned, one or more (example a document chapter id or sub chapters) times and it can appear many levels deep in the response tree.
The datasource is defined as type XML
The source step is set to the previous "get..."
The source property is set to Response
The Row Path is an xpath string of the first returned response value that I want to capture.
declare namespace ns2='http://retriever.rps.se.epnet.com/';
//ns2:getLogicalPartsResponse[1]/return[1]/childLogicalParts
**in the XPath statement I changed the predicate for the "ChildLogicalParts to a wild card "*" from a "1" because this element can occur multiple times. It it the child node "lpid" that I want to capture and pass on.
The properties has a new item defined called lpid (to pass through the data-source)
Question: What does "Column XPath do and how does it work? There is an "Edit" and "Select" button but I don't understand the significance of them.
The SOAP request step that would accept this lpid value required that an "add" take place for me to populate the possible list of items. I thought that it would be best to create a local property value and preload it into the request ${lpid}. This makes me think that the next logical thing to do would be to take the output of the data-source and pass it to a Transfer Property, whereby each value is used to initialize ${lpid}.
Question: Does the above description seem reasonable to implement? With so little documentation on the use of Data-sources and Property Transfers, its very difficult to know. All of my attempts keep failing. From what I can see the data isn't coming out using wildcards in my XPath statement.
Any thoughts, comments or direction to material would be appreciated