You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ricky Ho <ri...@cisco.com> on 2002/12/01 22:09:47 UTC

Re: Async web services, do they exist?

No !  I think the same mechanism works for the scenario you describe here 
as well by having the client pass an extra "session id" for each request it 
make.  In other words, the client will use different session id for each 
different server it contacts.

Rgds, Ricky

At 10:23 AM 11/27/2002 -0800, Pae Choi wrote:
>That would be a scenario only for the server that has one-to-one
>relationship
>with clients. Then if a client, e.g., a Web services browser, that needs to
>access
>multiple Web services with a same API, e,g., "Docment exchangeMessage() {}"
>which is a higher API that makes the SOAP specific calls transparent, will
>be
>a totally different story.
>
>In the second scenario, we do need to spawn a seperate thread so that the
>caller is not locked to a one-to-one boundary unless we instantiate the
>class
>that contains the method that the caller is utilizing.
>
>
>Pae
>
>
>
> > As you see in my sample code, I think the right way is NOT to spawn a
> > thread at the calling client, but have the server immediately return after
> > buffering the request.  In fact, the thread is spawned at the server which
> > take the request from the buffer to handle at a later time.
> >
> > At the same time, the callback address of ws1 is passed as an extra WSDL
> > parameter to downstream services (w2, w3).  If you want to differentiate
> > between different user session, then an extra "sessionId" parameter need
>to
> > be passed as well.
> >
> > Rgds, Ricky
> >
> >
> > At 06:50 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > >Hi,
> > >
> > >thanks for your answers!
> > >
> > >I think I've made a mistake...
> > >I actually don't need a return value from a web service, the reason is
> > >that I want several web services (ws) to execute in a chain manner.
> > >1 - Say that a client/user calls ws1, ws1 calls ws2 which calls ws3.
> > >2 - I don't want ws1 to hang and wait for answer, but continue to
> > >execute (fire and forget invocation)
> > >3 - After ws3 is finished it will note ws1 (not by returning a value to
> > >ws2 which returns value to ws1) but by calling ws1 directly
> > >
> > >..in short, every ws on the way will only send message forward to
> > >another ws and don't return a reply (never look back)
> > >
> > >The 2  major issues are
> > >-how to get ws1 to continue executing (using thread that waits for
> > >reponse is not wanted, I want a peer2peer execution)
> > >-in ws1 how to map the 'answer' from ws3 to the correct request (say ws1
> > >has 100 users)
> > >
> > >This problem is hard to communicate with few words.
> > >
> > >Suggstions/views are appriciated!
> > >
> > >Thanx again!
> > >
> > >-----------------------------------
> > >
> > >I guess the behavior you observe is "implementation dependent".  The
> > >SOAP
> > >server you've used doesn't take advantage of the optimization
> > >opportunity
> > >where things can be execute in parallel.
> > >
> > >But you certainly can achieve what you want in the following ways ...
> > >
> > >public class AsyncService {
> > >          static Buffer buffer = Buffer.getSingleton();
> > >
> > >          public String submitRequest(Request request) {
> > >                  String trackerId = buffer.save(request); // save in
> > >buffer
> > >                  return trackerId;
> > >          }
> > >
> > >          public Response pollForResponse(String trackerId) {
> > >                  if (buffer.isResponseReady(trackerId)) {
> > >                          return (buffer.getResponse(trackerId));
> > >                  } else {
> > >                          return (null);
> > >                  }
> > >          }
> > >
> > >          public void submitRequestWithCallback(Request request,
> > >ICallback
> > >callback) {
> > >                  buffer.save(request, callback);
> > >          }
> > >}
> > >
> > >public class Execution extends Thread {
> > >          public void run () {
> > >                  Request request = buffer.takeRequest();
> > >                  Response response = handle(request);
> > >                  if (request.needsCallback()) {
> > >                          ICallback callback =
> > >buffer.getCallback(request.getTrackerId());
> > >                          callback.sendResponse(response);
> > >                  } else {
> > >                          buffer.saveResponse(request.getTrackerId(),
> > >response)
> > >                  }
> > >          }
> > >}
> > >
> > >Rgds, Ricky
> > >
> > >At 02:29 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > >Hi,
> > > >
> > > >I have a problem with finding relevant info regarding asynch Web
>Services.
> > > >
> > > >
> > > >For example, I've got this javaclass, all it does is wait 10 seconds
> > > >
> > > >public class delay{
> > > >         public void wait10sec(){
> > > >                 /*some code for 10 sec delay*/
> > > >         }
> > > >
> > > >}
> > > >
> > > >it has WSDL like:
> > > >......
> > > >    <message name="wait10sec0Request"/>
> > > >    <portType name="blahPortType">
> > > >       <operation name="wait10sec">
> > > >          <input name="wait10sec0Request"
>message="tns:wait10sec0Request"/>
> > > >       </operation>
> > > >    </portType>
> > > >    <binding name="blahBinding" type="tns:blahPortType">
> > > >       <soap:binding style="rpc"
> > > >                 transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >       <operation name="wait10sec">
> > > >          <soap:operation soapAction="" style="rpc"/>
> > > >          <input name="wait10sec0Request">
> > > >             <soap:body use="encoded" namespace="blah"
> > > >
>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > >          </input>
> > > >       </operation>
> > > >    </binding>
> > > >    <service name="blah">
> > > >       <port name="blahPort" binding="tns:blahBinding">
> > > >          <soap:address
> > > >                 location="http://some_URTL:8888/blah_ctx/blah"/>
> > > >       </port>
> > > >    </service>
> > > >
> > > >NOTE: I have change WSDL to have no response, the original has reponse
> > > >message listed, but is was empty.....
> > > >
> > > >According to some mail I read Web Services are async if they don't have
> > > >any reponse method.
> > > >
> > > >I uploaded this and invoke the method using Oracle9ias (9.0.0.3), the
> > > >invocation halts for 10 seconds, and does NOT return ASAP (which is
>what I
> > > >need).
> > > >
> > > >Any suggestions about how to make asynch Web Services are very
> > > >appreciated!
> > > >
> > > >Regards, Trond
> >


