Sent: Friday, March 10, 2006 3:29
AM
Subject: RE: Problem with more then one
Context.
Hi Jaliya,
It's working! Really great! Thanks for your
time!
I promiss you we'll put some special thanks for you in our
report.
Great great thanks!
Tom.
-----Oorspronkelijk
bericht-----
Van: Jaliya Ekanayake [mailto:[EMAIL PROTECTED]]
Verzonden: vr 10-3-2006 4:21
Aan:
De Coster Tom; Jaliya Ekanayake
Onderwerp: Re: Problem with more then one
Context.
RE: Problem with more then one Context.Hi Tom,
This is
what I found.
Clarification: The order of events is Client -> WebService
A ->Web Service B
In client you should have
ctxClient = new
SandeshaContext(new Integer(9191));
ctx.setAcksToURL("http://10.0.0.22" + ":" + defaultClientPort +
"/axis/services/RMService");
ctx.setReplyToURL("http://10.0.0.22" + ":" + defaultClientPort +
"/axis/services/RMService");
In the web service A you should
set
ctxClient = new SandeshaContext(false);
ctx.setAcksToURL("http://10.0.0.22" + ":" + defaultServerPort+
"/axis/services/RMService");
ctx.setReplyToURL("http://10.0.0.22" + ":" + defaultServerPort+
"/axis/services/RMService");
*** Check it should be server port and the
server address. Although it is a cleint it runs in a web server, so the port
and the url should be the server's one.
In addition I found that you have
commented those lines in the getPatient() method.
Check those
things and if you have any problems let me know. One other thing to check is
what is your target url in the
client.
Thanks,
Jaliya
----- Original
Message -----
From: De Coster Tom
To: Jaliya
Ekanayake
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 09,
2006 10:10 AM
Subject: RE: Problem with more then one
Context.
I've putted the originals as attahcment, maybe your
gmail account can receive them.
But I've attached them also with
another extension. I've made it wsdde, so maybe he doesn't filter
that.
Hope you'll receive them now.
Thanks.
Tom
-----Oorspronkelijk
bericht-----
Van: Jaliya Ekanayake [mailto:[EMAIL PROTECTED]]
Verzonden: do 9-3-2006
13:57
Aan: De Coster Tom; Jaliya Ekanayake
Onderwerp: Re:
Problem with more then one Context.
Hi Tom,
I am
not getting the attachments. :(
May be one of the systems filters
them.
If it is my side please cc to
[EMAIL PROTECTED]
Thanks,
Jaliya
-----
Original Message -----
From: "De Coster Tom"
<[EMAIL PROTECTED]>
To: "Jaliya Ekanayake"
<[EMAIL PROTECTED]>
Sent: Thursday, March 09, 2006 3:17
AM
Subject: RE: Problem with more then one
Context.
Now with attachment :-)
ZZZDeployFacadeServiceSandeshaWay.wsdd --> the descriptor for the
first
service
ZZZDeployWebServiceGetPatient.wsdd and
ZZZDeployWebServiceInsertPatient.wsdd
are the descriptors for the
WebServices which are invoked by the first
WebService.
Thanks for your time, but if you don't have time for it we understand
it
completely.
Kind regards,
Tom.
-----Oorspronkelijk bericht-----
Van: Jaliya
Ekanayake [mailto:[EMAIL PROTECTED]]
Verzonden:
wo 8-3-2006 17:38
Aan: De Coster Tom; Jaliya Ekanayake
Onderwerp: Re: Problem with more then one Context.
You forgot
the attachements :)
Just send me the files, I will see what I can
do
Jaliya
----- Original Message -----
From:
"De Coster Tom" <[EMAIL PROTECTED]>
To: "Jaliya
Ekanayake" <[EMAIL PROTECTED]>
Sent: Wednesday, March 08, 2006
3:21 AM
Subject: RE: Problem with more then one
Context.
Hi,
I'm sorry if I'm taking too much
of your time. But I'm just a student who
has to work with Sandesha,
but this latest thing I can't get it right.
I've attached my wsdd
files. The DeployFaceServiceSandeshaWay.wsdd is the
deployment for
the first WebService. DeployWebserviceGetPatient.wsdd is the
deployment for the second WebService.
I think I've done all of
the steps?
Tom.
-----Oorspronkelijk
bericht-----
Van: Jaliya Ekanayake [mailto:[EMAIL PROTECTED]]
Verzonden: wo 8-3-2006
3:09
Aan: De Coster Tom; Jaliya Ekanayake
Onderwerp: Re:
Problem with more then one Context.
HI Tom,
Please
see my comments below.
Thanks,
Jaliya
----- Original Message
-----
From: De Coster Tom
To:
Jaliya Ekanayake
Sent: Tuesday, March 07, 2006 9:39
AM
Subject: RE: Problem with more then one
Context.
Hi
Jaliya,
I've tried it out today but had some
problems. Probably I'm doing things
wrong.
>>You don't need to change the
client code. It is the client code that is
in the first web service
that you need to change.
I've changed my
Client program, this is the code
:
Service clientService = new
Service();
clientCall = (Call)
clientService.createCall();
clientCall.setEncodingStyle(null);
//serialisaties instellen voor de Gegevens
bean
ctxClient = new
SandeshaContext();
ctxClient.setAcksToURL("http://10.0.0.22:" + defaultClientPort
+
"/axis/services/RMService");
ctxClient.setReplyToURL("http://10.0.0.22:" +
defaultClientPort +
"/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
interpreted as next :
My Client program calls on a
Web Service with Sandesha. On that Web
Service, I want to call on
another Web Service also with Sandesha.
So here I
should initialize the sandesha otherwise.
ctx = new SandeshaContext(false);
>>This is correct.
Then I adapt my
wsdd, which I've attached
(DeployWebServiceGetPatient.wsdd)
.
>>wsdd is also correct of RMService
that will accept the responses and
acknowledgements from the second
web service.
>>So if the problem is still
there we need to check the other deployment
descriptors that you use
to deploy the two web service.
I
think this should do the thing? Or am I doing it all
wrong?
Could it be the problem that I'm
calling on two different Web Services,
and not two separate
functions of one and the same Web Service?
>> NO, Sandesha can be used to invoke services as you have implemented.
No
restrictions.
I've also
attached the Controller.java file, this is the Web Service which
calls on the other Sandesha Web Service.
Thanks for your time.
>>So finally the
steps should be as follows.
1. Client will
be the same.
2. Service 1 should be deployed with
RMProvider as the provider
3. To accept responses we
need RMService to be deployed with
RMClientProvider.
4. Second service should also be
deployed with RMProvider as the provider.
So
just check the
deployments.
Kind regards,
Tom.
------------------------------------------------------------------------------
From: Jaliya Ekanayake [mailto:[EMAIL PROTECTED]]
Sent: dinsdag
7 maart 2006 3:02
To: De Coster Tom;
[email protected]
Subject: Re: Problem with
more then one Context.
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 -----
From: De
Coster Tom
To:
[email protected]
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]