Page 1 of 1

About Question enthuware.ocejws.v6.2.284 :

Posted: Thu Jan 24, 2019 4:30 pm
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?

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

Posted: Thu Jan 24, 2019 11:49 pm
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

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

Posted: Fri Jan 25, 2019 4:09 am
by dfigueira
Besides HTTP synchronicity, with WS-Addressing enabled and setting the ReplyTo, it will implement an asynchronous call on top of it.

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

Posted: Fri Jan 25, 2019 6:32 am
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

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

Posted: Fri Jan 25, 2019 7:09 am
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...

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

Posted: Fri Jan 25, 2019 10:35 am
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