Hello Alex,
I have come accross a similar case where I get 'SimpleVariableContext' in
GetVariableDataFunction's evaluate(arg) method because the I have predicate inside
another expression.
For example, bpws:getVariableData(name, part, query[bpws:getVariableData()]query contd.)
So I have made these changes to GetVariableDataFunction's evaluate(arg1, arg2, arg3)
method
| XPathQueryEvaluator locationEvaluator =
XPathEvaluatorFactory.createQueryEvaluator(locationString);
|
| //if no where else, add method in SetNamespaceContext to add bpws.
| ((SetNamespaceContext)support.getNamespaceContext()).addNamespace(
"bpws", "http://schemas.xmlsoap.org/ws/2003/03/business-process/");
|
| locationEvaluator.setNamespaceContext(support.getNamespaceContext());
| locationEvaluator.setVariableContext( variableContext);
| locationEvaluator.setFunctionContext( support.getFunctionContext());
| /*
| * in BPEL 1.1, the context node is 'the root of the document fragment
| * representing the entire part'
| */
| Object queryValue = locationEvaluator.evaluate(partValue.getOwnerDocument());
| log.debug("evaluate : " + queryValue);
| return queryValue;
|
So you can see I have pretty much repeated the code I put in XPathQueryEvaluator to fix my
original problem which started this thread. So a better way would be to call
queryEvaluator's evaluate(node, Token) method. But since this is Jaxen's extension
class I don't know how to get back Token from Context. If there is a way to do that,
please let me know.
Also if there is a better of doing this please point that out. I appreciate your help.
Thank you,
Meghana
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098424#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...