users@jersey.java.net

[Jersey] Define resources base URI in dynamic WADL

From: tyju tiui <jckdnk111_at_yahoo.com>
Date: Tue, 13 Sep 2011 13:35:46 -0700 (PDT)

Hi,

I am trying to expose my web service to a public facing web server. I am using Apache as the web server with mod_proxy setup to route requests REST requests back to Jetty / Jersey.
Everything is working fine actually (REST endpoints all work correctly) but the resources base URI in my generated WADL is incorrect for the public-facing server.

The generated URI is: http://localhost:8080/testRestAPI/rest/

What I want is: http://mydomain.com/rest/

I followed the example at the following URL but it didn't make any difference for me: http://jersey.576304.n2.nabble.com/Changing-baseURI-when-generating-WADL-td6169703.html

I've also asked this question on stackoverflow if anyone wants to earn a few points: http://stackoverflow.com/questions/7404863/define-wadl-resources-base-in-jersey

I'm using Jersey 1.9 with Jetty 7.5.1 on OpenJDK 1.6 / RHEL 5.4 x86_64.


Any help / advice would be appreciated!

Thanks,

Ty