On the Apache jUDDI project we deploy WebServices using the WebService annotation on both the interface as well as on the service implementation. For example:
In the jUDDI project we generated our WebServices Java classes from the WSDL using the CXF tooling. For the SecuroityService it created annotations on the interface of:
@WebService(name = "UDDI_Security_PortType", targetNamespace = "urn:uddi-org:v3_service")
public interface UDDISecurityPortType
and on the implementation class:
targetNamespace = "urn:uddi-org:v3_service")
public class UDDISecurityImpl extends AuthenticatedService implements UDDISecurityPortType
Now if this is deployed to Tomcat + CXF the generated WSDL says:
<wsdl:port binding="tns:UDDI_Security_PortSoapBinding" name="UDDISecurityServicePort">
While when deployed to JBossAS-5.1 (with JBossWS + CXF) the WSDL says:
<wsdl:port binding="tns:UDDISecurityServiceSoapBinding" name="UDDISecurityImplPort">
So clearly the annotations are used in different ways by the two WS stacks (even if the CXF implementation is used in both cases).
Are the differences due to a bug, or is the spec unclear as to what to do with the Annotation MetaData? If it is a bug, which WS Stack does the right thing?
To answer my own question; I forgot about the beans.xml which was overriding things in plain CXF. All is right with the world again. (Thank you Daniel Kulp for pointing this out to me) --Kurt