Hi,

What I mentioned was this

SandeshaContext ctx = new SandeshaContext();
if(org.apache.sandesha.Constants.SYNCHRONOUS == sync)
ctx = new SandeshaContext(sync);

Hmm, Yes, it is a possibility and thanks for letting us know this.
Will include fixes for all these in a new release.

Thanks,
Jaliya

----- Original Message ----- From: "Benjamin Schmeling" <[EMAIL PROTECTED]>
To: "Jaliya Ekanayake" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, January 18, 2006 4:44 AM
Subject: Re: Problem with mixed (oneway and twoway) calls


Hi,

Sync = true ?, I did not set sync to true and ctx.isSync() = false all the time. I think when you need a new Sandesha context for mixed calls there can result a very high network traffic because of the message overhead of reliable messaging (CreateSequence, TerminateSequence etc.). Is there no possibility to change this?

Thanks,
Benjamin

Hi Benjamin,

In sandesha you cannot mix one-way and two-way messages in a single context.
There should be two contexes for oneway and two way sequences.

This is because once we initialize a sequence with sync=true then it will not handle two-way sequences.

Thanks,
Jaliya


----- Original Message ----- From: "Benjamin Schmeling" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, January 17, 2006 9:41 AM
Subject: Problem with mixed (oneway and twoway) calls


Hi,

I have a problem when making three calls in one sequence, where the
second call is twoway and the others are oneway. The calls are all
successful but the calling of endSequence() results in an endless loop,
because the isSequenceComplete(String seqId) method of the
ClientStorageManager always returns false (because of
incomingTerminateReceived = false).

In my attachment it concerns the last test.

Thanks,

Benjamin



--------------------------------------------------------------------------------



package de.tud.ao4bpel.services.reliability.test;

import java.net.MalformedURLException;
import java.rmi.RemoteException;

import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.ServiceException;

import junit.framework.TestCase;

import org.apache.axis.Constants;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.sandesha.SandeshaContext;

