0 Replies Latest reply on Dec 8, 2010 10:47 AM by ehognestad

    Jboss WebService annotation namespace.

    ehognestad

      Hello fellow jbossians

       

      I am trying to force another namespace than the package name I have in my project.

       

      I.e my package is com.mycompany.music.webservice and my session bean config is:

       

      @Stateless
      @WebService(serviceName = "MusicWService",
              targetNamespace = "http://ws.music.openapi.wimp.amp.com",
              endpointInterface = "com.amp.partnerapi.ws.MusicWS")
      @WebContext(contextRoot = "/WimpOpen", urlPattern = "/music/MusicWService")
      @XmlType(name = "MusicWService", namespace = "http://ws.music.openapi.wimp.amp.com")
      @Local(MusicWS.class)
      @HandlerChain(file = "handler-chain.xml")
      public class MusicWSBean implements MusicWS {

      @Stateless

      @WebService(serviceName = "MusicWService",

              targetNamespace = "http://ws.music.mycompany.com",

              endpointInterface = "com.mycompany.partnerapi.ws.MusicWS")

      @WebContext(contextRoot = "/WimpOpen", urlPattern = "/music/MusicWService")

      @XmlType(name = "MusicWService", namespace = "http://ws.music.mycompany.com")

      @Local(MusicWS.class)

      @HandlerChain(file = "handler-chain.xml")

      public class MusicWSBean implements MusicWS {

       

      I want to force the namespace to be the old package name, to continue supporting the partners that used the old endpoints. I am able to force the targetNamespace, but then I receive no wsdl because the namespace is the same as the new package structure. If I change the package structure, OR remove the targetNamespace parameter from the @WebService annotation it works like before.

       

      Anyone have any idea on how to force/configure this in jboss?

       

      We are using Jboss 4.05 with ejb3's.

       

      Thanks in advance!

       

      Best regards,

       

      Eivind