RE: Unsupported Media Type (415)

2011-02-02 Thread Killian
Hi Lads,

Could anyone give us some advice on this issue? It'd be really nice to get it 
working.

Thanks :-)

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


RE: Google AppEngine and Android problems

2011-02-02 Thread Joe Dec
The correct link to the issue : 
http://restlet.tigris.org/issues/show_bug.cgi?id=1219

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


RE: Google AppEngine and Android problems

2011-02-02 Thread Joe Dec
There is an open issue on that: 
http://restlet.tigri​s.org/ds/viewMessage​.do?dsForumId=4447​dsMessageId=26794​69

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


RE: Unsupported Media Type (415)

2011-02-02 Thread Killian
I'm just after finding another thread which appears to have a similar problem

http://restlet.tigris.org/issues/show_bug.cgi?id=1219

There's no answer for it yet though.
Is anyone looking at this thread? It's been more than a week now since this 
issue was posted?

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


Default representation again

2011-02-02 Thread Danny Leshem
I have a resource that returns representations in either text/html or
application/json.

 

Everything works as expected when clients specify the Accept HTTP header.
Otherwise, the server returns JSON by default, whereas I want it to return
HTML. The question is how to do that.

 

A previous thread by Kevin Daly
(http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2646
542 dsMessageId=2646542) says that the default representation is
determined according to the order of plugins in the classpath. Is there a
programmatic way to specify the default representation, e.g. using Restlet
annotations?

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

RE: Re: Re: Re: Re: Need help understanding the correct FLOW

2011-02-02 Thread Randy Paries
Fabian 
thanks alot for all your help
I now have that working.

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


Re: Re: Re: Re: Re: Need help understanding the correct FLOW

2011-02-02 Thread Fabian Mandelbaum
Good to hear that :-) Good luck with the rest of your project Randy!

On Wed, Feb 2, 2011 at 3:30 PM, Randy Paries rtpar...@gmail.com wrote:
 Fabian
 thanks alot for all your help
 I now have that working.




-- 
Fabián Mandelbaum
IS Engineer

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


415 Unsupported Media Type (me too)

2011-02-02 Thread Scott Shea
I did not want to hijack another thread if this is due to my own stupidity.

I use wget to call my service while I am debugging it in Eclipse and get the 
415 Unsupported Media Type error.  Calling command and code below.  Any help 
would be appreciated.

$ wget 
--post-data'StatusId=3EndTime=%222011-01-28%2015%3A34%3A00%22StartTime=%222011-01-28%2015%3A33%3A00%22RunLength=00%3A01%3A00Status=%22Made%20it%22TestCaseId=1'
 http://10.8.8.91:8182/

Code:

import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;
import org.restlet.Server;
import org.restlet.data.Protocol;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
import org.restlet.resource.Put;
import org.restlet.resource.ServerResource;

import java.util.Calendar;
import java.sql.*;

public class webService extends ServerResource {
   private static final Logger log = Logger.getLogger(webService.class);
   Calendar calendar = Calendar.getInstance();

   public static void main(String[] args) throws Exception {  
  // Create the HTTP server and listen on port 8182  
  //new Server(Protocol.HTTP, 8182, webService.class).start();
   new Server(Protocol.HTTP, 8182, webService.class).start();
   BasicConfigurator.configure();
   }

   @Get  
   public String toString() {
  Timestamp currentTimestamp = new 
java.sql.Timestamp(calendar.getTime().getTime());
  System.out.println(Entered the Get area  + currentTimestamp); 
  return Meow!;
  //TODO: Wire up to results
   }
   
   @Post
   public int insertTestResults(int TestCaseId, String StartTime, String 
EndTime, String RunLength, String Status, int StatusId, int ScheduledRun)
   {
   int testRunID = 0;
   Timestamp currentTimestamp = new 
java.sql.Timestamp(calendar.getTime().getTime());
   log.debug(Entered into insertTestResults web method  + 
currentTimestamp);
   System.out.println(Entered the Post area);
   //if (DrillDown == null){
   //   DrillDown = Not provided;
   //}
   mySQLDatabaseConnection SQLConnect = new mySQLDatabaseConnection();
   testRunID = SQLConnect.insertTestResults(TestCaseId, StartTime, 
EndTime, RunLength, StatusId, Status,  1);
   if (testRunID == 0){
   testRunID = -1;// error condition if no Test Run Id is 
returned
   log.error(No testRunID returned for insertTestResults);
   }
   log.info(Test Run Id:  + testRunID);
   log.debug(Leaving insertTestResults web method);
   return testRunID;
   }
   
   @Put
   public void updateTestResults(int TestRunId, String UpdateTime, String 
RunLength, String Status, int StatusId)
   {
   //Update will require TestCaseId, Start Time, UpdateTime, Status and 
StatusId, optional Drill Down Data
   //if (DrillDown == null){
   //  DrillDown = Not provided;
   //}
   int successMarker = 0;
   log.debug(Entered into updateTestResults web method);
   if (UpdateTime == null){
   UpdateTime = 01/01/1900 00:00;
   }
   mySQLDatabaseConnection SQLConnect = new mySQLDatabaseConnection();
   successMarker = SQLConnect.updateTestResults(TestRunId, UpdateTime, 
RunLength, StatusId, Status);
   if (successMarker == 0){
   successMarker = -1;// error condition if no Test Run Id is 
returned
   log.error(Test Run Update Not Successful);
   }
   log.debug(Leaving updateTestResults web method);
   }
}

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


Restlet Does not gererate Service Stub Azure Data Market

2011-02-02 Thread Greg prentice
The entity classes get generated fine but the service stub does not.  VS2010 C# 
can generate both fine.

This is the uri:
https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/$metadata
which looks fine.

Any thoughts?

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


RE: 415 Unsupported Media Type (me too)

2011-02-02 Thread Scott Shea
I think I found my idiocy... nevermind

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