synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Stochmialek (JIRA)" <>
Subject [jira] Created: (SYNAPSE-503) get-property function is not recognized in xquery variable expression attribute
Date Fri, 13 Feb 2009 20:02:59 GMT
get-property function is not recognized in xquery variable expression attribute

                 Key: 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')"

On the runtime I've got following exception:

2009-02-13 20:42:07,359 [] [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=""
xmlns:wsa="" xmlns:kom=""><soapenv:Header>
[...header contents...]</soapenv:Header>[... payload contents...]
	at org.apache.synapse.mediators.xquery.MediatorCustomVariable.handleException(
	at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluate(
	at org.apache.synapse.mediators.xquery.MediatorCustomVariable.evaluateValue(
	at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(
	at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(
	at org.apache.synapse.mediators.AbstractListMediator.mediate(
	at org.apache.synapse.config.xml.AnonymousListMediator.mediate(
	at org.apache.synapse.config.xml.SwitchCase.mediate(
	at org.apache.synapse.mediators.filters.SwitchMediator.mediate(
	at org.apache.synapse.mediators.AbstractListMediator.mediate(
	at org.apache.synapse.mediators.base.SequenceMediator.mediate(
	at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(
	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(
	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(
	at org.apache.axis2.engine.AxisEngine.receive(
	at org.apache.axis2.transport.base.threads.NativeWorkerPool$
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$
2009-02-13 20:42:07,359 [] [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
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:
For additional commands, e-mail:

View raw message