public class SandeshaTest extends TestCase{


public void testCallTwowaySequence() throws ServiceException, MalformedURLException, RemoteException{
int sync = 1;
String endpoint = "http://majestix:8080/axis/services/TestWebservice";;
SandeshaContext ctx = new SandeshaContext();
if(org.apache.sandesha.Constants.SYNCHRONOUS == sync)
ctx = new SandeshaContext(sync);
// --------------------------- Init -------------------------//
String operationName = "testWSOneway1";
Service service1 = new Service();
Call call1;
call1 = (Call) service1.createCall();

ctx.initCall(call1, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_OUT);
call1.setTargetEndpointAddress( new java.net.URL(endpoint) );

call1.setOperationName(new QName("TestWebservice", operationName));
call1.addParameter("message",
            org.apache.axis.Constants.XSD_STRING,
            javax.xml.rpc.ParameterMode.IN);

call1.setReturnType(Constants.XSD_STRING);
//---------------------------- Service 1 ------------------------------- //
call1.setOperationName(new QName("TestWebservice", "testWS1"));
Object[] paramArray1 = new Object[] {"message1 sent by callOnewaySequence"};
System.out.println(call1.invoke(paramArray1));
// ---------------------------- Service 2 ------------------------------- //
Call call2;
call2 = (Call) service1.createCall();
ctx.initCall(call2, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_OUT);
call2.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call2.setReturnType(Constants.XSD_STRING);
call2.setTargetEndpointAddress( new java.net.URL(endpoint) );
call2.setOperationName(new QName("TestWebservice", "testWS2"));
Object[] paramArray2 = new Object[] {"message2 sent by callOnewaySequence"};
System.out.println(call2.invoke(paramArray2));
//---------------------------- Service 3 ------------------------------- //
Call call3;
call3 = (Call) service1.createCall();
ctx.initCall(call3, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_OUT);
call3.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call3.setReturnType(Constants.XSD_STRING);
call3.setTargetEndpointAddress( new java.net.URL(endpoint) );
call3.setOperationName(new QName("TestWebservice", "testWS3"));
ctx.setLastMessage(call3);
Object[] paramArray3 = new Object[] {"message3 sent by callOnewaySequence"};
System.out.println(call3.invoke(paramArray3));
ctx.endSequence();
}

public void testCallOnewaySequence() throws ServiceException, MalformedURLException, RemoteException{
int sync = 1;
String endpoint = "http://majestix:8080/axis/services/TestWebservice";;
SandeshaContext ctx = new SandeshaContext();
if(org.apache.sandesha.Constants.SYNCHRONOUS == sync)
ctx = new SandeshaContext(sync);
// --------------------------- Init -------------------------//
String operationName = "testWSOneway1";
Service service1 = new Service();
Call call1;
call1 = (Call) service1.createCall();

ctx.initCall(call1, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_ONLY);
call1.setTargetEndpointAddress( new java.net.URL(endpoint) );

call1.setOperationName(new QName("TestWebservice", operationName));
call1.addParameter("message",
            org.apache.axis.Constants.XSD_STRING,
            javax.xml.rpc.ParameterMode.IN);

//---------------------------- Service 1 ------------------------------- //
call1.setOperationName(new QName("TestWebservice", "testOnewayWS1"));
Object[] paramArray1 = new Object[] {"message1 sent by callOnewaySequence"};
System.out.println(call1.invoke(paramArray1));
// ---------------------------- Service 2 ------------------------------- //
Call call2;
call2 = (Call) service1.createCall();
ctx.initCall(call2, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_ONLY);
call2.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call2.setTargetEndpointAddress( new java.net.URL(endpoint) );
call2.setOperationName(new QName("TestWebservice", "testOnewayWS2"));
Object[] paramArray2 = new Object[] {"message2 sent by callOnewaySequence"};
System.out.println(call2.invoke(paramArray2));
//---------------------------- Service 3 ------------------------------- //
Call call3;
call3 = (Call) service1.createCall();
ctx.initCall(call3, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_ONLY);
call3.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call3.setTargetEndpointAddress( new java.net.URL(endpoint) );
call3.setOperationName(new QName("TestWebservice", "testOnewayWS3"));
ctx.setLastMessage(call3);
Object[] paramArray3 = new Object[] {"message3 sent by callOnewaySequence"};
System.out.println(call3.invoke(paramArray3));
ctx.endSequence();
}

public void testCallOnewaySequenceMixed() throws ServiceException, MalformedURLException, RemoteException{
int sync = 1;
String endpoint = "http://majestix:8080/axis/services/TestWebservice";;
SandeshaContext ctx = new SandeshaContext();
if(org.apache.sandesha.Constants.SYNCHRONOUS == sync)
ctx = new SandeshaContext(sync);
// --------------------------- Init -------------------------//
String operationName = "testWSOneway1";
Service service1 = new Service();
Call call1;
call1 = (Call) service1.createCall();

ctx.initCall(call1, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_ONLY);
call1.setTargetEndpointAddress( new java.net.URL(endpoint) );

call1.setOperationName(new QName("TestWebservice", operationName));
call1.addParameter("message",
            org.apache.axis.Constants.XSD_STRING,
            javax.xml.rpc.ParameterMode.IN);

//---------------------------- Service 1 ------------------------------- //
call1.setOperationName(new QName("TestWebservice", "testOnewayWS1"));
Object[] paramArray1 = new Object[] {"message1 sent by callOnewaySequence"};
System.out.println(call1.invoke(paramArray1));
// ---------------------------- Service 2 ------------------------------- //
Call call2;
call2 = (Call) service1.createCall();
ctx.initCall(call2, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_OUT);
call2.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call2.setReturnType(Constants.XSD_STRING);
call2.setTargetEndpointAddress( new java.net.URL(endpoint) );
call2.setOperationName(new QName("TestWebservice", "testWS2"));
Object[] paramArray2 = new Object[] {"message2 sent by callOnewaySequence"};
System.out.println(call2.invoke(paramArray2));
//---------------------------- Service 3 ------------------------------- //
Call call3;
call3 = (Call) service1.createCall();
ctx.initCall(call3, endpoint,
"urn:wsrm:"+operationName,org.apache.sandesha.Constants.ClientProperties.IN_ONLY);
call3.addParameter("message",
             org.apache.axis.Constants.XSD_STRING,
             javax.xml.rpc.ParameterMode.IN);
call3.setTargetEndpointAddress( new java.net.URL(endpoint) );
call3.setOperationName(new QName("TestWebservice", "testOnewayWS3"));
ctx.setLastMessage(call3);
Object[] paramArray3 = new Object[] {"message3 sent by callOnewaySequence"};
System.out.println(call3.invoke(paramArray3));
ctx.endSequence();
}

}




--------------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to