Could you show us your client code and tell us about the request?
This exception seems to indicate the Unmarshalling JAXB step. Obviously, you received the XML from your REST API, but you will not get what you expect.
Perhaps the XSD you use for sorting / disassembling is outdated or just plain wrong.
Perhaps you are trying to get the wrong object from the response.
Try these steps and give us more information about your problem:
Get XML from response
Using a REST client, for example, a REST client is simple (a chrome extension) or your code:
Builder builder = webResource.path("/yourapi/").accept("application/xml"); // get the client response ClientResponse response = builder.get(ClientResponse.class); // log the HTTP Status logger.log("HTTP Status: " + response.getStatus()); // bypass the jaxb step and get the full response // MyResource myResource = response.getEntity(MyResource.class); String myResource = response.getEntity(String.class); logger.log(myResource);
Validate this XML with the XSD you are using
This test should fail (if I'm right).
Brian Clozel Feb 26 '10 at 12:45 2010-02-26 12:45
source share