You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Michal Stochmialek (JIRA)" <ji...@apache.org> on 2009/02/13 21:02:59 UTC
[jira] Created: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
get-property function is not recognized in xquery variable expression attribute
-------------------------------------------------------------------------------
Key: SYNAPSE-503
URL: https://issues.apache.org/jira/browse/SYNAPSE-503
Project: Synapse
Issue Type: Bug
Components: Extension Mediators
Affects Versions: 1.3
Reporter: Michal Stochmialek
Fix For: 1.3
I'm transforming response of the remote service in outSequence of a proxy.
I'm using xquery mediator. I want to change the format of the payload of the response
and also I want to insert a payload of the request into a first element of the response.
1. proxy: gets request A,
2. inSequence: transforms request A to request B,
3. endpoint: sends request B to remote service,
4. endpoint: receives response B,
5. outSequence: transforms response B to response A with request A included.
To do that, I'm storing the request A payload in a variable and in outSequence
I'm want to use it in XQUERY mediator while transforming the response.
Here's a fragment of the synapse.xml:
{noformat}
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
{noformat}
On the runtime I've got following exception:
{noformat}
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
</soapenv:Body></soapenv:Envelope>
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Unable to execute the query
{noformat}
After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
This seems to be a reason of the exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674392#action_12674392 ]
Andreas Veithen commented on SYNAPSE-503:
-----------------------------------------
Since Indika fixed the XQuery mediator to use SynapseXPath, it should be possible now to rewrite the mediation as follows:
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="$body/child::*[position()=1]" type="ELEMENT"/>
</xquery>
That would avoid the conversion XML -> String -> XML. Can you try this out?
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674556#action_12674556 ]
Andreas Veithen commented on SYNAPSE-503:
-----------------------------------------
You are right. I didn't read your description carefully and I was misled by the fact that in one of the above comments, the <xquery> mediator immediately followed <property>. This is an interesting use case and I think we should at some point introduce the capability of storing properties that are not strings.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Assigned: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "indika priyantha kumara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
indika priyantha kumara reassigned SYNAPSE-503:
-----------------------------------------------
Assignee: indika priyantha kumara
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michal Stochmialek updated SYNAPSE-503:
---------------------------------------
Description:
I'm transforming response of the remote service in outSequence of a proxy.
I'm using xquery mediator. I want to change the format of the payload of the response
and also I want to insert a payload of the request into a first element of the response.
1. proxy: gets request A,
2. inSequence: transforms request A to request B,
3. endpoint: sends request B to remote service,
4. endpoint: receives response B,
5. outSequence: transforms response B to response A with request A included.
To do that, I'm storing the request A payload in a variable and in outSequence
I'm want to use it in XQUERY mediator while transforming the response.
Here's a fragment of the synapse.xml:
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
On the runtime I've got following exception:
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
</soapenv:Body></soapenv:Envelope>
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Unable to execute the query
After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
This seems to be a reason of the exception.
was:
I'm transforming response of the remote service in outSequence of a proxy.
I'm using xquery mediator. I want to change the format of the payload of the response
and also I want to insert a payload of the request into a first element of the response.
1. proxy: gets request A,
2. inSequence: transforms request A to request B,
3. endpoint: sends request B to remote service,
4. endpoint: receives response B,
5. outSequence: transforms response B to response A with request A included.
To do that, I'm storing the request A payload in a variable and in outSequence
I'm want to use it in XQUERY mediator while transforming the response.
Here's a fragment of the synapse.xml:
{noformat}
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
{noformat}
On the runtime I've got following exception:
{noformat}
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
</soapenv:Body></soapenv:Envelope>
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Unable to execute the query
{noformat}
After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
This seems to be a reason of the exception.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> 1. proxy: gets request A,
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> To do that, I'm storing the request A payload in a variable and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> Here's a fragment of the synapse.xml:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673821#action_12673821 ]
Michal Stochmialek commented on SYNAPSE-503:
--------------------------------------------
Andreas,
Ok. I understand. Synapse transformed the payload to a string while setting "body" property.
I wanted to transform it to an element in a xquery script. I tried that in XSLT script without a success.
Therefore I wanted to try XQuery. Are you aware of other way to implement my use case?
This of course doesn't change the fact, that you cannot use "get-property" function in a xquery's variable.
And you cannot pass even simple string properties to the xquery engine.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "indika priyantha kumara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673825#action_12673825 ]
indika priyantha kumara commented on SYNAPSE-503:
-------------------------------------------------
I have updated the XQuery mediator to use SynapseXPath.
But , I didn't check your scenario .. I will check
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "indika priyantha kumara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673854#action_12673854 ]
indika priyantha kumara commented on SYNAPSE-503:
-------------------------------------------------
I have tried the following
<property name="body" expression="$body/child::*[position()=1]" />
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
and for XLST mediator too , I have tried . It is now working.
Take svn up
Thanks
Indika
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Resolved: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "indika priyantha kumara (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
indika priyantha kumara resolved SYNAPSE-503.
---------------------------------------------
Resolution: Fixed
Mark as resolve as reported issue has been fixed and there is a separate JIRA for suggestions come from Andreas
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Updated: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michal Stochmialek updated SYNAPSE-503:
---------------------------------------
Description:
I'm transforming response of the remote service in outSequence of a proxy.
I'm using xquery mediator. I want to change the format of the payload of the response
and also I want to insert a payload of the request into a first element of the response.
To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
I'm want to use it in XQUERY mediator while transforming the response.
1. proxy: gets request A,
2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
2. inSequence: transforms request A to request B,
3. endpoint: sends request B to remote service,
4. endpoint: receives response B,
5. outSequence: transforms response B to response A with request A included.
Here's a fragments of the synapse.xml:
Storing the payload contents in the "body" property:
<property name="body" expression="$body/child::*[position()=1]" />
Transforming response to other format and passing request payload as a argument:
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
On the runtime I've got following exception:
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
</soapenv:Body></soapenv:Envelope>
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Unable to execute the query
After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
This seems to be a reason of the exception.
I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
( XSLTMediator uses SynapseXPath class for evaluating values of properties).
<xslt key="response.xsl">
<property name="requestBody" expression="get-property('body')"/>
</xslt>
was:
I'm transforming response of the remote service in outSequence of a proxy.
I'm using xquery mediator. I want to change the format of the payload of the response
and also I want to insert a payload of the request into a first element of the response.
1. proxy: gets request A,
2. inSequence: transforms request A to request B,
3. endpoint: sends request B to remote service,
4. endpoint: receives response B,
5. outSequence: transforms response B to response A with request A included.
To do that, I'm storing the request A payload in a variable and in outSequence
I'm want to use it in XQUERY mediator while transforming the response.
Here's a fragment of the synapse.xml:
<xquery key="response.xq" trace="enable">
<variable name="payload" type="ELEMENT"/>
<variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
</xquery>
On the runtime I've got following exception:
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
</soapenv:Body></soapenv:Envelope>
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
Unable to execute the query
After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
This seems to be a reason of the exception.
I set "body" property myself in inSeqence. I've updated description. See above.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673606#action_12673606 ]
Andreas Veithen commented on SYNAPSE-503:
-----------------------------------------
Please note that properties can only be strings!
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674560#action_12674560 ]
Michal Stochmialek commented on SYNAPSE-503:
--------------------------------------------
I agree. I'm looking forward to see this capability in synapse.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673469#action_12673469 ]
Asankha C. Perera commented on SYNAPSE-503:
-------------------------------------------
There is no implementation of a get-property('body')
Did you look at Sample#390? That should show you how to achieve what you need
http://synapse.apache.org/Synapse_Samples.html#Sample390
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> 1. proxy: gets request A,
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> To do that, I'm storing the request A payload in a variable and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> Here's a fragment of the synapse.xml:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674510#action_12674510 ]
Michal Stochmialek commented on SYNAPSE-503:
--------------------------------------------
The $body xpath variable contains Body element of CURRENT message (am I right?).
In outSeqence CURRENT message is the RESPONSE of remote service, but I need the original REQUEST.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
[jira] Commented: (SYNAPSE-503) get-property function is not
recognized in xquery variable expression attribute
Posted by "Michal Stochmialek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SYNAPSE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674267#action_12674267 ]
Michal Stochmialek commented on SYNAPSE-503:
--------------------------------------------
Indika,
Thanks very much for the fix. I've tried the newest SVN version and it works like a charm.
It looks like I will be able to implement my use case. Thanks again.
> get-property function is not recognized in xquery variable expression attribute
> -------------------------------------------------------------------------------
>
> Key: SYNAPSE-503
> URL: https://issues.apache.org/jira/browse/SYNAPSE-503
> Project: Synapse
> Issue Type: Bug
> Components: Extension Mediators
> Affects Versions: 1.3
> Reporter: Michal Stochmialek
> Assignee: indika priyantha kumara
> Fix For: 1.3
>
>
> I'm transforming response of the remote service in outSequence of a proxy.
> I'm using xquery mediator. I want to change the format of the payload of the response
> and also I want to insert a payload of the request into a first element of the response.
> To do that, I'm storing the request A payload in a variable in inSequence and in outSequence
> I'm want to use it in XQUERY mediator while transforming the response.
> 1. proxy: gets request A,
> 2. inSequence: stores the payload A in a property named "body" (it will be used in outSeqence),
> 2. inSequence: transforms request A to request B,
> 3. endpoint: sends request B to remote service,
> 4. endpoint: receives response B,
> 5. outSequence: transforms response B to response A with request A included.
> Here's a fragments of the synapse.xml:
> Storing the payload contents in the "body" property:
> <property name="body" expression="$body/child::*[position()=1]" />
> Transforming response to other format and passing request payload as a argument:
> <xquery key="response.xq" trace="enable">
> <variable name="payload" type="ELEMENT"/>
> <variable name="request" expression="synapse:get-property('body')" type="ELEMENT"/>
> </xquery>
> On the runtime I've got following exception:
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR XQueryMediator Unable to execute the query
> org.apache.synapse.SynapseException: Error evaluating XPath synapse:get-property('body') on message<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:kom="http://www.eurobank.pl/serwisy/paybylink/1.0/komunikaty"><soapenv:Header>
> [...header contents...]</soapenv:Header>[... payload contents...]
> </soapenv:Body></soapenv:Envelope>
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(MediatorCustomVariable.java:165)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(MediatorCustomVariable.java:153)
> at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(MediatorCustomVariable.java:93)
> at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:312)
> at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:160)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
> at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:65)
> at org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:111)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:61)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:111)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:140)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:312)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:133)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:210)
> at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> 2009-02-13 20:42:07,359 [192.168.168.6-5MBTB3J] [HttpClientWorker-2] ERROR SynapseCallbackReceiver Synapse encountered an exception, No error handlers found - [Message Dropped]
> Unable to execute the query
> After looking a bit at XQueryMediator code it seems it uses AXIOMXPath class instead of SynapseXPath class.
> This seems to be a reason of the exception.
> I also tried to used XSLT mediator with similar parameters (see below) and the property is set correctly,
> ( XSLTMediator uses SynapseXPath class for evaluating values of properties).
> <xslt key="response.xsl">
> <property name="requestBody" expression="get-property('body')"/>
> </xslt>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org