And all is right with the world again, thanks Dan :). I completely
forgot about the beans.xml!
I have attached the two wsdl files to satisfy your curiosity. I think
this is the fragment you
were looking for:
<service name="UDDISecurityImplService">
<port name="UDDISecurityImplPort" binding="tns:UDDISecurityImplPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
Thanks for the explanation of how the names are used, that really
demystifies things for me.
Cheers,
--Kurt
On 11/17/10 4:57 PM, Daniel Kulp wrote:
Out of curiosity, if you run wsgen -wsdl from Java6 on the implementation
class, what does it spit out?
Basically, the three "names" on WebService:
name - really just for the SEI, is the portType name
serviceName - name for the Service. Just for the impl
portName - name of the port. Just for the impl
Now, the trick comes when things are ommitted. If serviceName is ommitted,
its the simple name of the class + "Service". If portName is ommitted, then
the "name" attribute is used with "Port" suffixed. If name is also ommitted,
it is the simple name of the class+ "Port".
HOWEVER, in your case, your beans.xml (in juddi-cxf/src/main/webapp/WEB-
INF/beans.xml) is overriding the values specified in the @WebService
annotation. That's where the UDDI_Security_Port value is coming from. If
you don't need the serviceName and endpointName set there, I would remove
those and let the annotations do thier thing.
Dan
On Wednesday 17 November 2010 2:33:25 pm Kurt T Stam wrote:
I just checked the wsdl generated by the same jUDDI code. When deployed
to tomcat + CXF it says:
<wsdl:service name="UDDI_Security_Port">
<wsdl:port binding="tns:UDDI_Security_PortSoapBinding"
name="UDDISecurityServicePort">
<soap:address location="http://localhost:8080/juddiv3/services/security"/>
</wsdl:port>
</wsdl:service>
The same code deployed to JBoss + CXF
<wsdl:service name="UDDISecurityService">
<wsdl:port binding="tns:UDDISecurityServiceSoapBinding"
name="UDDISecurityImplPort">
<soap:address location="http://127.0.0.1:8080/juddiv3/services/security"/>
</wsdl:port>
</wsdl:service>
So clearly the annotations are used in different ways by the two WS
stacks (even if the CXF implementation is used in both cases). I will
take this discussion to the CXF forum.
Thx,
--Kurt
On 11/16/10 10:01 PM, Kurt T Stam wrote:
I need some help understanding the WebService Annotations.
1. In the jUDDI project we generated our WebServices Java classes from
the WSDL using the CXF tooling. For the InquiryService it created
annotations on the interface of:
@WebService(name = "UDDI_Inquiry_PortType", targetNamespace =
"urn:uddi-org:v3_service")
public interface UDDIInquiryPortType
and on the implementation class:
@WebService(serviceName="UDDIInquiryService",
endpointInterface="org.uddi.v3_service.UDDIInquiryPortType",
targetNamespace = "urn:uddi-org:v3_service")
public class UDDIInquiryImpl extends AuthenticatedService implements
UDDIInquiryPortType
2. On the client side we are calling into the service with:
QName qName = new QName("urn:uddi-org:v3_service", "UDDI_Inquiry_Port");
Service service = Service.create(new URL(endpointURL), qName);
inquiryService = (UDDIInquiryPortType)
service.getPort(UDDIInquiryPortType.class);
3. All seems to work quite well, however
https://issues.apache.org/jira/browse/JUDDI-428 reports that they get
the following warning when deployed to JBoss
"2010-11-02 14:00:36,921 WARN
[org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder] Cannot
get service '{urn:uddi-org:v3_service}UDDIInquiryService' from the
given wsdl definitions! Eventual policies attached to this service
won't be considered."
QUESTION:
Can someone explain to me what the difference is between the
@WebService name on the interface and the @WebService serviceName on
the implementation. Should they be the same as the warning seems to
suggest? Or might this be a bug on the JBoss side of things.
Thanks for any insight you may have!
--Kurt
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions targetNamespace="urn:uddi-org:v3_service" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:uddi-org:v3_service" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:vscache_v3" schemaLocation="UDDISecurityPortType_schema1.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:vs_v3" schemaLocation="UDDISecurityPortType_schema2.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:subr_v3" schemaLocation="UDDISecurityPortType_schema3.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:sub_v3" schemaLocation="UDDISecurityPortType_schema4.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:repl_v3" schemaLocation="UDDISecurityPortType_schema5.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:policy_v3_instanceParms" schemaLocation="UDDISecurityPortType_schema6.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:policy_v3" schemaLocation="UDDISecurityPortType_schema7.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:custody_v3" schemaLocation="UDDISecurityPortType_schema8.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="urn:uddi-org:api_v3" schemaLocation="UDDISecurityPortType_schema9.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="UDDISecurityPortType_schema10.xsd"/>
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="UDDISecurityPortType_schema11.xsd"/>
</xsd:schema>
</types>
<message name="discard_authToken">
<part name="body" element="ns1:discard_authToken" xmlns:ns1="urn:uddi-org:api_v3"/>
</message>
<message name="discard_authTokenResponse"/>
<message name="get_authToken">
<part name="body" element="ns2:get_authToken" xmlns:ns2="urn:uddi-org:api_v3"/>
</message>
<message name="get_authTokenResponse">
<part name="body" element="ns3:authToken" xmlns:ns3="urn:uddi-org:api_v3"/>
</message>
<portType name="UDDI_Security_PortType">
<operation name="discard_authToken">
<input message="tns:discard_authToken"/>
<output message="tns:discard_authTokenResponse"/>
</operation>
<operation name="get_authToken">
<input message="tns:get_authToken"/>
<output message="tns:get_authTokenResponse"/>
</operation>
</portType>
</definitions>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions targetNamespace="http://impl.api.juddi.apache.org/" name="UDDISecurityImplService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://impl.api.juddi.apache.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<import namespace="urn:uddi-org:v3_service" location="UDDISecurityPortType.wsdl"/>
<binding name="UDDISecurityImplPortBinding" type="ns1:UDDI_Security_PortType" xmlns:ns1="urn:uddi-org:v3_service">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="discard_authToken">
<soap:operation soapAction="discard_authToken"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="get_authToken">
<soap:operation soapAction="get_authToken"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="UDDISecurityImplService">
<port name="UDDISecurityImplPort" binding="tns:UDDISecurityImplPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]