Building JAX-RS Application in Nuxeo

sk90_
Champ in-the-making
Champ in-the-making

Hi,

I'm just trying to build a simple app that can handle get requests. I created an empty bundle by following http://doc.nuxeo.com/display/NXDOC/How+to+create+an+empty+bundle.

Now if I want to do something like the example at http://doc.nuxeo.com/pages/viewpage.action?pageId=950281#WebEngine(JAX-RS)-Example.1, I need to have a few things from javax.ws.* included. Where do I put the jar (jsr311-api-1.1-ea.jar) and how do I add it as a dependency?

Right now, I'm getting errors like: package javax.ws.rs does not exist

Thanks

1 ACCEPTED ANSWER

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Seems this documentation is a bit deprecated and you can speed up your work following this.

In fact, you:

  • create the empty webengine project
  • Go directly to the JAX-RS Resource Templating Section in the [documentation you tried to follow][2].

Hope this helps.

[2]: http://doc.nuxeo.com/pages/viewpage.action?pageId=950281#WebEngine(JAX-RS

View answer in original post

5 REPLIES 5

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Seems this documentation is a bit deprecated and you can speed up your work following this.

In fact, you:

  • create the empty webengine project
  • Go directly to the JAX-RS Resource Templating Section in the [documentation you tried to follow][2].

Hope this helps.

[2]: http://doc.nuxeo.com/pages/viewpage.action?pageId=950281#WebEngine(JAX-RS

Thanks! That worked much better. Once I setup the SDK and have a webengine project, how do I add a new jar, like mimepull.jar, to the project?

Please use a new question and I will answer.

sk90_
Champ in-the-making
Champ in-the-making

Thanks!

I need to add the nuxeo-automation-client jar to my project. In eclipse, it doesn't show an error when I refer to classes like HttpAutomationClient in my JAX-RS application. However, during runtime, I get the following error:

java.lang.NoClassDefFoundError: org/nuxeo/ecm/automation/client/jaxrs/impl/HttpAutomationClient.

How do I add the jar to the project properly?

Please create a new question and check the answer if fix the trouble and don't use answer to add comment. Use comment. This is important for the community.