Hi Tom,
 
As you have mentioned, since the second web service is invoked , the order and the invocation is correct. Only problem is you are not getting any responses.
The problem is the way you use the SandeshaContext inside the first web service.
 
When you need to use Sandesha inside a web service the SandeshaContext should be initialized as follows.
 
SandeshaContext ctx= new SandeshaContext(false); //This is to inform that a separate listener is not required for this invocation as we can accept the response using the same sever.
 
So to configure replyTo and ackTo correctly please read the userguide's "Using RMSource Inside a Server" http://ws.apache.org/sandesha/userguide.html
section and configure RMService correctly.
 
That is it and your scenario should work.
Hope this helps.
 
Jaliya
 
 
 
 
 
 
----- Original Message -----
Sent: Monday, March 06, 2006 11:20 AM
Subject: Problem with more then one Context.

Hello all,

 

I’m faced with the following problem.

 

I have a Client program that calls on a Web Service by using Sandesha 1. On that Web Service I’ve programmed code for calling on another Web Service, also with Sandesha.

Now, my problem is the next: The second Web Service is being totally executed, but the first doesn’t. I don’t receive any response.

I hope someone can help me out here.

 

This is the code I use in my Client program to invoke the Web Service which invokes the other Web Service:

 

                Service clientService = new Service();

            clientCall = (Call) clientService.createCall();

 

            clientCall.setEncodingStyle(null);

 

            ctxClient = new SandeshaContext(new Integer(9191));

 

            ctxClient.setAcksToURL("http://10.0.0.22:" + 9191 + "/axis/services/RMService");

            ctxClient.setReplyToURL("http://10.0.0.22:" + 9191 + "/axis/services/RMService");

            ctxClient.initCall(clientCall, targetURL, "urn:wsrm:run", Constants.ClientProperties.IN_OUT);

 

            clientCall.setTargetEndpointAddress(new java.net.URL(targetURL));

            clientCall.setOperationName(new QName("urn:run", "run"));

            clientCall.setReturnType(new QName("urn:String"), String.class);

 

            ctxClient.setLastMessage(clientCall);

 

            transactionID = (String) clientCall.invoke(new Object []{});

 

            RMReport report = ctxClient.endSequence();

 

 

I’ve attached the file Controller.java. This is the class which is used as Web Service (called on by the above code).

 

I hope you can help me, cause I don’t see any way out anymore.

 

 

Thanks for your time.

 

Kind regards,

 

Tom De Coster.


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

Reply via email to