Hi I am invoking Restful web service in
Java. The message body is simple xml
<Account>
<AccNo>123</AccNo>
<Name>Ram</Name>
</Account>
and the server side, i have POJO class for this.
public class Account {
private
String name;
private String accNo;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAge() {
return accNo;
}
public void setAge(String age) {
this.accNo = age;
}
}
What i want to know is how to map payload(xml) and pojo in Resource class's method (Restful).
Example:
POST
@Produces("text/xml")
public AccountDetails postAccountXML(Account account)
{
return ...
}
This is not working, please tell me how can resolve in Restful. the mapping between
soap message body(payload) and Account class mapping is working