Reputation: 302
i have a methode deleteProduct:
@Override
public Response deleteProduct(String productId) {
Response response = Response
.status(Response.Status.FORBIDDEN)
.entity(new IllegalAccessError("This is a JAXB object with an error string"))
.build();
return response;
}
my problem is always i get this response :
<ns2:deleteProductResponse xmlns:ns2="http://ws.cxf.test.com/">
<return/>
</ns2:deleteProductResponse>
why i dont see my message error ?
Upvotes: 0
Views: 273
Reputation: 2991
I think you are getting confused between JAX-RS
and JAX-WS
. If this is SOAP-UI
you are referring to, it means you are building SOAP based web services or, in other words are using SOA
- service oriented architecture which works on the SOAP protocol and not HTTP. Hence HTTP Status codes or error messages based on them do not come into picture here.
However, if you are building a RESTful web service (one that is based on JAX-RS
), it has everything to do with HTTP.
First, decide what framework to use based on your project requirements and then code accordingly.
Upvotes: 1