Re: Async web services, do they exist?

Posted by Pae Choi <pa...@earthlink.net>.
Ricky,

I have no desire to continue this thread. I am sure we both understand
what we are talking about and we have better things to do. Let us use
our time for something else and perhaps better. :-)

Regards,


Pae


> Although I assume the session id is locally unique (which is the same
> assumption of the HTTPSession), there is NO need for a globally unique
> session id across servers.  Since the session id is only being used within
> a service container to identify a previous client session, it is OK to
have
> the same session id from different service container.
>
> For the local uniqueness, I haven't make any assumption about how the
> session id should be generated, so you can choose whatever algorithm that
> suit the purpose.
>
> Rgds, Ricky
>
> At 06:43 AM 12/2/2002 -0500, Pae Choi wrote:
> >The session id does not guarantee the uniqueness. Some commercial
> >app server may use additional mechanism to accomplish that. But
> >the session ids coming from the multiple app servers are not guaranteed
> >the uniqueness. If we presume the uniqueness, that will be a serious
> >semantic error.
> >
> >
> >Pae
> >
> >
> >
> > > No !  I think the same mechanism works for the scenario you describe
here
> > > as well by having the client pass an extra "session id" for each
request
> >it
> > > make.  In other words, the client will use different session id for
each
> > > different server it contacts.
> > >
> > > Rgds, Ricky
> > >
> > > At 10:23 AM 11/27/2002 -0800, Pae Choi wrote:
> > > >That would be a scenario only for the server that has one-to-one
> > > >relationship
> > > >with clients. Then if a client, e.g., a Web services browser, that
needs
> >to
> > > >access
> > > >multiple Web services with a same API, e,g., "Docment
exchangeMessage()
> >{}"
> > > >which is a higher API that makes the SOAP specific calls transparent,
> >will
> > > >be
> > > >a totally different story.
> > > >
> > > >In the second scenario, we do need to spawn a seperate thread so that
the
> > > >caller is not locked to a one-to-one boundary unless we instantiate
the
> > > >class
> > > >that contains the method that the caller is utilizing.
> > > >
> > > >
> > > >Pae
> > > >
> > > >
> > > >
> > > > > As you see in my sample code, I think the right way is NOT to
spawn a
> > > > > thread at the calling client, but have the server immediately
return
> >after
> > > > > buffering the request.  In fact, the thread is spawned at the
server
> >which
> > > > > take the request from the buffer to handle at a later time.
> > > > >
> > > > > At the same time, the callback address of ws1 is passed as an
extra
> >WSDL
> > > > > parameter to downstream services (w2, w3).  If you want to
> >differentiate
> > > > > between different user session, then an extra "sessionId"
parameter
> >need
> > > >to
> > > > > be passed as well.
> > > > >
> > > > > Rgds, Ricky
> > > > >
> > > > >
> > > > > At 06:50 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > > > >Hi,
> > > > > >
> > > > > >thanks for your answers!
> > > > > >
> > > > > >I think I've made a mistake...
> > > > > >I actually don't need a return value from a web service, the
reason
> >is
> > > > > >that I want several web services (ws) to execute in a chain
manner.
> > > > > >1 - Say that a client/user calls ws1, ws1 calls ws2 which calls
ws3.
> > > > > >2 - I don't want ws1 to hang and wait for answer, but continue to
> > > > > >execute (fire and forget invocation)
> > > > > >3 - After ws3 is finished it will note ws1 (not by returning a
value
> >to
> > > > > >ws2 which returns value to ws1) but by calling ws1 directly
> > > > > >
> > > > > >..in short, every ws on the way will only send message forward to
> > > > > >another ws and don't return a reply (never look back)
> > > > > >
> > > > > >The 2  major issues are
> > > > > >-how to get ws1 to continue executing (using thread that waits
for
> > > > > >reponse is not wanted, I want a peer2peer execution)
> > > > > >-in ws1 how to map the 'answer' from ws3 to the correct request
(say
> >ws1
> > > > > >has 100 users)
> > > > > >
> > > > > >This problem is hard to communicate with few words.
> > > > > >
> > > > > >Suggstions/views are appriciated!
> > > > > >
> > > > > >Thanx again!
> > > > > >
> > > > > >-----------------------------------
> > > > > >
> > > > > >I guess the behavior you observe is "implementation dependent".
The
> > > > > >SOAP
> > > > > >server you've used doesn't take advantage of the optimization
> > > > > >opportunity
> > > > > >where things can be execute in parallel.
> > > > > >
> > > > > >But you certainly can achieve what you want in the following ways
...
> > > > > >
> > > > > >public class AsyncService {
> > > > > >          static Buffer buffer = Buffer.getSingleton();
> > > > > >
> > > > > >          public String submitRequest(Request request) {
> > > > > >                  String trackerId = buffer.save(request); //
save in
> > > > > >buffer
> > > > > >                  return trackerId;
> > > > > >          }
> > > > > >
> > > > > >          public Response pollForResponse(String trackerId) {
> > > > > >                  if (buffer.isResponseReady(trackerId)) {
> > > > > >                          return (buffer.getResponse(trackerId));
> > > > > >                  } else {
> > > > > >                          return (null);
> > > > > >                  }
> > > > > >          }
> > > > > >
> > > > > >          public void submitRequestWithCallback(Request request,
> > > > > >ICallback
> > > > > >callback) {
> > > > > >                  buffer.save(request, callback);
> > > > > >          }
> > > > > >}
> > > > > >
> > > > > >public class Execution extends Thread {
> > > > > >          public void run () {
> > > > > >                  Request request = buffer.takeRequest();
> > > > > >                  Response response = handle(request);
> > > > > >                  if (request.needsCallback()) {
> > > > > >                          ICallback callback =
> > > > > >buffer.getCallback(request.getTrackerId());
> > > > > >                          callback.sendResponse(response);
> > > > > >                  } else {
> > > > > >
buffer.saveResponse(request.getTrackerId(),
> > > > > >response)
> > > > > >                  }
> > > > > >          }
> > > > > >}
> > > > > >
> > > > > >Rgds, Ricky
> > > > > >
> > > > > >At 02:29 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > > > > >Hi,
> > > > > > >
> > > > > > >I have a problem with finding relevant info regarding asynch
Web
> > > >Services.
> > > > > > >
> > > > > > >
> > > > > > >For example, I've got this javaclass, all it does is wait 10
> >seconds
> > > > > > >
> > > > > > >public class delay{
> > > > > > >         public void wait10sec(){
> > > > > > >                 /*some code for 10 sec delay*/
> > > > > > >         }
> > > > > > >
> > > > > > >}
> > > > > > >
> > > > > > >it has WSDL like:
> > > > > > >......
> > > > > > >    <message name="wait10sec0Request"/>
> > > > > > >    <portType name="blahPortType">
> > > > > > >       <operation name="wait10sec">
> > > > > > >          <input name="wait10sec0Request"
> > > >message="tns:wait10sec0Request"/>
> > > > > > >       </operation>
> > > > > > >    </portType>
> > > > > > >    <binding name="blahBinding" type="tns:blahPortType">
> > > > > > >       <soap:binding style="rpc"
> > > > > > >
transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > > > >       <operation name="wait10sec">
> > > > > > >          <soap:operation soapAction="" style="rpc"/>
> > > > > > >          <input name="wait10sec0Request">
> > > > > > >             <soap:body use="encoded" namespace="blah"
> > > > > > >
> > > >encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > > > > >          </input>
> > > > > > >       </operation>
> > > > > > >    </binding>
> > > > > > >    <service name="blah">
> > > > > > >       <port name="blahPort" binding="tns:blahBinding">
> > > > > > >          <soap:address
> > > > > > >
location="http://some_URTL:8888/blah_ctx/blah"/>
> > > > > > >       </port>
> > > > > > >    </service>
> > > > > > >
> > > > > > >NOTE: I have change WSDL to have no response, the original has
> >reponse
> > > > > > >message listed, but is was empty.....
> > > > > > >
> > > > > > >According to some mail I read Web Services are async if they
don't
> >have
> > > > > > >any reponse method.
> > > > > > >
> > > > > > >I uploaded this and invoke the method using Oracle9ias
(9.0.0.3),
> >the
> > > > > > >invocation halts for 10 seconds, and does NOT return ASAP
(which is
> > > >what I
> > > > > > >need).
> > > > > > >
> > > > > > >Any suggestions about how to make asynch Web Services are very
> > > > > > >appreciated!
> > > > > > >
> > > > > > >Regards, Trond
> > > > >
> > >
>


