You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Sebastian Gomez <sa...@gmail.com> on 2008/06/23 13:34:21 UTC
ASYNC testing doesn't work?
Hi.
I'm trying to do a test case expecting an asyncronous response. If I
write "response1=ASYNC" in the response1 field (as it says in the ode
user guide) I get the following error:
test1.properties#1: Unexpected final message exchange status; got
ASYNC, expected RESPONSE
What am I supposed to write in the response line to expect an ASYNC response?
Thanks in advance.
Sebastian Gomez.
Re: ASYNC testing doesn't work?
Posted by Sebastian Gomez <sa...@gmail.com>.
Here's my process. I hope you find your way through it. If you need
the WSDLs I'll also send them, but I guess the only important parts
are that the AsyncPLT has 2 roles, while the SyncPLT has 1, and that
the "init" operation has just an input message, with no output, while
the "async" and "sync" operations do have input and output. It's the
"init" operation that fails with the "test1.properties#1: Unexpected
final message exchange status; got ASYNC, expected RESPONSE".
Thanks in advance.
<process name="AsyncVsSync"
targetNamespace="http://my.namespace.com/"
xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:tns="http://my.namespace.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:mynamespacewsdl="http://my.namespace.com/wsdl"
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
xmlns:mynamespacedomain="http://my.namespace.com/domain/"
xmlns:prb="http://ode/bpel/unit-test/ProbeService.wsdl">
<import location="AsyncVsSync.wsdl"
namespace="http://my.namespace.com/wsdl"
importType="http://schemas.xmlsoap.org/wsdl/" />
<import location="ProbeService/ProbeService.wsdl"
namespace="http://ode/bpel/unit-test/ProbeService.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/" />
<partnerLinks>
<partnerLink name="AsyncPartnerLink"
partnerLinkType="mynamespacewsdl:AsyncPartnerLinkType"
myRole="me" />
<partnerLink name="SyncPartnerLink"
partnerLinkType="mynamespacewsdl:SyncPartnerLinkType"
myRole="service" />
<partnerLink name="probe"
partnerLinkType="mynamespacewsdl:probeRequest"
partnerRole="probeService"
initializePartnerRole="yes"/>
</partnerLinks>
<correlationSets>
<correlationSet name="testCorr1" properties="mynamespacewsdl:corrID"/>
<!-- <correlationSet name="testCorr2"
properties="mynamespacewsdl:corrID"/> -->
</correlationSets>
<variables>
<variable name="myVar" messageType="mynamespacewsdl:HelloMessage"/>
<variable name="myVar2" messageType="mynamespacewsdl:OdeResponseMessage"/>
<variable name="myVar3" messageType="mynamespacewsdl:HelloMessage"/>
<variable name="probeInput" messageType="prb:probeMessage"/>
</variables>
<sequence>
<!-- Trigger the process -->
<receive
name="start"
partnerLink="AsyncPartnerLink"
portType="euferwsdl:AsyncVsSyncPortType"
operation="init"
variable="myVar"
createInstance="yes" >
<correlations>
<correlation set="testCorr1" initiate="yes"/>
<!-- <correlation set="testCorr2" initiate="yes"/> -->
</correlations>
</receive>
<!-- Loop forever -->
<while>
<condition>'1'='1'</condition>
<pick name="AsyncVsSync">
<!-- Receive asyncronous exchange -->
<onMessage
partnerLink="AsyncPartnerLink"
portType="mynamespacewsdl:AsyncVsSyncPortType"
operation="async"
variable="myVar3">
<correlations>
<correlation set="testCorr1" initiate="no"/>
</correlations>
<sequence>
<assign name="Async">
<copy>
<from><literal>Async</literal></from>
<to variable="probeInput" part="probeName"/>
</copy>
</assign>
<invoke name="probeAsync" partnerLink="probe"
portType="prb:probeMessagePT"
operation="probe" inputVariable="probeInput"
outputVariable="probeInput" />
<assign name="PrepareAsyncOutput">
<copy>
<from variable="probeInput" part="probeData"/>
<to variable="myVar2" part="Response"/>
</copy>
</assign>
<reply name="endAsync"
partnerLink="AsyncPartnerLink"
portType="mynamespacewsdl:AsyncVsSyncPortType"
operation="async"
variable="myVar2"/>
</sequence>
</onMessage>
<!-- Receive syncronous exchange -->
<onMessage
partnerLink="SyncPartnerLink"
portType="mynamespacewsdl:AsyncVsSyncPortType"
operation="sync"
variable="myVar3">
<correlations>
<correlation set="testCorr1" initiate="no"/>
</correlations>
<sequence>
<assign name="Sync">
<copy>
<from><literal>Sync</literal></from>
<to variable="probeInput" part="probeName"/>
</copy>
</assign>
<invoke name="probeSync" partnerLink="probe"
portType="prb:probeMessagePT"
operation="probe" inputVariable="probeInput"
outputVariable="probeInput" />
<assign name="PrepareSyncOutput">
<copy>
<from variable="probeInput" part="probeData"/>
<to variable="myVar2" part="Response"/>
</copy>
</assign>
<reply name="endSync"
partnerLink="SyncPartnerLink"
portType="mynamespacewsdl:AsyncVsSyncPortType"
operation="sync"
variable="myVar2"/>
</sequence>
</onMessage>
</pick>
</while>
</sequence>
</process>
On Mon, Jun 23, 2008 at 4:59 PM, Sebastian Gomez <sa...@gmail.com> wrote:
> Hi.
>
> Maybe I haven't understood 100% how ODE works. I've seen that the 3
> possible outcomes of a test are "RESPONSE", "ASYNC" and
> "COMPLETED_OK". I've seen that in the bpel_test package most
> test.properties leave the "response1" line blank, meaning they expect
> the "COMPLETED_OK" outcome. The rest of them use a regular expression
> that will correspond to the "RESPONSE". The problem is that I haven't
> seen any test case using ASYNC. What I think happens to my process is
> that it takes the "ASYNC" I write in the test.properties as a regular
> expression, so it considers it is waiting for a RESPONSE instead of
> for an asyncronous answer. This makes me think that maybe there's
> something special in the way of using "ASYNC", and as I haven't seen
> any example I can't be sure of how it works (apart from the snippet in
> ODE's web, but it's not part of a test case).
>
> Is there any example of how to expect an ASYNC response anywhere? I'll
> post my process ASAP, because I had just made a few modifications to
> try to continue without using the ASYNC.
>
> Thanks for answering.
>
> Sebastian Gomez.
>
> On Mon, Jun 23, 2008 at 4:25 PM, Matthieu Riou <ma...@offthelip.org> wrote:
>> On Mon, Jun 23, 2008 at 4:34 AM, Sebastian Gomez <sa...@gmail.com> wrote:
>>
>>> Hi.
>>>
>>> I'm trying to do a test case expecting an asyncronous response. If I
>>> write "response1=ASYNC" in the response1 field (as it says in the ode
>>> user guide) I get the following error:
>>>
>>> test1.properties#1: Unexpected final message exchange status; got
>>> ASYNC, expected RESPONSE
>>>
>>> What am I supposed to write in the response line to expect an ASYNC
>>> response?
>>>
>>
>> Without seeing your process it's hard to tell but it's probably related to
>> its design. Do you have a reply for this message? If it's marked async you
>> shouldn't.
>>
>> Matthieu
>>
>>
>>>
>>> Thanks in advance.
>>>
>>> Sebastian Gomez.
>>>
>>
>
Re: ASYNC testing doesn't work?
Posted by Sebastian Gomez <sa...@gmail.com>.
Hi.
Maybe I haven't understood 100% how ODE works. I've seen that the 3
possible outcomes of a test are "RESPONSE", "ASYNC" and
"COMPLETED_OK". I've seen that in the bpel_test package most
test.properties leave the "response1" line blank, meaning they expect
the "COMPLETED_OK" outcome. The rest of them use a regular expression
that will correspond to the "RESPONSE". The problem is that I haven't
seen any test case using ASYNC. What I think happens to my process is
that it takes the "ASYNC" I write in the test.properties as a regular
expression, so it considers it is waiting for a RESPONSE instead of
for an asyncronous answer. This makes me think that maybe there's
something special in the way of using "ASYNC", and as I haven't seen
any example I can't be sure of how it works (apart from the snippet in
ODE's web, but it's not part of a test case).
Is there any example of how to expect an ASYNC response anywhere? I'll
post my process ASAP, because I had just made a few modifications to
try to continue without using the ASYNC.
Thanks for answering.
Sebastian Gomez.
On Mon, Jun 23, 2008 at 4:25 PM, Matthieu Riou <ma...@offthelip.org> wrote:
> On Mon, Jun 23, 2008 at 4:34 AM, Sebastian Gomez <sa...@gmail.com> wrote:
>
>> Hi.
>>
>> I'm trying to do a test case expecting an asyncronous response. If I
>> write "response1=ASYNC" in the response1 field (as it says in the ode
>> user guide) I get the following error:
>>
>> test1.properties#1: Unexpected final message exchange status; got
>> ASYNC, expected RESPONSE
>>
>> What am I supposed to write in the response line to expect an ASYNC
>> response?
>>
>
> Without seeing your process it's hard to tell but it's probably related to
> its design. Do you have a reply for this message? If it's marked async you
> shouldn't.
>
> Matthieu
>
>
>>
>> Thanks in advance.
>>
>> Sebastian Gomez.
>>
>
Re: ASYNC testing doesn't work?
Posted by Matthieu Riou <ma...@offthelip.org>.
On Mon, Jun 23, 2008 at 4:34 AM, Sebastian Gomez <sa...@gmail.com> wrote:
> Hi.
>
> I'm trying to do a test case expecting an asyncronous response. If I
> write "response1=ASYNC" in the response1 field (as it says in the ode
> user guide) I get the following error:
>
> test1.properties#1: Unexpected final message exchange status; got
> ASYNC, expected RESPONSE
>
> What am I supposed to write in the response line to expect an ASYNC
> response?
>
Without seeing your process it's hard to tell but it's probably related to
its design. Do you have a reply for this message? If it's marked async you
shouldn't.
Matthieu
>
> Thanks in advance.
>
> Sebastian Gomez.
>