I am writing a BPEL process using JDeveloper. I ran into a problem when I try to extract the node value from my xml request.
The XML request will look like this:
<ConvertTemp xmlns="http://www.nikhil.net/"> <Temperature>200</Temperature> <FromUnit>degreeCelsius</FromUnit> <ToUnit>degreeFahrenheit</ToUnit> </ConvertTemp>
I can extract the XML query string from the SOAP body and put it in another string variable (say strRequest).
I am trying to extract the node temperature (i.e. 200) from this strRequest variable. I will convert it to a number and assign it to another variable of type double.
What should be my XPath request for a function to retrieve the temperature value of a node?
number(bpws:getVariableData('strRequest', '', '<XPath query>'))
I tried
bpws:getVariableData('strRequest', '', '/ConvertTemp/Temperature/') bpws:getVariableData('strRequest', '', '/ConvertTemp/Temperature') bpws:getVariableData('strRequest', '', 'Temperature') bpws:getVariableData('strRequest', 'strRequest', '/ConvertTemp/Temperature') bpws:getVariableData('strRequest', 'strRequest', 'Temperature')
and similar combinations. Yield: NaN for all of the above tests.
source share