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
<chamibuddh...@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
>

Reply via email to