Register / Login
Win a copy of
The Way of the Web Tester: A Beginner's Guide to Automating Tests
this week in the
HttpResponse assign to class with @XmlRootElement?
posted 4 years ago
I'm new to RESTful Web Services. I created one and now I'm working on the client but I'm confused on how to turn my xml into my object.
I have my response of the type org.apache.http.HttpResponse. It looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><User><address>XXX</address><firstname>Gabriela</firstname></User>
I have my class User with @XmlRootElement. How do i turn that xml into my class.
, they show how to do it but they never really assign the response to the Customer or Customers.
I also found this,
, but it produces a
rather than xml. I would like to find an example like this where instead of using json they use xml.
I would like to know how do they do something like this?
HttpResponse result = httpclient.execute(get);
User user = magicFunction(result);
Can somebody point in the right direction please?
Controller redirect to another Controller?
SAAJ portable ?
Passing Set<java.lang.Object> and List<java.lang.Object> in Axis 2.0
Response xml in Apache CXF using JAX-RS
Is there a tutorial for SOAP 1.2 HTTP GET using JAX-WS?