Good Day,

Based on http://www.restlet.org/documentation/1.0/tutorial, I have -

public class HelloWorldServer {

        
        public static void main(String[] args) throws Exception{
                
                
                HelloWorldRestlet res = new HelloWorldRestlet();
                
                new Server(Protocol.HTTP, 8182, res).start(); 

        }

}



public class HelloWorldRestlet extends Restlet{
    public void handle(Request req, Response resp)  {
        
        
        if (req.getMethod().equals(Method.GET)){
                // Testing ....
            resp.setEntity(new StringRepresentation("Hello world!"));
            
            resp.setEntity(new StringRepresentation(s));
            
        } 
        
        
        if (req.getMethod().equals(Method.POST)){
                
                
                // ??
                Form f = req.getResourceRef().getQueryAsForm();
                        
....


I would like to post an XML document and convert it to a DOM structure.
req.getResourceRef().getQueryAsForm() returns nothing. Any ideas?


Regards,
Dan

-- 
View this message in context: 
http://n2.nabble.com/Restlet---Posting-an-XML-document-tp2939798p2939798.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to