JBoss Community

Modifying published web service name in JBoss 6

created by Brad Maxwell in JBoss Web Services - View the full discussion

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:

http://localhost:8080/AuthServices/AuthorizationServiceBean

 

@WebContext(contextRoot = "AuthServices")

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

@Stateless

public class AuthorizationServiceBean extends AbstractService implements AuthorizationService

 

In 6, this gives a URL of:

http://localhost:8080/AuthServices/AuthorizationServiceService/AuthorizationServiceBean

 

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

@Stateless

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:choicepoint.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,

Brad

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community