Hello,

I try to etablish a connection beetween a server and an android client with 
Restlet 2.2. The server code is :

@Override
        public Restlet createInboundRoot() {
                Router router = new Router(getContext());

                router.attachDefault(new Directory(getContext(), "war:///"));
                router.attach("/connection", ServiceConnectionImpl.class);
        }

and the android code is :

                        ClientResource cr = new ClientResource(
                                        "http://....appspot.com/connection";);
                        cr.setRequestEntityBuffering(true);

                        ServiceConnection conn = 
cr.wrap(ServiceConnection.class);
      
                        String temp = conn.connect(connect);


When I launch the client, I have the following message :

 E/AndroidRuntime(1079): Unsupported Media Type (415) - Unsupported Media Type
E/AndroidRuntime(1079):         at $Proxy5.connect(Native Method)

And in the appengine logs, there is the following message :

/connection 415 16ms 0kb Restlet-Framework/2.2snapshot
"PUT /connexion HTTP/1.1" 415 777 - "Restlet-Framework/2.2snapshot" 
"....appspot.com" ms=17 cpu_ms=1093 api_cpu_ms=0 cpm_usd=0.030509 instance=...


How fix this problem ?

Thank you for your help.

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

Reply via email to