About Question enthuware.ocejws.v6.2.284 :

Moderators: Site Manager, fjwalraven

Post Reply
dfigueira
Posts: 15
Joined: Thu May 05, 2016 2:50 am
Contact:

About Question enthuware.ocejws.v6.2.284 :

Post by dfigueira »

By using HTTP protocol with JAX-WS and enabling @Addressing, it would create an asynchronous call, could it be considered a valid option?

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.284 :

Post by fjwalraven »

Hi!
By using HTTP protocol with JAX-WS and enabling @Addressing, it would create an asynchronous call
HTTP is synchronous by default. Adding @Addressing doesn't make it asynchronous.

Regards,
Frits

dfigueira
Posts: 15
Joined: Thu May 05, 2016 2:50 am
Contact:

Re: About Question enthuware.ocejws.v6.2.284 :

Post by dfigueira »

Besides HTTP synchronicity, with WS-Addressing enabled and setting the ReplyTo, it will implement an asynchronous call on top of it.

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.284 :

Post by fjwalraven »

with WS-Addressing enabled and setting the ReplyTo, it will implement an asynchronous call on top of it.
HTTP doesn't know anything about SOAP-headers so why would you think that it becomes an asynchronous call?

When you design an asynchronous webservice with a callback-service, HTTP will still require a response immediately and that is exactly what happens. It will return a HTTP 202 which informs the client that the request has arrived and its processing has started.

Regards,
Frits

dfigueira
Posts: 15
Joined: Thu May 05, 2016 2:50 am
Contact:

Re: About Question enthuware.ocejws.v6.2.284 :

Post by dfigueira »

HTTP doesn't know anything about SOAP-headers so why would you think that it becomes an asynchronous call?
Neither SMTP or JMS knows anything about SOAP-headers.
When you design an asynchronous webservice with a callback-service, HTTP will still require a response immediately and that is exactly what happens. It will return a HTTP 202 which informs the client that the request has arrived and its processing has started.
It is the same that SMTP does when the server returns a 250 code, and as you listed, it is an asynchronous protocol to implement a WebService.

HTTP 202 it is only to make sure that the request is correctly received, then you can and you should proceed with your work and you won't get blocked by the amount of time it will take to return the answer, also you will receive the callback answer in another (and new) request so nothing gets blocked.

The option "HTTP" should include something like HTTP (anonymous) just to make sure that would be used only in synchronous calls...

fjwalraven
Posts: 429
Joined: Tue Jul 24, 2012 2:43 am
Contact:

Re: About Question enthuware.ocejws.v6.2.284 :

Post by fjwalraven »

Good point, and I agee that SMTP isn't always regarded as an asynchronous protocol. However for the WS exam HTTP and HTTPS are not seen as the preferred solution to this problem. If you see a list where both are options are there go for the asynchronous protocol solutions and Document style approach.

Regards,
Frits

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest