Choose the statement that best describes the potential to write a client implemented using JAX- WS to interact with the JAX-RS (restful) web service defined by this class:

Given this class:

Choose the statement that best describes the potential to write a client implemented using JAX- WS to interact with the JAX-RS (restful) web service defined by this class (Choose one):

Given this class:

Choose the statement that best describes the potential to write a client implemented using JAX- WS to interact with the JAX-RS (restful) web service defined by this class (Choose one):

A.
It is impossible, since JAX-WS requires that the underlying interaction be SOAP-based, and JAX-RS does not support SOAP.

B.
It is impossible, since JAX-RS does not support the same extension mechanism via JAX-WS Handlers that JAX-WS supports.

C.
It is possible, since the JAX-WS API can be used to create a client that uses a simple raw XML protocol to interact with a service at a given URL.

D.
It is possible, since a JAX-WS proxy Port type can be generated to use a simple raw XML protocol to interact with a service at a specific fixed URL.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


ttwd80

ttwd80

why not D?

Aneesh

Aneesh

C or D? I am confused

Mohamed Fayek Saber

Mohamed Fayek Saber

https://www.subbu.org/blog/2006/08/jax-ws-for-restful-web-services

In summary, this articles makes an attempt to justify that JAX-WS can beused for programming REST-style web services. It should also have
taken the time to justify why you must use JAX-WS as opposed to, let’s say, servlets and a HTTP client?

As of today, I would not recommend using JAX-WS for REST-style web services.

Mohamed Fayek Saber

Mohamed Fayek Saber

If the JAX-WS API is really intent on supporting REST-style programming, here are some the things that it needs to do

Provide an easier way to process XML and JSON messages on the server side without hiding HTTP, preferrably by extending the servlet API.
Provide an wasier way to write HTTP client by creating some light-weight abstractions on the top of HttpURLConnection so that writing XML to, and reading XML from HTTP connections is simplified.