Re: Async web services, do they exist?

Posted by Ricky Ho <ri...@cisco.com>.
Although I assume the session id is locally unique (which is the same 
assumption of the HTTPSession), there is NO need for a globally unique 
session id across servers.  Since the session id is only being used within 
a service container to identify a previous client session, it is OK to have 
the same session id from different service container.

For the local uniqueness, I haven't make any assumption about how the 
session id should be generated, so you can choose whatever algorithm that 
suit the purpose.

Rgds, Ricky

At 06:43 AM 12/2/2002 -0500, Pae Choi wrote:
>The session id does not guarantee the uniqueness. Some commercial
>app server may use additional mechanism to accomplish that. But
>the session ids coming from the multiple app servers are not guaranteed
>the uniqueness. If we presume the uniqueness, that will be a serious
>semantic error.
>
>
>Pae
>
>
>
> > No !  I think the same mechanism works for the scenario you describe here
> > as well by having the client pass an extra "session id" for each request
>it
> > make.  In other words, the client will use different session id for each
> > different server it contacts.
> >
> > Rgds, Ricky
> >
> > At 10:23 AM 11/27/2002 -0800, Pae Choi wrote:
> > >That would be a scenario only for the server that has one-to-one
> > >relationship
> > >with clients. Then if a client, e.g., a Web services browser, that needs
>to
> > >access
> > >multiple Web services with a same API, e,g., "Docment exchangeMessage()
>{}"
> > >which is a higher API that makes the SOAP specific calls transparent,
>will
> > >be
> > >a totally different story.
> > >
> > >In the second scenario, we do need to spawn a seperate thread so that the
> > >caller is not locked to a one-to-one boundary unless we instantiate the
> > >class
> > >that contains the method that the caller is utilizing.
> > >
> > >
> > >Pae
> > >
> > >
> > >
> > > > As you see in my sample code, I think the right way is NOT to spawn a
> > > > thread at the calling client, but have the server immediately return
>after
> > > > buffering the request.  In fact, the thread is spawned at the server
>which
> > > > take the request from the buffer to handle at a later time.
> > > >
> > > > At the same time, the callback address of ws1 is passed as an extra
>WSDL
> > > > parameter to downstream services (w2, w3).  If you want to
>differentiate
> > > > between different user session, then an extra "sessionId" parameter
>need
> > >to
> > > > be passed as well.
> > > >
> > > > Rgds, Ricky
> > > >
> > > >
> > > > At 06:50 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > > >Hi,
> > > > >
> > > > >thanks for your answers!
> > > > >
> > > > >I think I've made a mistake...
> > > > >I actually don't need a return value from a web service, the reason
>is
> > > > >that I want several web services (ws) to execute in a chain manner.
> > > > >1 - Say that a client/user calls ws1, ws1 calls ws2 which calls ws3.
> > > > >2 - I don't want ws1 to hang and wait for answer, but continue to
> > > > >execute (fire and forget invocation)
> > > > >3 - After ws3 is finished it will note ws1 (not by returning a value
>to
> > > > >ws2 which returns value to ws1) but by calling ws1 directly
> > > > >
> > > > >..in short, every ws on the way will only send message forward to
> > > > >another ws and don't return a reply (never look back)
> > > > >
> > > > >The 2  major issues are
> > > > >-how to get ws1 to continue executing (using thread that waits for
> > > > >reponse is not wanted, I want a peer2peer execution)
> > > > >-in ws1 how to map the 'answer' from ws3 to the correct request (say
>ws1
> > > > >has 100 users)
> > > > >
> > > > >This problem is hard to communicate with few words.
> > > > >
> > > > >Suggstions/views are appriciated!
> > > > >
> > > > >Thanx again!
> > > > >
> > > > >-----------------------------------
> > > > >
> > > > >I guess the behavior you observe is "implementation dependent".  The
> > > > >SOAP
> > > > >server you've used doesn't take advantage of the optimization
> > > > >opportunity
> > > > >where things can be execute in parallel.
> > > > >
> > > > >But you certainly can achieve what you want in the following ways ...
> > > > >
> > > > >public class AsyncService {
> > > > >          static Buffer buffer = Buffer.getSingleton();
> > > > >
> > > > >          public String submitRequest(Request request) {
> > > > >                  String trackerId = buffer.save(request); // save in
> > > > >buffer
> > > > >                  return trackerId;
> > > > >          }
> > > > >
> > > > >          public Response pollForResponse(String trackerId) {
> > > > >                  if (buffer.isResponseReady(trackerId)) {
> > > > >                          return (buffer.getResponse(trackerId));
> > > > >                  } else {
> > > > >                          return (null);
> > > > >                  }
> > > > >          }
> > > > >
> > > > >          public void submitRequestWithCallback(Request request,
> > > > >ICallback
> > > > >callback) {
> > > > >                  buffer.save(request, callback);
> > > > >          }
> > > > >}
> > > > >
> > > > >public class Execution extends Thread {
> > > > >          public void run () {
> > > > >                  Request request = buffer.takeRequest();
> > > > >                  Response response = handle(request);
> > > > >                  if (request.needsCallback()) {
> > > > >                          ICallback callback =
> > > > >buffer.getCallback(request.getTrackerId());
> > > > >                          callback.sendResponse(response);
> > > > >                  } else {
> > > > >                          buffer.saveResponse(request.getTrackerId(),
> > > > >response)
> > > > >                  }
> > > > >          }
> > > > >}
> > > > >
> > > > >Rgds, Ricky
> > > > >
> > > > >At 02:29 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > > > >Hi,
> > > > > >
> > > > > >I have a problem with finding relevant info regarding asynch Web
> > >Services.
> > > > > >
> > > > > >
> > > > > >For example, I've got this javaclass, all it does is wait 10
>seconds
> > > > > >
> > > > > >public class delay{
> > > > > >         public void wait10sec(){
> > > > > >                 /*some code for 10 sec delay*/
> > > > > >         }
> > > > > >
> > > > > >}
> > > > > >
> > > > > >it has WSDL like:
> > > > > >......
> > > > > >    <message name="wait10sec0Request"/>
> > > > > >    <portType name="blahPortType">
> > > > > >       <operation name="wait10sec">
> > > > > >          <input name="wait10sec0Request"
> > >message="tns:wait10sec0Request"/>
> > > > > >       </operation>
> > > > > >    </portType>
> > > > > >    <binding name="blahBinding" type="tns:blahPortType">
> > > > > >       <soap:binding style="rpc"
> > > > > >                 transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > > >       <operation name="wait10sec">
> > > > > >          <soap:operation soapAction="" style="rpc"/>
> > > > > >          <input name="wait10sec0Request">
> > > > > >             <soap:body use="encoded" namespace="blah"
> > > > > >
> > >encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > > > >          </input>
> > > > > >       </operation>
> > > > > >    </binding>
> > > > > >    <service name="blah">
> > > > > >       <port name="blahPort" binding="tns:blahBinding">
> > > > > >          <soap:address
> > > > > >                 location="http://some_URTL:8888/blah_ctx/blah"/>
> > > > > >       </port>
> > > > > >    </service>
> > > > > >
> > > > > >NOTE: I have change WSDL to have no response, the original has
>reponse
> > > > > >message listed, but is was empty.....
> > > > > >
> > > > > >According to some mail I read Web Services are async if they don't
>have
> > > > > >any reponse method.
> > > > > >
> > > > > >I uploaded this and invoke the method using Oracle9ias (9.0.0.3),
>the
> > > > > >invocation halts for 10 seconds, and does NOT return ASAP (which is
> > >what I
> > > > > >need).
> > > > > >
> > > > > >Any suggestions about how to make asynch Web Services are very
> > > > > >appreciated!
> > > > > >
> > > > > >Regards, Trond
> > > >
> >


