jersey

Jetty web.xml 503

ぃ、小莉子 提交于 2019-12-13 05:03:27
问题 So I'm trying to set up Jetty for a school project, using Jersey on the server side and Gradle to build and run it. I have my web.xml and a test that I'm trying to hit with curl. Here's what I got: web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <servlet>

exception on web-service call

此生再无相见时 提交于 2019-12-13 04:55:16
问题 i have WS(jax-ws) deployed on tomcat . after some time i get this exception while trying to execute the WS call what could be the problem that cause this issue ? as im new to jax-ws WS framework the application is working with MySQL DB but i don't think its related to the problem please advice May 31, 2013 12:31:06 PM com.sun.jersey.json.impl.provider.entity.JSONListElementProvider writeList SEVERE: null javax.xml.stream.XMLStreamException: ClientAbortException: java.net.SocketException:

Upload binary data with HTTP PUT with jersey jaxrs-ri-2.01

拟墨画扇 提交于 2019-12-13 04:53:25
问题 I am using jaxrs-ri-2.01 I would like to get in a parameter the binary data that is sent in the body of my HTTP PUT request. I have found one annotation that should do the trick : @FormDataParam but it does not seem to be available for the jaxrs-ri-2.01 I would like to know: if there's a way I can do it with this jaxrs-ri version if it's mandatory to change jaxrs-ri version to a more recent one how to use this annotation Thank you in advance for your answers! 回答1: if there's a way I can do it

getEntity with GenericType

試著忘記壹切 提交于 2019-12-13 04:48:41
问题 Trying to get an Entity from a REST service. My code is like this: I want to send in an object like this: new GenericType<List<MyObject>>() {} to a methode like this: public static Object callRestWithUrl(String url, Class<?> responseObject) throws MetaServiceException { ClientResponse response = RESTConnectionUtils.callMetaService(url); result = response.getEntity(responseObject); ..... But it gets evaluated to List during runtime and not GenericType and an exception is thrown. 回答1: How do

Unrecognized field , not marked as ignorable ,when parsing json string

守給你的承諾、 提交于 2019-12-13 04:45:55
问题 I am working on a Jersey rest services. trying to pass a generic object(in my case AppObject) as post request and the response from the server is also the generic object(in my case AppObject) i am expecting a string {"license":"12345","list":[{"alternateId":"AlternateID","classificati‌​on":"1"}] } but insted of list i am getting dimRequirement as shown below. So when parsing the json am getting the exception. Is there a way to get it as list itself with out changing the code. Or any

Deploying Spring Boot war with Jersey in Wildfly

南楼画角 提交于 2019-12-13 04:45:26
问题 I have a project where I use Spring boot to build a stand alone jar. It uses jersey to serve up the back end, and I have it configured to also host an angular/js front end in the resources folder. The solution I would like is that this can be standalone in the jar file, and run by itself. But also have a configuration where we build it as a war file, and run it alongside another war inside of Wildfly. I can get it to compile a war, but as soon as I try to start it up, it appears I get issues

com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException

断了今生、忘了曾经 提交于 2019-12-13 04:29:34
问题 Hi I am getting below exception in my web service REST. I understand that MappableContainerException is just a wrapper exception that Jersey uses if the underlying code threw something that is not mappable to a response (in my case it is the NoClassDefFoundError). But I don't khow how to fix it. com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException GRAVE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP

JAAS and acess from android

落花浮王杯 提交于 2019-12-13 04:13:41
问题 Hi i have secured my server using JAAS and i have performed the web authentification , now i have to authenticate from mobile application using android app , how can we use the Rest web services after authentication , is JAAS support access from mobile app ? i have a ws that allow me to verify if the login and password are corect ; haw can i access this ws ? on the web app there is the container authentification so after doing this , i am allowed to use all my ws is there any thing like this

Error on creating Rest client using jersey

放肆的年华 提交于 2019-12-13 04:05:56
问题 I have been creating a Rest client using jersey. I am getting the following exception: com.sun.jersey.api.client.ClientHandlerException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:128) at com.sun.jersey.api.client.Client.handle(Client.java:435) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:557) at com.sun.jersey.api.client.WebResource.access$300(WebResource

Grizzly Static Content path below the context webapp

泪湿孤枕 提交于 2019-12-13 03:58:16
问题 Just spent a day trying to get Grizzly Static Content working. The following URL from the Grizzly Blog explained alot: Grizzly STatic Content . I am trying to mimic Tomcat, in that I would the path to the static content to be below the webapp or the context handle. public class SampleAdminApplication extends ResourceConfig { public SampleAdminApplication() { packages("com.companyname.sample.sampleadmin.server.services"); } } public class SampleGrizzlyWebServer { public static void main(String