This content has been marked as final. Show 3 replies
Yes you can fetch value of attribute.
You have to use @ operator for that. If you want, you can use expression builder also to fetch attribute in BPEL.
In your scenario you can do below things.
1: Take output string and parse that using below expression
2: Copy this to some other variable which can hold this xml strucutre, say Var_XML
3: Then you can use expression similar to below given to fetch attribute
bpws:getVariableData('Var_XML','part','xpath of the element/@DOJ')
@ operator allows you to fetch attribute at a given xpath.
I hope this is helpful.
Thank you for the response.
What type would Var_XML be? This is were I am having the difficulty. I have used parseXML before to parse a string to a speicified schema type. The problem I am running into is I am trying to determine what type the XML is based on the input. Therefore I do not know what type I would make the Var_XML variable in your example.
That is very easy. Create a canonical schema for your possible result xmls. This canonical should contain all possible combinations of result strings.
Once your canonical schema is ready. You can copy your output variable to corresponding part of your canonical schema.
Just make sure you use proper logic while doing this copy operations in canonical schema otherwise you will get exception.You can use switch activity to identify logical points.