How to use servlet connector?

2007-08-06 Thread Alex
Hi,

Suppose a restlet server implementation is tested to be functioning with
lib/com.noelios.restlet.ext.simple_3.1.jar and
lib/org.simpleframework_3.1/org.simpleframework.jar, how could i change it to be
hosted by a Tomcat?  

I have tried to replace these 2 files with
lib/com.noelios.restlet.ext.servlet_2.4.jar and
lib/javax.servlet_2.4/javax.servlet.jar.  However, the following error message
is given.

==
Aug 7, 2007 10:52:12 AM com.noelios.restlet.Engine createHelper
WARNING: No available server connector supports the required protocols: HTTP . P
lease add the JAR of a matching connector to your classpath.
==

Any code change required?  How could i build the war to be deployed onto Tomcat?

Thanks.

Best Regards,
Alex


Re: posting xml

2007-08-06 Thread Mark Rosenthal

Are you sure you want to post to port 8080?

matt wrote:

Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.  


StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post("http://127.0.0.1:8080/Resources/api/department";, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt


  


posting xml

2007-08-06 Thread matt
Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.  

StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post("http://127.0.0.1:8080/Resources/api/department";, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt


Re: Access log configuration

2007-08-06 Thread Evgeny Shepelyuk


Hi Evgeny,

Actually, you have to explicitly set it with like this for example:
   getLogService().setLoggerName("com.noelios.web.WebComponent.www");

I will make a change to have a default value.

Best regards,
Jerome



What name i should use for configiring my logger ?
Thnx in advance.
--
Best Regards
Evgeny K. Shepelyuk




Hello Jerome!
Thnx for halping. After some shaman dancing access logging started to work.
Will be fine if you can put smth more into tutorial about this issue :)
At least the configuration of logger name and logging properties example.

--
Best Regards
Evgeny K. Shepelyuk