restlet

How does Restlet client handle media type of request?

痴心易碎 提交于 2020-01-30 08:11:46
问题 I've got several newbie questions about how Restlet client handles media type header: What will Restlet client put in 'content-type' header if I pass in an entity of type a) a POJO or b) an InputStream instance? And what the 'accept' header will be? If I want to transfer a POJO in JSON format in HTTP body, do I need to serialize the POJO and pass it in as a JSON string or can I just pass in the POJO and Restlet will do the rest? If it's the former case, do I need to specify the 'content-type'

How does Restlet client handle media type of request?

南楼画角 提交于 2020-01-30 08:11:14
问题 I've got several newbie questions about how Restlet client handles media type header: What will Restlet client put in 'content-type' header if I pass in an entity of type a) a POJO or b) an InputStream instance? And what the 'accept' header will be? If I want to transfer a POJO in JSON format in HTTP body, do I need to serialize the POJO and pass it in as a JSON string or can I just pass in the POJO and Restlet will do the rest? If it's the former case, do I need to specify the 'content-type'

Guide to use Restlet Swagger extension for GAE

你。 提交于 2020-01-17 04:23:08
问题 I tried to do a similar approach: public Restlet createInboundRoot() { Router apiRouter = createApiRouter(); attachSwaggerSpecificationRestlet(apiRouter, "/api-docs"); return apiRouter; } When /api-docs is access Restlet throws Error 404, what could be messing. The idea is that the apiRouter we have is fully working at this state, when we acess resource like /stuff etc. What could be missing in this code? Or is there any specific notes to take into consideration when using Restlet Swagger

401 Unauthorized with OData Update and Delete

我是研究僧i 提交于 2020-01-16 19:24:25
问题 For the first time I have stumbled upon a problem where the solution has not already been provided (completely) on SO, but I hope someone out there can help. My problem is similar to PUT and DELETE in RESTful WCF Service cause 401 Unauthorized error . That is, I have a WCF Data Service where I get a 401 whenever I try to do updates or deletes (read and post works without any problems). The difference to the abovementioned post is that I am not hosting my service in IIS but on Windows Azure,

Spring & Restlet : 100% XML configuration?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-07 04:57:10
问题 I'm working on a project where all configurations are kept in XML files. I'm about to begin on a smaller part of this project, and I'll be using Restlet for that. Basically, what I'd like to do is to create a few subclasses of ServerResource . I could use annotations to specify which class methods accepts which HTTP methods, but since I'm using XML for everything else I'm a bit reluctant. Is there a way to map HTTP methods to class methods for Restlet resources? The actual integration between

Restlet client on Java 1.7 xml parse error “FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present.”

我的未来我决定 提交于 2020-01-06 19:09:14
问题 EDIT : 31/OCT/2014 The fix for this is now available in both Restlet 2.2 and master (future 2.3) branches Our Netbeans Platform Restlet client app runs okay on Java 1.6 but with 1.7.0_11, I get security runtime errors. Is there a easy way to prevent this? WARN org.restlet.log():241 - Unable to unmarshal the XML representation javax.xml.bind.JAXBException: Unable to create customized SAX source - with linked exception: [javax.xml.parsers.ParserConfigurationException: FEATURE_SECURE_PROCESSING:

Preventing Tomcat from appending charset to binary content types

二次信任 提交于 2020-01-05 07:36:48
问题 We have a Restlet based service that returns the following response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1, Restlet-Framework/2.0.7 X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0 Content-Disposition: inline; filename=Time_for_a_breather.pdf Date: Fri, 13 May 2011 23:41:24 GMT Accept-Ranges: bytes Content-Type: application/pdf;charset=UTF-8 Content-Length: 218495 but unfortunately within some browsers (Chrome in particular) we are

Preventing Tomcat from appending charset to binary content types

六眼飞鱼酱① 提交于 2020-01-05 07:36:10
问题 We have a Restlet based service that returns the following response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1, Restlet-Framework/2.0.7 X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0 Content-Disposition: inline; filename=Time_for_a_breather.pdf Date: Fri, 13 May 2011 23:41:24 GMT Accept-Ranges: bytes Content-Type: application/pdf;charset=UTF-8 Content-Length: 218495 but unfortunately within some browsers (Chrome in particular) we are

Restlet in OSGI can not find com/sun/net/httpserver/HttpHandler

心不动则不痛 提交于 2020-01-05 02:12:07
问题 I am trying to use Restlet in embedded OSGi environment. I have added the org.restlet.jar version 2.3.0 in the class path of my restlet test bundled. But it kept giving me the following error. java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler The documentation says that this jar should be enough but it is currently not working. The bundle is started by an Equinox Framework which is started by a standalone launcher, later to be used outside of Eclipse environment. Is there

Is RESTlet suitable for this job?

强颜欢笑 提交于 2020-01-04 15:28:12
问题 (sorry for reposting this question, for some reason I can't log in to the other account) Is RESTlet the best choice for performing the following server/client architecture? 1- we have a server containing a database and an ftp server (within a network of 20 clients) 2- the various users on the network can create user accounts (there exists different access permissions) 3- users should be able to: (a) retrieve data from the database or files from the ftp server (b) store data in the database or