Hello.
I want to update my old AS 6.1 Project to AS 7.1 Full Profile and read different migration how-to docs. One Problem I have is to customize the context root of the SLSB EJBs. In the previous versions I used the jboss.xml, which now is deprecated and not working any more. The partially alternative is the jboss-webservices.xml. In jboss.xml this context-root change was achieved with
<webservices>
<context-root>/TestProjectEE</context-root>
</webservices>
In jboss-webservices.xml it should be done with the same elements:
My file looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<webservices>
<context-root>/TestProjectEE</context-root>
</webservices>
Then I got:
Caused by: java.lang.IllegalStateException: Unexpected element: webservices
at org.jboss.wsf.spi.metadata.webservices.JBossWebservicesFactory.parse(JBossWebservicesFactory.java:168)
at org.jboss.wsf.spi.metadata.webservices.JBossWebservicesFactory.load(JBossWebservicesFactory.java:117)
... 8 more
I changed the namespace suffix:
<?xml version="1.0" encoding="UTF-8"?>
<jboss:webservices>
<context-root>/TestProjectEE</context-root>
</jboss:webservices>
And then:
Caused by: java.lang.IllegalStateException: Unexpected element: context-root
at org.jboss.wsf.spi.metadata.webservices.JBossWebservicesFactory.parse(JBossWebservicesFactory.java:168)
at org.jboss.wsf.spi.metadata.webservices.JBossWebservicesFactory.load(JBossWebservicesFactory.java:117)
... 8 more
Is it a namespace-issue?
I have seen, that there is a @WebContext Annotation from a jboss-module available, which I didn't tested. But the optimal solution for me would be to change the context-root in a descriptor file.
Furthermore the FAQ must be changed, because it references to the obsolete jboss.xml
https://community.jboss.org/wiki/JBossWS-FAQ#How_do_I_know_what_endpoint_address_is_being_used
Of course someone of you knows what the solution for this problem is.
Thank you very much