Hello Michael,
as GAE is basically a servlet container, you need to complete the web.xml
file (see here for example http://wiki.restlet.org/docs_2.0/379-restlet.html
).
At the same time, you will have to add the library of such client connector.
There is an internal one (shipped with the org.restlet.jar, no more
dependency required) which is okay for development only in the 2.0 branch.
There is another one available for the GAE edition, based on the HTTP client
of the JDK, shipped with the org.restlet.ext.net.jar archive. Just put this
jar on the WEB-INF/lib directory, it should work.
Best regards,
Thierry Boileau
Trying to make a client request on my GAE app to another server. I keep
> getting this notice:
>
> The protocol used by this request is not declared in the list of client
> connectors. (HTTP/1.1)
>
>
> when I make the following call:
>
>
> Contact contact = resource.retrieve();
> ClientResource cr = new ClientResource("
> http://localhost:8080/Processor/command");
> ContactResource resource = cr.wrap(ContactResource.class);
>
>
> which throws this error:
>
> Not Found
>
>
> In my createInboundRoot method, I have this:
>
> getConnectorService().getClientProtocols().add(Protocol.HTTP);
>
>
> I also tried:
>
> Protocol protocol = new Protocol(ph.getSchemeName(), ph.getName(),
> ph.getTechnicalName(), ph.getDescription(), 8080, false, ph.getVersion());
> getConnectorService().getClientProtocols().add(protocol);
>
>
> Is it possible to make this type of call from Restlet GAE Edition? If yes,
> what piece am I missing?
>
>
>
> Thanks,
>
> Miller
>
>
>
>
>
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2703716