-
1. How to define context-root or URL for web service?
twieden Jan 22, 2011 5:56 AM (in response to baradon)Hello Heiner,
i'm not one of the WebService experts - just another user ...
In my expierience the idea to keep an application independant from the application server follows the java idea, but in reality i never seen the a project changed the server platform when in was running. So i would propose you to take the dependency to jboss - if the server will be changed really, you have to adapt your code anyway, as other app servers have their specialities too.
I dont excatly know from where jboss takes the context root, may be you check
- the service element in the WSDL
- try to use the Endpoint publish() method (see http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/ )
Hope this helps in any way ...
Best regards, Timo
-
3. How to define context-root or URL for web service?
baradon Jan 24, 2011 6:29 AM (in response to asoldano)Hi Alessio,
thanks for the link. It partly solved my problem. I now can define the URL via the jboss.xml file. The only thing is, that this file needs to be in the ejb-jar. Is there a way to configure this directly in the ear-file, without touching the ejb-jar?
@Timo: I agree, that the actual artefact deployed in an application server will most likely not be portable. That's fine for me. My problem is, that we have some JARs treated as an AS-independant product. These JARs will be used in project-specific (and therefore AS-specific) EARs.
I know that I could now re-pack the ejb-jar and add the project specific jboss.xml file. But for me it would be a cleaner solution, if it could be configured at EAR level.
Best regards,
Heiner
-
4. Re: How to define context-root or URL for web service?
jdabrowski Jun 20, 2011 8:23 AM (in response to baradon)So there is no way to set contextRoot at ear level?
I need context root because I have more then one ear in some servers and I would like to separate the addresses and I can't define it in @WebContext as was explained in FAQ without default values (some beans can go to different ears).