• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Asynchronous web service

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JAX-WS 2.0 supports asynchronous web service using polling and callback mechanism.

Can somebody tell me if this is a feature specific to JEE or is it part of WS-I BP specification.
Thus can a C# client(ie a non java client) access a web service asynchronously.
 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably already knew the What as well the How. Is this the confirmation you're looking for?
Below is my understanding so far

In terms of What:

Provider WS { doSomething() }

Client invocation can;

Do a Blocking call:

1. WS.doSomething();

Do a Non Blocking call / Asynchronicity from the Client Side

1. WS.doSomething() by polling
2. WS.doSomething() by callback


In terms of How:

1. JAX-WS 2.x can do Blocking and non Blocking call from client side

2. C# can do Blocking call of course and Non Blocking call if feasible from C# (Check ASP.NET forum)

3. WS-I : neither J2EE nor .NET. They ensure the wsdl is inter-operable across platform. (Vague! check WS-I.org)
 
Pankaj Kumarkk
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the response. I still do not know if asynchronous web service is something driven from WS-I BP specification. Thus are all different WS-I BP compliant vendors supposed to provide asynchronous web services behavior.
I tried the WS-I web site but could not determine the answer.

 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The way I understand:

Usually or most of the time, we have a synchronous web service. Synchronous = a Blocking call.

1. reponse =request.doIt();
2. this next statement (2) can not be executed until doIt() finished.


But some time, some web service take a long time to finish and we can not wait so we need a Non-Blocking call which is Asynchronous.

The question then how can we achieve "Asynchronicity" as a whole, 1 way is by JAX-WS 2.x on the client side. (My previous post.)

But there are many other ways as well without using JAX-WS 2.x.

Suppose for those who for technical reason can not use JAX-WS 2.x, then how do they achieve "Asynchronicity"?

Well, for example, http://java.sun.com/blueprints/webservices/using/webservbp3.htmland
http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index6.htmlSee Figure 10: Asynchronous services with JAX-RPC

Well, there are other ways as well...It's a matter of architecturing the web service flow as a whole to achieve Asynchronous aspect.

As for WS-I, they ensure the provider service is workable across all platforms. In the SOAP UI, you can validate the wsdl is WS-I complicant or not if you care about the Inter-operability of the service.

Remember, your best friend is GOOGLE
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, this is what I understand or at least try to understand.

What:

WSDL is the key (Implicitly SOAP). Make sure it's WS-I/BP 1.x compliant. That's way all platforms understand it.
Implicitly vendors will make their web service engine/platform WS-I/BP compliant.

How:

What WSDL should have and have not? GOOGLE.

Ensuring Interoperable Web Services
http://download.oracle.com/docs/cd/B32110_01/web.1013/b28975/interop.htm#ASAWS0100
Part 5 - Integrating Java and Microsoft .NET
http://www.theserverside.com/news/1365618/Part-5-Integrating-Java-and-Microsoft-NET

If you look for article from .NET side, you will have it.

Testing tools:

-SOAP UI
-Most IDE
http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools

This has nothing to do with the "Asynchronousity" side of a web service. Does it?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
There are two different kinds of asynchronous calls that can be made using a JAX-WS web service client.
1. An asynchronous call to an operation with the message exchange pattern request-response.
This will, to the client, look like an asynchronous operation but the asynchronicity is handled by the web service client code, who maintain an extra thread to receive answer(s).
Characteristic of this kind of operations is a Future<T> object being returned as a result of invoking the operation.

2. A call to an operation using the one-way message exchange pattern or an operation that immediately returns some kind of identifier token prior to the processing of the request having finished.
Such an operation will never return anything, but will rely on other mechanisms to convey the result of the operation to the client.
Example:
The client A invoke an operation in web service B that use the one-way message exchange pattern.
Client A enclose some additional data in the request (for instance in a SOAP header) that tells the web service where to send the result of the request.
Web service B processes the request and, when finished, use the information enclosed by the client to report the result to client A.
Results may be reported using, for instance, web services, message queues etc etc.

As you may realize, only imagination sets limits on how an asynchronous web service can report the result in the second case.
Thus, this is slightly out of scope for a web service stack, which probably will support asynchronous invocation of operations, but not directly support all the possible ways of reporting the result.
When using truly asynchronous web services, like in 2 above, you usually need more information than just a WSDL.
Best wishes!
 
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic