Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

JAXRS: RegEx Jersey vs. CXF (2.5.2)

maven repository for openws dependency
(18 lines)
Mock HTTP Service
(15 lines)
Feb 7, 2012
Klevenz, Stephan
Klevenz, Stephan
Hi,

I have another issue within compatibility between Jersey and CXF and maybe
you can give me a hint. The issue is with the following URL pattern where
CXF doesn't dispatch to the expected handler:

http://localhost:8810/test/test.svc/categories(1)/products

The relevant code snippet is a resource class and a sub resource class:

@Path("{entitySetName}{id: \\(.+?\\)}")
public class EntityRequestResource {

  @Path("{navProp: .+}")
  public PropertyRequestResource getNavProperty() {
    return new PropertyRequestResource();
  }
}


public class PropertyRequestResource {
  @GET
  @Produces({
    ODataConstants.APPLICATION_ATOM_XML_CHARSET_UTF8,
    ODataConstants.TEXT_JAVASCRIPT_CHARSET_UTF8,
    ODataConstants.APPLICATION_JAVASCRIPT_CHARSET_UTF8 })
  public Response getNavProperty() {...}
}

The complete WADL file is checked into a source repository and is
accessible at [1]. [2] is the corresponding Jersey generated WADL file of
the same code. With Jersey it doesn't fail. [3] is an example maven
project with has a failing JUnit test isolating the problem. [4] is the
fine trace of CXF that doesn't find a matching method.

Any hint how to get this fixed is welcome. Thanks in advance.

Regards,
Stephan


[1]
https://bitbucket.org/sklevenz/example/src/ecc3183d5976/org.example.core/sr" rel="nofollow" target="_blank">https://bitbucket.org/sklevenz/exampl...g.example.core/sr
c/test/resources/wadl.cxf.xml
[2]
https://bitbucket.org/sklevenz/example/src/ecc3183d5976/org.example.core/sr" rel="nofollow" target="_blank">https://bitbucket.org/sklevenz/exampl...g.example.core/sr
c/test/resources/wadl.jersey.xml
[3] https://bitbucket.org/sklevenz/example
[4] CXF Trace:
2012-02-07 17:38:09,744 INFO  [main]
org.example.test.compatibility.OData4JCompatibilityTest:
******************************************************************
2012-02-07 17:38:09,745 INFO  [main]
org.example.test.compatibility.OData4JCompatibilityTest: Activated Server
Type = CXF
2012-02-07 17:38:09,745 INFO  [main]
org.example.test.compatibility.OData4JCompatibilityTest:
******************************************************************
2012-02-07 17:38:09,746 INFO  [main]
org.example.test.compatibility.OData4JCompatibilityTest:

