Hi, Thierry,
Thanks for the reply. My server is quite simple and I put the server code at
below.
It is high appreciated to help out of here.
thanks in advance,
Nicho
My server code:
Public class MyServer{
public static void main(String[] args) throws Exception {
Component component = new Component();
component.getServers().add(Protocol.HTTP, 8182);
component.getDefaultHost().attach("/CA", new CAResourceApplication());
component.start();
}
}
public class CAResourceApplication extends Application {
public Restlet createRoot() {
Router router = new Router(getContext());
router.attach("", CAResource.class);
return router;
}
}
public class CAResource extends Resource {
public CAResource(Context context, Request request, Response response) {
super(context, request, response);
getVariants().add(new Variant(MediaType.APPLICATION_XML));
setModifiable(true);
}
public Representation represent(Variant variant) throws ResourceException {
return getRepresentation();
}
public void acceptRepresentation(Representation entity) throws
ResourceException {
getResponse().setStatus(Status.CLIENT_ERROR_FORBIDDEN);
}
public void storeRepresentation(Representation entity) throws
ResourceException {
getResponse().setStatus(Status.CLIENT_ERROR_FORBIDDEN);
}
public void removeRepresentations() throws ResourceException {
getResponse().setStatus(Status.CLIENT_ERROR_FORBIDDEN);
}
}
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2464225