Hi.

I instantiate a new ClientResource in the context of a Restlet
Application to communicate to a third web service (in restlet itself).
This just created client resource is set a ChildContext as the
context. This resource does not seem to have any protocols cause it
refers to the application protocols, that's an empty list.

Here's what happens (restlet 2.0.8)

1. the server receives the request and answer correctly (200, right entity set)
2. the client logs a Warning about the missing protocol
(ChildClientDispatcher, line 105)
3. the client see a 404 response
4. a ResourceException on the client side is raised.

It took a lot to find this cause the server was answering a 200 and
the correct entity, while the client was receiving a 404. This is very
subtle, despite the warning.

How can I add HTTP protocol to my application connector service?
I've tried

getConnectorService().getClientProtocols().add(Protocol.HTTP);

in the application constructor but does not work, a sever exception is raised.

Thanks.

-- 
Daniele Dellafiore
http://danieledellafiore.net

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2790389

Reply via email to