Reply
Tags: cxfcompatibility
Messages in this thread
JAXRS: RegEx Jersey vs. CXF (2.5.2)
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(77 lines) Feb 7, 2012 16:39
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(127 lines) Feb 8, 2012 03:00
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(173 lines) Feb 8, 2012 05:45
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(199 lines) Feb 8, 2012 07:00
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(233 lines) Feb 8, 2012 09:14
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(258 lines) Feb 16, 2012 10:56
reply Re: JAXRS: RegEx Jersey vs. CXF (2.5.2)
(289 lines) Feb 17, 2012 01:13
Re: svn commit: r1208752 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/cors:
November 30, 2011 02:30:01 PM
I almost beat you to this. On Wed, Nov 30, 2011 at 3:27 PM, <dku### @apache.org> wrote: > Author: dkulp > Date: Wed Nov 30 20:27:39 2011 > New Revision: 1208752 > > URL: http://svn.apache.org/viewvc?rev=1208752&view=rev…
Re: svn commit: r1086052 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/clien
March 28, 2011 03:45:17 AM
Hi Christian On Sun, Mar 27, 2011 at 11:00 PM, <cschne### @apache.org> wrote: > Author: cschneider > Date: Sun Mar 27 22:00:23 2011 > New Revision: 1086052 > > URL: http://svn.apache.org/viewvc?rev=1086052&view=rev >…
Re: svn commit: r1033532 - /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/secu
November 10, 2010 09:49:23 AM
Hi Glen thanks for trying to clean up the tests, but I'd actually like them retained, but I agree some code optimization needs to be done though, please note, the tests you have removed use *CONFIG2* which has a slightly different conduit…
Jersey / CXF compatibility
January 28, 2012 07:34:45 AM
Hi, I'm having a strange problem while executing a compatibility tests suite for Jersey and CXF. All tests running twice as parameterized unit tests where the first run uses Jersey and the second run is with CXF. Unfortunately CXF is throwing an…
Re: ipojo + Jersey?
August 24, 2010 10:47:33 AM
Hi, So, I've tested and didn't get any issue. Here are my bundles (also deploy your feature) 000047 ACT osgi.cmpn-4.2.0.200908310645 000048 ACT org.apache.felix.ipojo-1.6.0 000049 ACT ipojo-bundle-1.3 <-- the bundle I've created My component…
ipojo + Jersey?
August 23, 2010 01:44:05 AM
I have an extensive application wired using iPojo (love it!) but now I want to create a REST API bundle where servlets are registered through pax-web. I was looking at Jersey for building out the endpoints, but I can't seem to get Jersey/iPojo to…
Jersey & Tomcat...
January 16, 2011 03:17:38 AM
Hi All, I am a newby to Jersey (1.5) but not Tomcat (6.0.20). I am at a point where when I send a complex object from my client program to Tomcat I get this error about when reading the Message body a reader is not found. The odd thing is I can…
Using Sling with Jersey Client Libs
September 20, 2010 01:20:13 AM
Hi Guys I'm clutching at straws here cause the jersey ml is pretty quiet and I can't find any useful information on google. Anyone tried creating a restful client bundle with the Jersey client libs? I ask only because I keep getting a null…
Re: Using Sling with Jersey Client Libs
September 20, 2010 11:24:45 AM
Hi BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Hi Bertrand, Thanks for the reply, I looked through your code, but could not find anything obvious. Because our Sling server is not running the server side code, we aren't…
MessageBodyReader exceptions with jersey client
July 12, 2010 02:59:20 PM
(also posted on the jersey list) I'm trying to use a jersey client application in OSGi, and I'm getting a MessageBodyReader not found exception. If I run the client application as a standalone POJO, everything works fine, but when I try to run it…
Help with Jersey Rest Services and Cayenne
June 1, 2011 01:57:25 PM
I am utilizing the JAXB annotations to convert my objects from Cayenne into XML and/or Jason format. The Jersey/JAXB libraries are complaining: SEVERE: Mapped exception to response: 500 (Internal Server Error) …
Can't use jersey library classes within processor
August 2, 2011 01:15:02 AM
Greetings. I had a similar issue with activemq and httpservlet, that, until now, stayed unsolved, in the activemq forum. Now, its camel and jersey classes. This is what its going on: this is my code: http://pastie.org/2307602 I have already…
Re: Using Sling with Jersey Client Libs
September 20, 2010 11:52:16 AM
BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }Ah my bad, looks like Jersey client has an OSGI Activator class. My OSGI newbism is showing through here, just gotta work out how to activate it know ;) Tom On Mon 20/09/10 5:24…
Created: (CAMEL-3196) Upgrade to Jersey 1.4 GA
October 5, 2010 01:31:29 AM
Upgrade to Jersey 1.4 GA
Created] (CAMEL-4626) Upgrade to Jersey 1.10
November 6, 2011 07:47:37 AM
Upgrade to Jersey 1.10
How to query same key for regex match or regex non-match
October 17, 2011 11:07:52 PM
I have these records: { 'Title' : 'foo' } { 'Title' : 'foo 2' } { 'Title' : 'foo bar' } To find all records whose Titles contain 'foo' but exclude the record that contains 'bar', I would have thought this would work: (I'm using…
Jersey Client Call to Tomcat creates new servlet while for Metro Soap call it does not do that...
January 16, 2011 09:19:46 PM
Hi All, I noticed with Jersey 1.5 that whenever I execute a Jersey client side request it creates a new servlet rather than reuse the existing servlet. I know this because in my constructor for my servlet I send out a message and it is going to …
Created] (CAMEL-3876) Upgrade to jersey 1.6 in camel-web
April 17, 2011 02:19:12 AM
Upgrade to jersey 1.6 in camel-web
Created: (CAMEL-3609) Upgrade to jersey 1.5 in camel-web
February 1, 2011 09:31:25 AM
Upgrade to jersey 1.5 in camel-web
JAXRS EJBInvoker
June 18, 2011 11:17:04 PM
It has been a while since I have written to the dev list, but I am working on putting an JAXRSEJBInvoker together. The naive implementation (in this case, that means rough draft), consists of taking JAXRSInvoker, replacing all instances of that…
How can I use UTF-8 with org.apache.cxf.jaxrs.client.WebClient create()?
June 12, 2011
This is about Apache CXF WebClient , WebClient.create("URL", "username", "password", null); when I use a UTF-8 username to create a WebClient…
NIO support in Jersey
April 10, 2011
Hi All, Does latest version of jersey take advantage of NIO? We are using tomcat 6.0.x version in production with J2SE 6.x -- Regards, Praveen…
Http 204 error in REST web service (Jersey)
February 7, 2011
Hi everyone ! I am using Jersey/Java to develop my REST services. I need to return an XML representation for my CarStore : @XmlRootElement public…
Jersey Spring Simple JDBC - mapMappableContainerException
January 10, 2011
Hi iv been struggling with this error for some time and really cant figure out why its occurring , i have a web application that uses springs…
Ignore self-signed ssl cert using Jersey Client
May 18, 2011
I'm using the Jersey Client library to run tests against a rest service running on jboss. I have https set up fine on the server (running on…
Bare minimum necessary for a single Jersey GET resource?
December 21, 2010
I am missing something obvious, but I'm not sure what. I have a single "HelloWorld.java" that has a single @GET method that returns some text. My…
How to do authenticate in REST web service using jersey and java
April 29, 2011
hi, how to do authentication in REST web service using jersey framework and java? I used NetBean IDE and create Rest web service, the application…
Strange Jersey exceptions when load testing our web application
April 28, 2011
Hi all, we are developing a web application using tomcat servlet container and Jersey as RESTful service engine. The app is deployed on two tomcat…
Java Jersey: Get client IP in rest method on Tomcat.
May 27, 2011
I have a Jersey rest webservice that runs on tomcat 6. I have a @Post method that consumes Multipart: @Path("identify") @POST…
Implment RESTful webservice with Jersey and spring security
March 21, 2011
Hi . These days, I am implementing RESTful webservice with Jersey. For security, we are considering to use spring security. During integrate jersey…
Jersey wadl generation works in jetty but not in tomcat
June 6, 2011
I deploy the same Jersey app war to Jetty and Tomcat. Since I have wadl generation configured in web.xml i expect baseURL/application.wadl to work.…
Making a POST call to Google Translate with Jersey returns 411
January 21, 2011
Hello, I'm trying to write a POST call to Google Translate with Jersey 1.5. This is my code: package main; import com.sun.jersey.api.client.Client;…
How to process variable numbers of parameters for jersey post requests
February 24, 2011
I've got a Jersey REST server that responds to post requests like so: @POST @Produces(MediaType.TEXT_HTML)…
Weblogic REST Client with Jersey HTTPS: Handshake failure
May 6, 2011
Setup: WL 9.2 + Jersey 1.1.5.1 on WL's Jrockit. Picked Jersey 1.1.5.1 because newer versions require Java 6, I believe. Weblogic EJB acts as REST…
Process parameters of a POST HTTP request in a REST web service (JERSEY)
June 25, 2011
I'm developing a rest web service on GAE. I'm using Jersey framework to implement the services. It is a POST service where I have to pass also…
How to create a resource link in the GET output (XML output) using Jersey
March 2, 2011
Hi, I am new to RESTful web services. Please bear with me if I am asking a silly question. I spent several hours on this. But, couldn't come with a…
Why isn't this regex working: find ./ -regex '.*[mh]$' | sort | grep --exclude="UnitTests" *
May 5, 2011
why isn't this regex working: find ./ -regex '.*[mh]$' | sort | grep --exclude="UnitTests" * The following works: find ./ -regex '.*[mh]$' | sort…
Apache mod_proxy_html Substitute: how to re-use part of regex match? (regex variables?)
February 16, 2011
[Full disclosure: Cross-post between here and ServerFault, because I believe the audiences (server admins & devs) are distinct enough to warrant…
Apache mod_proxy_html Substitute: how to re-use part of regex match? (regex variables?)
February 16, 2011
Hi all, Have a unique URL-rewriting situation in Apache. I need to be able to take a URL that starts with "\u002f[X]" or '\u002f[X]" Where X is the…
Ruby, given a regex with a pipe | the regex is stopping there. How to safely deal with pipes?
March 22, 2011
Hello, I have an app where a user can input text in a textarea. I then use that to match against a large block of text to extract whatever the user…