Re: Async web services, do they exist?

Posted by Pae Choi <pa...@earthlink.net>.
The session id does not guarantee the uniqueness. Some commercial
app server may use additional mechanism to accomplish that. But
the session ids coming from the multiple app servers are not guaranteed
the uniqueness. If we presume the uniqueness, that will be a serious
semantic error.


Pae



> No !  I think the same mechanism works for the scenario you describe here
> as well by having the client pass an extra "session id" for each request
it
> make.  In other words, the client will use different session id for each
> different server it contacts.
>
> Rgds, Ricky
>
> At 10:23 AM 11/27/2002 -0800, Pae Choi wrote:
> >That would be a scenario only for the server that has one-to-one
> >relationship
> >with clients. Then if a client, e.g., a Web services browser, that needs
to
> >access
> >multiple Web services with a same API, e,g., "Docment exchangeMessage()
{}"
> >which is a higher API that makes the SOAP specific calls transparent,
will
> >be
> >a totally different story.
> >
> >In the second scenario, we do need to spawn a seperate thread so that the
> >caller is not locked to a one-to-one boundary unless we instantiate the
> >class
> >that contains the method that the caller is utilizing.
> >
> >
> >Pae
> >
> >
> >
> > > As you see in my sample code, I think the right way is NOT to spawn a
> > > thread at the calling client, but have the server immediately return
after
> > > buffering the request.  In fact, the thread is spawned at the server
which
> > > take the request from the buffer to handle at a later time.
> > >
> > > At the same time, the callback address of ws1 is passed as an extra
WSDL
> > > parameter to downstream services (w2, w3).  If you want to
differentiate
> > > between different user session, then an extra "sessionId" parameter
need
> >to
> > > be passed as well.
> > >
> > > Rgds, Ricky
> > >
> > >
> > > At 06:50 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > >Hi,
> > > >
> > > >thanks for your answers!
> > > >
> > > >I think I've made a mistake...
> > > >I actually don't need a return value from a web service, the reason
is
> > > >that I want several web services (ws) to execute in a chain manner.
> > > >1 - Say that a client/user calls ws1, ws1 calls ws2 which calls ws3.
> > > >2 - I don't want ws1 to hang and wait for answer, but continue to
> > > >execute (fire and forget invocation)
> > > >3 - After ws3 is finished it will note ws1 (not by returning a value
to
> > > >ws2 which returns value to ws1) but by calling ws1 directly
> > > >
> > > >..in short, every ws on the way will only send message forward to
> > > >another ws and don't return a reply (never look back)
> > > >
> > > >The 2  major issues are
> > > >-how to get ws1 to continue executing (using thread that waits for
> > > >reponse is not wanted, I want a peer2peer execution)
> > > >-in ws1 how to map the 'answer' from ws3 to the correct request (say
ws1
> > > >has 100 users)
> > > >
> > > >This problem is hard to communicate with few words.
> > > >
> > > >Suggstions/views are appriciated!
> > > >
> > > >Thanx again!
> > > >
> > > >-----------------------------------
> > > >
> > > >I guess the behavior you observe is "implementation dependent".  The
> > > >SOAP
> > > >server you've used doesn't take advantage of the optimization
> > > >opportunity
> > > >where things can be execute in parallel.
> > > >
> > > >But you certainly can achieve what you want in the following ways ...
> > > >
> > > >public class AsyncService {
> > > >          static Buffer buffer = Buffer.getSingleton();
> > > >
> > > >          public String submitRequest(Request request) {
> > > >                  String trackerId = buffer.save(request); // save in
> > > >buffer
> > > >                  return trackerId;
> > > >          }
> > > >
> > > >          public Response pollForResponse(String trackerId) {
> > > >                  if (buffer.isResponseReady(trackerId)) {
> > > >                          return (buffer.getResponse(trackerId));
> > > >                  } else {
> > > >                          return (null);
> > > >                  }
> > > >          }
> > > >
> > > >          public void submitRequestWithCallback(Request request,
> > > >ICallback
> > > >callback) {
> > > >                  buffer.save(request, callback);
> > > >          }
> > > >}
> > > >
> > > >public class Execution extends Thread {
> > > >          public void run () {
> > > >                  Request request = buffer.takeRequest();
> > > >                  Response response = handle(request);
> > > >                  if (request.needsCallback()) {
> > > >                          ICallback callback =
> > > >buffer.getCallback(request.getTrackerId());
> > > >                          callback.sendResponse(response);
> > > >                  } else {
> > > >                          buffer.saveResponse(request.getTrackerId(),
> > > >response)
> > > >                  }
> > > >          }
> > > >}
> > > >
> > > >Rgds, Ricky
> > > >
> > > >At 02:29 PM 11/27/2002 +1100, Trond Hjelmaas wrote:
> > > > >Hi,
> > > > >
> > > > >I have a problem with finding relevant info regarding asynch Web
> >Services.
> > > > >
> > > > >
> > > > >For example, I've got this javaclass, all it does is wait 10
seconds
> > > > >
> > > > >public class delay{
> > > > >         public void wait10sec(){
> > > > >                 /*some code for 10 sec delay*/
> > > > >         }
> > > > >
> > > > >}
> > > > >
> > > > >it has WSDL like:
> > > > >......
> > > > >    <message name="wait10sec0Request"/>
> > > > >    <portType name="blahPortType">
> > > > >       <operation name="wait10sec">
> > > > >          <input name="wait10sec0Request"
> >message="tns:wait10sec0Request"/>
> > > > >       </operation>
> > > > >    </portType>
> > > > >    <binding name="blahBinding" type="tns:blahPortType">
> > > > >       <soap:binding style="rpc"
> > > > >                 transport="http://schemas.xmlsoap.org/soap/http"/>
> > > > >       <operation name="wait10sec">
> > > > >          <soap:operation soapAction="" style="rpc"/>
> > > > >          <input name="wait10sec0Request">
> > > > >             <soap:body use="encoded" namespace="blah"
> > > > >
> >encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > > >          </input>
> > > > >       </operation>
> > > > >    </binding>
> > > > >    <service name="blah">
> > > > >       <port name="blahPort" binding="tns:blahBinding">
> > > > >          <soap:address
> > > > >                 location="http://some_URTL:8888/blah_ctx/blah"/>
> > > > >       </port>
> > > > >    </service>
> > > > >
> > > > >NOTE: I have change WSDL to have no response, the original has
reponse
> > > > >message listed, but is was empty.....
> > > > >
> > > > >According to some mail I read Web Services are async if they don't
have
> > > > >any reponse method.
> > > > >
> > > > >I uploaded this and invoke the method using Oracle9ias (9.0.0.3),
the
> > > > >invocation halts for 10 seconds, and does NOT return ASAP (which is
> >what I
> > > > >need).
> > > > >
> > > > >Any suggestions about how to make asynch Web Services are very
> > > > >appreciated!
> > > > >
> > > > >Regards, Trond
> > >
>