No, per spec, the namespace for the portType is taken from the @WebService 
annotation on the interface and the namespace for the service is from the 
@WebService annotation on the impl.   Thus, if you want them to match, you 
manually have to put it in both places.    Spec doesn't allow that to be 
inherited.  :-(

Dan


On Tuesday, October 18, 2011 12:03:23 PM Mordecus wrote:
> Thanks Daniel, I just noticed that myself - I should not have had the
> serviceName attribute on the interface.
> 
> However, I'm still seeing some strangeness....
> 
> Here is my (modified) interface:
> 
> /@WebService(
> name="ProvisioningOrderService",
> targetNamespace="urn:ws.thinkingphones.com:provisioningorders")
> public interface ProvisioningOrderWebService/
> 
> 
> Here is my implementor:
> 
> /@WebService(endpointInterface="com.thinkingphones.provorders.webservices.Pr
> ovisioningOrderWebService") public class ProvisioningOrderWebServiceImpl
> implements
> ProvisioningOrderWebService/
> 
> This should be correct and the webservice starts... but the namespace for
> the webservice is the (inverted) package name of the implementor; rather
> than the namespace defined on the SEI:
> 
> /<wsdl:definitions
> xmlns:ns1=&quot;urn:ws.thinkingphones.com:provisioningorders&quot;
> xmlns:ns5=&quot;http://schemas.xmlsoap.org/soap/http&quot;
> xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;
> xmlns:tns=&quot;http://webservices.provorders.thinkingphones.com/&quot;
> xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;
> xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
> name=&quot;ProvisioningOrderWebServiceImplService&quot;
> targetNamespace=&quot;&lt;b>http://webservices.provorders.thinkingphones.com
> /*"> *<wsdl:import
> location="http://localhost:8081/tpn-provisioning-orders-ws/ProvisioningOrder
> Service?wsdl=ProvisioningOrderService.wsdl"
> namespace="urn:ws.thinkingphones.com:provisioningorders"></wsdl:import>*/
> 
> etc...
> 
> If I define my implementor like this:
> 
> /@WebService(endpointInterface="com.thinkingphones.provorders.webservices.Pr
> ovisioningOrderWebService",targetNamespace="urn:ws.thinkingphones.com:provis
> ioningorders") public class ProvisioningOrderWebServiceImpl implements
> ProvisioningOrderWebService{/
> 
> (note the defined targetNamespace which is now on both the SEI and the
> implementor), the generated WSDL no longer contains the import and puts the
> schema definitions for the message objects and referenced parameters inline
> in the WSDL and the main webservice and imported schema's are now all in the
> same namespace?
> 
> Is that expected? I figured, since the SEI and implementor are in the same
> package and the endpointInterface is defined on the implementor, it would
> know what to do and correctly use the namespace on the SEI without that
> needing to be repeated on the implementor...
> 
> No biggie, mind you - just.. surprising....
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-is-seeing-my-implementor-class-as-the-S
> EI-tp4914844p4914943.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to