synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "indika priyantha kumara (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SYNAPSE-198) The value is retrived as a text node from an expression defined inside an Xquery mediator
Date Tue, 18 Dec 2007 08:34:43 GMT

     [ https://issues.apache.org/jira/browse/SYNAPSE-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

indika priyantha kumara resolved SYNAPSE-198.
---------------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.1.1-QA-B1)
                   NIGHTLY

fixed the issue and update the sample 390 for check the issue 

> The value is retrived as a text node from an expression defined inside an Xquery mediator
> -----------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-198
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-198
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1
>         Environment: Ubuntu7.04, JDK1.5.0_12
>            Reporter: Evanthika Amarasiri
>            Assignee: indika priyantha kumara
>             Fix For: NIGHTLY
>
>
> Created a sequence as below and invoked a client but the expression returns a text node
and not the actual value of the specified expression.
>     <sequence statistics="enable" name="xquery_calc">
>         <in>
>             <xquery key="xquery-key-req-add">
>                 <variable xmlns:m0="http://calc.math.com" xmlns:ns1="http://org.apache.synapse/xsd"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="x" expression="self::node()//m0:add/m0:x/child::text()"
type="INTEGER"/>
>                 <variable xmlns:m0="http://calc.math.com" xmlns:ns1="http://org.apache.synapse/xsd"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="y" expression="self::node()//m0:add/m0:y/child::text()"
type="INTEGER"/>
>             </xquery>
>             <send>
>                 <endpoint>
>                     <address uri="http://localhost:9000/soap/Calculator"/>
>                 </endpoint>
>             </send>
>         </in>
>         <out>
>             <xquery key="xquery-key-res-add">
>                 <variable xmlns:m0="http://calc.math.com" xmlns:ns1="http://org.apache.synapse/xsd"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="return" expression="//m0:addResponse/m0:return/child::text()"
type="INT"/>
>             </xquery>
>             <send/>
>         </out>
>     </sequence>
> Exception thrown
> ==============
> 2007-12-18 11:52:39,106 [10.100.1.97-testc-ubuntu] [HttpServerWorker-11] DEBUG XQueryMediator
Prepare an expression for the query 
> 2007-12-18 11:52:39,109 [10.100.1.97-testc-ubuntu] [HttpServerWorker-11] DEBUG XQueryMediator
Binding  external variables to the DynamicContext
> 2007-12-18 11:52:39,113 [10.100.1.97-testc-ubuntu] [HttpServerWorker-11] DEBUG XQueryMediator
Binding a variable to the DynamicContext with a name : x and a value : org.apache.axiom.om.impl.llom.OMTextImpl@d4694f
> 2007-12-18 11:52:39,113 [10.100.1.97-testc-ubuntu] [HttpServerWorker-11] ERROR XQueryMediator
Incompatible type for the Int
> 2007-12-18 11:52:39,113 [10.100.1.97-testc-ubuntu] [HttpServerWorker-11] ERROR XQueryMediator
Unable to execute the query 
>   declare namespace m0="http://calc.math.com";
>   declare namespace xs="http://www.w3.org/2001/XMLSchema";
>   declare variable $x as xs:integer external;
>   declare variable $y as xs:integer external;
>   <m0:add xmlns:m0="http://calc.math.com">
>     <m0:x>{$x+$x*10}</m0:x>
>     <m0:y>{$y+$y*10}</m0:y>    
>   </m0:add>
> org.apache.synapse.SynapseException: Incompatible type for the Int
>         at org.apache.synapse.mediators.xquery.XQueryMediator.handleException(XQueryMediator.java:561)
>         at org.apache.synapse.mediators.xquery.XQueryMediator.bindVariable(XQueryMediator.java:377)
>         at org.apache.synapse.mediators.xquery.XQueryMediator.performQuery(XQueryMediator.java:245)
>         at org.apache.synapse.mediators.xquery.XQueryMediator.mediate(XQueryMediator.java:134)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>         at org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:60)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:122)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:171)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:122)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:154)
>         at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:89)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
>         at org.apache.synapse.transport.nhttp.ServerWorker.processPost(ServerWorker.java:219)
>         at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:183)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)

-- 
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: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message