I am new at RESTful webservices and was trying to update my @OneToMany relationship from a standalone client application, but I am not able to do that. I am usi
In your client code you are not specifying the content type of the data you are sending - so Jersey is not able to locate the right MessageBodyWritter to serialize the b1 object.
Modify the last line of your main method as follows:
ClientResponse response = resource.type(MediaType.APPLICATION_XML).put(ClientResponse.class, b1);
And add @XmlRootElement annotation to class B on both the server as well as the client sides.