You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Goran Cvetkoski <go...@netcetera.com.mk> on 2009/10/06 17:13:39 UTC

Web Service minor versioning with cxf

Hi,

I want to add a minor version update with backward compatibility (add
service method) to a existing web service build with cxf.

What I have done so far is all the steps proposed in this paper
http://blogs.iona.com/sos/20070410-WSDL-Versioning-Best-Practise.pdf.
Additionally, I've added second implementation of the web service. In the
cxf-servlet.xml file, I've modified the endpoint element

to the new version of the service running on the same address.


<jaxws:endpoint id="Service-v1d1" implementor="#serviceV1d1Ws"
wsdlLocation="Service-v1.wsdl" address="/service/1">
    <jaxws:properties>
      <entry key="schema-validation-enabled" value="true" />
    </jaxws:properties>
     <jaxws:inInterceptors>
      <ref bean="accessControlInterceptor" />
      <ref bean="logInboundInterceptor"/>
    </jaxws:inInterceptors>
    <jaxws:outInterceptors>
      <ref bean="logOutboundInterceptor"/>
    </jaxws:outInterceptors>
  </jaxws:endpoint>

Now, for the issue I encountered:

1. when I try to call the web service from a client with the 1.0
implementation, the client is throwing an java.net.MalformedURLException
because the soap address for the 1.0 version is still 'service/1' and not
a fully functional address like it is for 1.1 -
http://localhost:8081/web-service/service/1.
This is what I see in browser for the service definitions in the wsdl:

<wsdl:service name="Service_v1_0">
<wsdl:port binding="tns:Service_v1_0_SoapBinding" name="Service">
<soap:address location="service/1"/>
</wsdl:port>
</wsdl:service>

<wsdl:service name="Service_v1_1">
<wsdl:port binding="tns:Service_v1_1_SoapBinding" name="Service">
<soap:address location="http://localhost:8081/web-service/service/1"/>
</wsdl:port>
</wsdl:service>

I don't see why the soap address isn't generated for both versions of the
service. Any help will be appreciated. Thanks.

--
Netcetera goes mobile - travel in and around Zürich with our free iPhone
application Wemlin:
http://mobile.netcetera.ch/wemlin

Goran Cvetkoski | goran.cvetkoski@netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk