ode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buddhika chamith <chamibuddh...@gmail.com>
Subject Re: Usage of MockBpelServer
Date Wed, 01 Apr 2009 07:51:02 GMT
Hi Andi,Matthieu,

Thanks for the replies. Seems like
MessageExchangeContext.onMyRoleMessageExchangeStateChanged() is not  present
in the branch. I will try this on the trunk and see. As for the Matthieu's
suggestion I used MessageExchange.getResponse(). But then I ran in to the
some other exception. I have included the trace in the attached text file. I
am not exactly sure what causes this since I am not very familiar with

Actually I am not using MockBpelServer for testing purposes. What I want to
do is to embed ODE runtime in to one of my Eclipse plugins to be able to
directly talk to it. So I don't want to use any Integration layers (Axis) to
communicate with the engine. I saw that IL API level interfaces are used in
MockBpelServer. So I thought that it would be a good start. So my final goal
is to manage server life cycle, deployment of processes, process and
instance management capabilites, debugging and event listening capabilities
by talking to ODE directly via IL level APIs. These functionalities will be
complimented by a suitable Eclipse GUI front end. I don't know what I am
trying to achieve is realistic or the if this is the best way to achieve it.
If anyone has better suggesitons I greatly appreciate them.

Best Regards,

On Mon, Mar 30, 2009 at 8:12 PM, Matthieu Riou <matthieu.riou@gmail.com>wrote:

> Hi Chamith,
> First, you should probably direct those questions to dev@, we have few
> users playing with MockBpelServer :)
> The response isn't picked up as a direct return type from the method, it's
> actually set on the message exchange, it seems to me we're doing the correct
> thing here:
> http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/bpel-runtime/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java
> Your client should then extract the response from the MessageExchange. It's
> usually returned when you call MessageExchange.invoke() and use the Future
> but you can also use directly MessageExchange.getResponse().
> So what are you testing?
> Matthieu
> On Mon, Mar 30, 2009 at 3:17 AM, buddhika chamith <chamibuddhika@gmail.com
> > wrote:
>> Hi,
>> I am using the MockBpelServer to deploy and invoke a process. I was able
>> to
>> deploy a simple synchronous helloworld process to it. But it seems the
>> invoke method doesn't return anything as a form of response from the
>> process.(return type is void). So I changed the method to return the
>> object
>> taken from the Future class which is returned from calling invoke on
>> MyRoleMessageExchage. But I donot get any response from the process
>> invocation in that manner. It time out when I use a time duration for it
>> to
>> complete. Here is my modified invoke method. Top portion is unchanged from
>> the original method.
>>  public Object invoke(QName serviceName, String opName, Element body)
>> throws
>> Exception {
>>        try {
>>           // unchanged
>>            Future f= mex.invoke(request);
>>            mex.complete();
>>            _txManager.commit();
>>            return f.get(70000, TimeUnit.MILLISECONDS);
>>        }catch(TimeoutException e){
>>            e.printStackTrace();
>>            throw new Exception();
>>        }catch (Exception except) {
>>              _txManager.rollback();
>>              throw except;
>>        }
>> }
>> Any help in this regard is greatly appreciated. Is there a better way to
>> start the engine, deploy, invoke and get a response from a process using
>> IL
>> API level interfaces?
>> Regards,
>> Chamith

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message