Hi Bernard,

By default XPath 2.0 function support is disabled in EI. Functions such as
"concat" are supported in XPath 1.0 version as well hence those will work
with the default configurations in the synapse.properties.

Could you please verify whether you have enabled the
"synapse.xpath.dom.failover.enabled"? (By default this property is
commented, you should uncomment this to support Xpath 2.0)

Further, when you define the property to tokenize you need to add the
namespace for the "fn" as below.
<property xmlns:fn="http://www.w3.org/2005/xpath-functions";
expression="fn:tokenize(syn:get-property('To'),'-')" name="codeFourniA"
scope="default" type="STRING"/>

Regards,
Sashika



On Thu, Mar 1, 2018 at 4:34 PM, Rajith Siriwardena <[email protected]> wrote:

> Hi Bernard,
>
> That debug log inform you that exception occurred in the AXIOM xpath
> evaluation and it's performing a DOM base reevaluation since you have
> enabled the synapse property to fallback to DOM (to enable XPATH 2.0). I
> believe you are getting the correct results? Is it not?
>
>
>
> On Thu, Mar 1, 2018 at 2:49 PM, Bernard Paris <[email protected]>
> wrote:
>
>> Hi,
>>
>> can anybody explain me how to get out of this problem ?
>>
>> In file [EI-HOME]/conf/synapse.properties
>>         synapse.xpath.dom.failover.enabled=true
>>
>> This is my filter mediator :
>>          <filter source="get-property('To')" regex=".+/[^/]+-[^/]+">
>>             <then>
>>                <property name="codeFourniA" 
>> expression="fn:tokenize(syn:get-property('To'),'-')"
>> scope="default" type="STRING" description="codeFourniA"/>
>>                <property name="codeFourniB" 
>> expression="$ctx:codeFourniA[last()]"
>> scope="default" type="STRING" description="codeFourniB"/>
>>             </then>
>>             <else/>
>>          </filter>
>>
>> [2018-03-01 10:15:38,013] [EI-Core] DEBUG - SynapseXPath AXIOM xpath
>> evaluation failed with UnresolvableException, trying to perform DOM based
>> XPATH
>> org.jaxen.UnresolvableException: No Such Function tokenize
>>         at org.jaxen.SimpleFunctionContext.getFunction(SimpleFunctionCo
>> ntext.java:127)
>>         at org.apache.synapse.util.xpath.SynapseXPathFunctionContext.ge
>> tFunction(SynapseXPathFunctionContext.java:101)
>>
>>
>> (no problem with another function call like "concat")
>>
>> Thanks,
>> Bernard
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
> *Rajith Siriwardana*
> WSO2 Inc. | http://wso2.com
> *lean. enterprise. middleware*
>
> ---------------------------------------------------
> *https://home.apache.org/~siriwardana
> <https://home.apache.org/~siriwardana>*
>
>
>
> Disclaimer: This communication may contain privileged or other
> confidential information and is intended exclusively for the addressee/s.
> If you are not the intended recipient/s, or believe that you may have
> received this communication in error, please reply to the sender indicating
> that fact and delete the copy you received and in addition, you should not
> print, copy, re-transmit, disseminate, or otherwise use the information
> contained in this communication. Internet communications cannot be
> guaranteed to be timely, secure, error or virus-free. The sender does not
> accept liability for any errors or omissions.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Sashika WijesingheSoftware Engineer - QA Team*
Mobile : +94 (0) 774537487
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to