My client resource looks like this:
Client client = new Client(new Context(), Protocol.HTTP);
ClientResource pubResource = new
ClientResource("http://localhost:8111/pcws/1/card/1111222233334444/NIL/h
old");
pubResource.setNext(client);
pubResource.put(new
StringRepresentation("<hold_request><hold_response_code>05</hold_respons
e_code></hold_request>"));
When I execute that code I get a Method Not Allowed.
My resource looks like this:
public class CardHoldResource extends ServerResource {
public CardHoldResource() {
super();
getVariants().add(new Variant(MediaType.TEXT_PLAIN));
}
@Put
public StringRepresentation createHold(String text) {
... //do something
}
}
When I override put(Representation,Variant) I do the same instanceof
check that they do in the source... and it fails the check...
What am I doing wrong to allow me to post with just a simple text body?
~brent
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2797003