You are viewing a plain text version of this content. The canonical link for it is here.
Posted to agila-user@incubator.apache.org by Ni...@ibsbe.be on 2005/11/02 14:12:23 UTC
ok
Hi,
I've spend some time experimenting with twister and there is one thing
that i don't understand.
When i try to run a process who invokes another webservice (like example 3
from the distribution), i get
<message><reply><status>ok</status></reply></message> as return value form
that web service instead of the corresponding returnvalue (the quote in
example 3) Is this normal? Or why don't i get the correspondig quote from
a given symbol ?
Thanks in advance
Niko
Re: ok
Posted by Ni...@ibsbe.be.
Ok, sorry to disturb you all again :-)
Now i am stuck again at the point of
<message><reply><status>ok</status></reply></message>
I made some changes to the process.xml file (added the reply):
<?xml version="1.0" encoding="UTF-8"?>
<process name="stockQuoteProcess"
targetNamespace="http://www.smartcomps.org/twister/samples/exemple3/process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:lns="http://www.smartcomps.org/twister/samples/exemple3/definition/">
<partnerLinks>
<partnerLink name="stockInitiator"
partnerLinkType="lns:stockInitiatorLinkType" myRole="initiator"/>
<partnerLink name="stockLink" partnerLinkType="lns:stockLinkType"
partnerRole="stockService"/>
</partnerLinks>
<variables>
<variable name="inputSymbol" messageType="xsd:string"/>
<variable name="outputQuote" messageType="xsd:float"/>
</variables>
<sequence>
<receive partnerLink="stockInitiator"
portType="initiatorPT"
operation="initiate"
variable="inputSymbol"
createInstance="yes"/>
<invoke partnerLink="stockLink"
portType="net.xmethods.services.stockquote.StockQuotePortType"
operation="getQuote"
inputVariable="inputSymbol"
outputVariable="outputQuote"/>
<reply partnerLink="stockInitiator"
portType="initiatorPT"
operation="initiate"
variable="outputQuote"/>
</sequence>
</process>
When i run this process, i see in the logfile
[Twister] DEBUG [http-8080-Processor5] EngineWSA.sendToEngine(103) |
Producing reply: <?xml version="1.0" encoding="UTF-8"?>
<message><reply><status>ok</status></reply></message>
[Twister] DEBUG [http-8080-Processor7] TwisterEngine.sendMessage(247) |
Document sent.
I tried also something else : i added an assign between the receive and
invoke and another assign between the invoke and reply
[Twister] INFO [http-8080-Processor2]
DefaultMessageBrokerImpl.syncSend(60) | Send a synchronous message with
partner = stockLink, portType =
{http://www.smartcomps.org/twister/samples/exemple3/process/}net.xmethods.services.stockquote.StockQuotePortType,
operation = getQuote and message <?xml version="1.0" encoding="UTF-8"?>
<message><symbol>AAPL</symbol></message>
org.smcp.twister.engine.exception.SelectionFailureException:
org.smcp.twister.engine.common.persistence.FinderException: The path used
in the queryDocument method should return a set containing only one value.
Querying document <?xml version="1.0" encoding="UTF-8"?>
<message><reply><status>ok</status></reply></message> with query
/message/Result
at
org.smcp.twister.engine.priv.core.dynamic.impl.AssignECImpl.getFromAssignment(AssignECImpl.java:75)
at
org.smcp.twister.engine.priv.core.dynamic.impl.AssignECImpl.execute(AssignECImpl.java:41)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.executeContextAt(SequenceECImpl.java:66)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.notifyTermination(SequenceECImpl.java:52)
at
org.smcp.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl.notifyTerminationToContainer(ExecutionContextImpl.java:157)
at
org.smcp.twister.engine.priv.core.dynamic.impl.InvokeECImpl.execute(InvokeECImpl.java:72)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.executeContextAt(SequenceECImpl.java:66)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.notifyTermination(SequenceECImpl.java:52)
at
org.smcp.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl.notifyTerminationToContainer(ExecutionContextImpl.java:157)
at
org.smcp.twister.engine.priv.core.dynamic.impl.AssignECImpl.execute(AssignECImpl.java:59)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.executeContextAt(SequenceECImpl.java:66)
at
org.smcp.twister.engine.priv.core.dynamic.impl.SequenceECImpl.notifyTermination(SequenceECImpl.java:52)
at
org.smcp.twister.engine.priv.core.dynamic.impl.ExecutionContextImpl.notifyTerminationToContainer(ExecutionContextImpl.java:157)
at
org.smcp.twister.engine.priv.core.dynamic.impl.ReceiveECImpl.acknowledgeMessage(ReceiveECImpl.java:57)
at
org.smcp.twister.engine.priv.TwisterEngineImpl.syncAcknowledge(TwisterEngineImpl.java:233)
at
org.smcp.twister.engine.priv.TwisterEngineImpl.acknowledge(TwisterEngineImpl.java:106)
at org.smcp.twister.wsa.EngineWSA.sendToEngine(EngineWSA.java:71)
at org.smcp.twister.wsa.EngineWSA.acknowledge(EngineWSA.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:155)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
I do somehing wrong but i can't see what it is
Thanks in advance
Niko
Matthieu Riou <ma...@gmail.com>
02/11/2005 16:23
Please respond to
agila-user@incubator.apache.org
To
agila-user@incubator.apache.org
cc
Subject
Re: <message><reply><status>ok</status></reply></message>
Either by adding an invoke in your process that will call your client back
or using the receive / reply combination I described.
Cheers,
Matt.
On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
>
> Thanks for the replies.
>
> I have now another (stupid, i know, i'm quite new to bpel) question. How
> does the client retrieve the quote value from twister?
>
>
> Thanks in advance,
>
> Niko
>
>
>
>
>
>
> Aleksander Slominski <as...@cs.indiana.edu>
> 02/11/2005 15:46
> Please respond to
> agila-user@incubator.apache.org
>
>
> To
> agila-user@incubator.apache.org
> cc
>
> Subject
> Re: <message><reply><status>ok</status></reply></message>
>
>
>
>
>
>
> Matthieu Riou wrote:
>
> >Hi Niko,
> >
> >This is quite normal as most of the engine processing and the
invocation
> >itself generally occurs asynchronously. Agila BPEL only tells you if
the
> >message has been accepted properly but can't force the calling thread
to
> >wait until another web service has been invoked, that just wouldn't
make
> >sense in the great majority of situations.
> >
> >
> i think the standard (?!) way to do it with WS-Addressing / HTTP is to
> return HTTP 202 status code and no HTTP body?
>
> best,
>
> alek
>
> >However if you want a given execution to be totally synchronous when
> >invoking the engine, you'll have to use a receive / reply sequence (and
> use
> >an outputVariable for the invokes in between for which you'll use the
> result
> >in your reply).
> >
> >For example:
> >
> ><sequence>
> ><receive partner="client" .../>
> ><invoke partner="quoteProvider" ... outputVariable="quotes" ... />
> ><reply partner="client" ... variable="quotes" ... />
> ></sequence>
> >
> >Hope this helps. Cheers,
> >
> >Matthieu Riou.
> >
> >On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
> >
> >
> >>Hi,
> >>I've spend some time experimenting with twister and there is one thing
> >>that i don't understand.
> >>When i try to run a process who invokes another webservice (like
example
> 3
> >>from the distribution), i get
> >><message><reply><status>ok</status></reply></message> as return value
> form
> >>that web service instead of the corresponding returnvalue (the quote
in
> >>example 3) Is this normal? Or why don't i get the correspondig quote
> from
> >>a given symbol ?
> >>
> >>Thanks in advance
> >>Niko
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
>
>
Re: ok
Posted by Matthieu Riou <ma...@gmail.com>.
Either by adding an invoke in your process that will call your client back
or using the receive / reply combination I described.
Cheers,
Matt.
On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
>
> Thanks for the replies.
>
> I have now another (stupid, i know, i'm quite new to bpel) question. How
> does the client retrieve the quote value from twister?
>
>
> Thanks in advance,
>
> Niko
>
>
>
>
>
>
> Aleksander Slominski <as...@cs.indiana.edu>
> 02/11/2005 15:46
> Please respond to
> agila-user@incubator.apache.org
>
>
> To
> agila-user@incubator.apache.org
> cc
>
> Subject
> Re: <message><reply><status>ok</status></reply></message>
>
>
>
>
>
>
> Matthieu Riou wrote:
>
> >Hi Niko,
> >
> >This is quite normal as most of the engine processing and the invocation
> >itself generally occurs asynchronously. Agila BPEL only tells you if the
> >message has been accepted properly but can't force the calling thread to
> >wait until another web service has been invoked, that just wouldn't make
> >sense in the great majority of situations.
> >
> >
> i think the standard (?!) way to do it with WS-Addressing / HTTP is to
> return HTTP 202 status code and no HTTP body?
>
> best,
>
> alek
>
> >However if you want a given execution to be totally synchronous when
> >invoking the engine, you'll have to use a receive / reply sequence (and
> use
> >an outputVariable for the invokes in between for which you'll use the
> result
> >in your reply).
> >
> >For example:
> >
> ><sequence>
> ><receive partner="client" .../>
> ><invoke partner="quoteProvider" ... outputVariable="quotes" ... />
> ><reply partner="client" ... variable="quotes" ... />
> ></sequence>
> >
> >Hope this helps. Cheers,
> >
> >Matthieu Riou.
> >
> >On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
> >
> >
> >>Hi,
> >>I've spend some time experimenting with twister and there is one thing
> >>that i don't understand.
> >>When i try to run a process who invokes another webservice (like example
> 3
> >>from the distribution), i get
> >><message><reply><status>ok</status></reply></message> as return value
> form
> >>that web service instead of the corresponding returnvalue (the quote in
> >>example 3) Is this normal? Or why don't i get the correspondig quote
> from
> >>a given symbol ?
> >>
> >>Thanks in advance
> >>Niko
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
>
>
Re: ok
Posted by Matthieu Riou <ma...@gmail.com>.
Yes, you're right, the response produced by the engine should be normalized.
And we still have to implement WS-Addressing support :)
Matt.
On 11/2/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
>
> Matthieu Riou wrote:
>
> >Hi Niko,
> >
> >This is quite normal as most of the engine processing and the invocation
> >itself generally occurs asynchronously. Agila BPEL only tells you if the
> >message has been accepted properly but can't force the calling thread to
> >wait until another web service has been invoked, that just wouldn't make
> >sense in the great majority of situations.
> >
> >
> i think the standard (?!) way to do it with WS-Addressing / HTTP is to
> return HTTP 202 status code and no HTTP body?
>
> best,
>
> alek
>
> >However if you want a given execution to be totally synchronous when
> >invoking the engine, you'll have to use a receive / reply sequence (and
> use
> >an outputVariable for the invokes in between for which you'll use the
> result
> >in your reply).
> >
> >For example:
> >
> ><sequence>
> ><receive partner="client" .../>
> ><invoke partner="quoteProvider" ... outputVariable="quotes" ... />
> ><reply partner="client" ... variable="quotes" ... />
> ></sequence>
> >
> >Hope this helps. Cheers,
> >
> >Matthieu Riou.
> >
> >On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
> >
> >
> >>Hi,
> >>I've spend some time experimenting with twister and there is one thing
> >>that i don't understand.
> >>When i try to run a process who invokes another webservice (like example
> 3
> >>from the distribution), i get
> >><message><reply><status>ok</status></reply></message> as return value
> form
> >>that web service instead of the corresponding returnvalue (the quote in
> >>example 3) Is this normal? Or why don't i get the correspondig quote
> from
> >>a given symbol ?
> >>
> >>Thanks in advance
> >>Niko
> >>
> >>
> >>
> >
> >
> >
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
Re: ok
Posted by Ni...@ibsbe.be.
Thanks for the replies.
I have now another (stupid, i know, i'm quite new to bpel) question. How
does the client retrieve the quote value from twister?
Thanks in advance,
Niko
Aleksander Slominski <as...@cs.indiana.edu>
02/11/2005 15:46
Please respond to
agila-user@incubator.apache.org
To
agila-user@incubator.apache.org
cc
Subject
Re: <message><reply><status>ok</status></reply></message>
Matthieu Riou wrote:
>Hi Niko,
>
>This is quite normal as most of the engine processing and the invocation
>itself generally occurs asynchronously. Agila BPEL only tells you if the
>message has been accepted properly but can't force the calling thread to
>wait until another web service has been invoked, that just wouldn't make
>sense in the great majority of situations.
>
>
i think the standard (?!) way to do it with WS-Addressing / HTTP is to
return HTTP 202 status code and no HTTP body?
best,
alek
>However if you want a given execution to be totally synchronous when
>invoking the engine, you'll have to use a receive / reply sequence (and
use
>an outputVariable for the invokes in between for which you'll use the
result
>in your reply).
>
>For example:
>
><sequence>
><receive partner="client" .../>
><invoke partner="quoteProvider" ... outputVariable="quotes" ... />
><reply partner="client" ... variable="quotes" ... />
></sequence>
>
>Hope this helps. Cheers,
>
>Matthieu Riou.
>
>On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
>
>
>>Hi,
>>I've spend some time experimenting with twister and there is one thing
>>that i don't understand.
>>When i try to run a process who invokes another webservice (like example
3
>>from the distribution), i get
>><message><reply><status>ok</status></reply></message> as return value
form
>>that web service instead of the corresponding returnvalue (the quote in
>>example 3) Is this normal? Or why don't i get the correspondig quote
from
>>a given symbol ?
>>
>>Thanks in advance
>>Niko
>>
>>
>>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay
Re: ok
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Matthieu Riou wrote:
>Hi Niko,
>
>This is quite normal as most of the engine processing and the invocation
>itself generally occurs asynchronously. Agila BPEL only tells you if the
>message has been accepted properly but can't force the calling thread to
>wait until another web service has been invoked, that just wouldn't make
>sense in the great majority of situations.
>
>
i think the standard (?!) way to do it with WS-Addressing / HTTP is to
return HTTP 202 status code and no HTTP body?
best,
alek
>However if you want a given execution to be totally synchronous when
>invoking the engine, you'll have to use a receive / reply sequence (and use
>an outputVariable for the invokes in between for which you'll use the result
>in your reply).
>
>For example:
>
><sequence>
><receive partner="client" .../>
><invoke partner="quoteProvider" ... outputVariable="quotes" ... />
><reply partner="client" ... variable="quotes" ... />
></sequence>
>
>Hope this helps. Cheers,
>
>Matthieu Riou.
>
>On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
>
>
>>Hi,
>>I've spend some time experimenting with twister and there is one thing
>>that i don't understand.
>>When i try to run a process who invokes another webservice (like example 3
>>from the distribution), i get
>><message><reply><status>ok</status></reply></message> as return value form
>>that web service instead of the corresponding returnvalue (the quote in
>>example 3) Is this normal? Or why don't i get the correspondig quote from
>>a given symbol ?
>>
>>Thanks in advance
>>Niko
>>
>>
>>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay
Re: ok
Posted by Matthieu Riou <ma...@gmail.com>.
Hi Niko,
This is quite normal as most of the engine processing and the invocation
itself generally occurs asynchronously. Agila BPEL only tells you if the
message has been accepted properly but can't force the calling thread to
wait until another web service has been invoked, that just wouldn't make
sense in the great majority of situations.
However if you want a given execution to be totally synchronous when
invoking the engine, you'll have to use a receive / reply sequence (and use
an outputVariable for the invokes in between for which you'll use the result
in your reply).
For example:
<sequence>
<receive partner="client" .../>
<invoke partner="quoteProvider" ... outputVariable="quotes" ... />
<reply partner="client" ... variable="quotes" ... />
</sequence>
Hope this helps. Cheers,
Matthieu Riou.
On 11/2/05, Niko.Juncker@ibsbe.be <Ni...@ibsbe.be> wrote:
>
> Hi,
> I've spend some time experimenting with twister and there is one thing
> that i don't understand.
> When i try to run a process who invokes another webservice (like example 3
> from the distribution), i get
> <message><reply><status>ok</status></reply></message> as return value form
> that web service instead of the corresponding returnvalue (the quote in
> example 3) Is this normal? Or why don't i get the correspondig quote from
> a given symbol ?
>
> Thanks in advance
> Niko
>