I am writing a BPEL process using JDeveloper. I am facing an issue when I try to extract the value of a node from my request xml.
Request XML will be as follows:
<ConvertTemp xmlns="http://www.nikhil.net/">
<Temperature>200</Temperature>
<FromUnit>degreeCelsius</FromUnit>
<ToUnit>degreeFahrenheit</ToUnit>
</ConvertTemp>
I am able to extract the request XML string out of the SOAP Body and put it into another string variable (say strRequest).
I am trying to extract the value of Temperature node (which is 200) out of this strRequest variable. I will be converting it into a number and assigning it to another variable of type double.
What should be my XPath query for the function to extract the Temperature node value?
number(bpws:getVariableData('strRequest', '', '<XPath query>'))
I've 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 similiar combinations. Output: NaN for all the trials above