Hi Ali,
The best solution coming into my head is as
follows:
public WebService
{
public Element[] method(Element []
elems) throws Exception {
//After receiving the
input Message 1, the web service will return the ack response.
invoke_ack(); //invoke_ack() is a method for sending the ack Message
2
Do something..........
return
Message3;
}
}
According to the above solution, the pseudo code for the
client will look like:
open a thread for listening the incoming ack
message
SOAPMessage reply=SOAPConnection.call(Message 1,Web
Service Endpoint);
Based on the above design, the listening thread will
receive the ack Message 2 and then the main client program will
receive the reply Message 3.
I don't know if the above architecture is strange
and could you give me some suggestion?
Best regards,
Dink Lo
----- Original Message -----
Sent: Friday, March 17, 2006 7:50 PM
Subject: Re: Questions about
"java:MSG"
Hi
Dink,
I'm designing the same structure with Axis2 for my project.
Although I'm not sure it's the best, I will implement 1th and 2nd as sync and
3th one as async. In this scenario, client must have a listener for the
3th.
But I don't know what the "java:MSG" is and how to implement async service
with it.
Regards,
Ali Sadik Kumlali
Dink
<[EMAIL PROTECTED]> wrote:
Thanks for your reply. What you draw is really my
case.
Message
1. request
Client ----------------> Server
Message
2. ack
response Client
<--------------- Server
... (time
passes)
actual result Message 3. Client <---------------
Server
I have thought of two
kinds of situation for the above case.
The first situation, I
regard the message 1 and 2 as the synchronous message pattern
and the message 3 is
the asynchronous one. The second situation, I
regard the three messages
as the
asynchronous messages. I don't know which kind of situation is suitable
for my case.
Besides, I don't know if the
"java:MSG" provider programming mode I used can fulfill the
asynchronous case. If it can not achieve the asynchronous
transmission, how can I do that?
Regards,
Dink
Lo
-----
Original Message -----
Sent:
Friday, March 17, 2006 5:59 PM
Subject:
Re: Questions about "java:MSG"
Hi Dink,
Just to make it clear, do you
mean;
request Client ----------------> Server
ack response Client <--------------- Server
...
(time passes)
actual result Client <---------------
Server
If this the your case, it has some asynchronous
process logic. So, that might be your starting
point.
Regards,
Ali Sadik Kumlali
Dink
<[EMAIL PROTECTED]> wrote:
Hello,
I need to develop a client and a web service to
accomplish some message exchange.
Th e message exchange pattern is as
follows:
1. The client sends an XML document to the web service
to do some request.
2. The web service returns an XML document to notify
the client that the request sent by the client is received and being
processed.
3. The web service has finished the request and return
the result to the client.
I have used the "provider=java:MSG" style to develop
the web service to handle the incoming message.
But when I think of how to reach the step 3,
I can't find any method signature provided by axis to do
it.
The method signatures provided by axis
are:
public Element []
method(Element [] bodies); public SOAPBodyElement [] method
(SOAPBodyElement [] bodies);
public Document method(Document body); public
void method(SOAPEnvelope req, SOAPEnvelope resp);
Every method looks like a simultaneous method except
the fourth one. The simultaneous method I mean is that the client sends
a request to the web service and receives a response from the
service.
I think the methods provided by java:MSG can't fulfill
my full requirements.
Can somebody point me some directions to solve the
problem?
Thanks,
Dink Lo
Yahoo! Mail Bring photos to life! New
PhotoMail makes sharing a breeze.
Yahoo! Mail Use
Photomail to share photos without annoying
attachments.
|