1 Reply Latest reply on Nov 14, 2012 11:42 AM by Alessio Soldano

    Modifying published web service name in JBoss 6

    Brad Maxwell Newbie

      Hi all,


      I'm converting a project from JBoss 4.2.3 to JBoss 6 and having some trouble with the published web service name.


      In 4.2.3, the annotations below would result in a URL of:



      @WebContext(contextRoot = "AuthServices")

      @WebService(portName = "AuthorizationServicePort", serviceName = "AuthorizationServiceService", targetNamespace = "urn:xxx.authorization", endpointInterface = "com.xxx.authorization.services.AuthorizationService")


      public class AuthorizationServiceBean extends AbstractService implements AuthorizationService


      In 6, this gives a URL of:



      If I remove the "serviceName" attribute, it sets the URL back to what it used to be.


      @WebService(portName = "AuthorizationServicePort",  targetNamespace = "urn:xxx.authorization",  endpointInterface = "com.xxx.authorization.services.AuthorizationService" )

      @WebContext(contextRoot = "AuthServices", authMethod="BASIC")


      public class AuthorizationServiceBean extends AbstractService implements AuthorizationService


      However, the published name goes from "AuthorizationServiceService" in 4.2.3 to "AuthorizationServiceBeanService" in 6.1. 


      WSDL from 4.2.3 = <definitions name="AuthorizationServiceService" targetNamespace="urn:xxx.authorization">

      WSDL from 6.1 =  <wsdl:definitions name="AuthorizationServiceBeanService" targetNamespace="urn:xxx.authorization">


      And my client, of course, says:


      Exception in thread "main" javax.xml.ws.WebServiceException: {urn:xxx.authorization}AuthorizationServiceService is not a valid service. Valid services are: {urn:xxx.authorization}AuthorizationServiceBeanService


      Since we've got a lot of clients who would be impacted by this having to change this, I'd like to be able to force it back to the old name.  Is there a way to do this?


      Thanks in advance,




      Update:  I accomplished what I needed by including a jbossws-cxf.xml file.  It allowed me to override the service name and published address the way I wanted.