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
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.
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).