You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by purecharger <rn...@gmail.com> on 2012/08/28 02:11:10 UTC
Controlloing WSDL location name
I recently upgraded to CXF 2.6.2 from 2.2, and in doing so I separated a
single web service interface into two interfaces and also changing the name
of the top level interface used in the deployment descriptor.
before:
interface name = Manager
after:
interface name = ManagerWS
and interface Manager extends ManagerWS
Here is my jax-ws descriptor:
<jaxws:endpoint id="Manager"
xmlns:s="http://api.mycompany.com/"
serviceName="s:Manager" name="Manager"
implementorClass="com.mycompany.ManagerWS"
endpointName="s:Manager"
implementor="#Manager"
address="/Manager" />
The problem I have now is that the new class name causes the <wsdl:location
/> to be different, and existing clients break due to the changed port name:
<wsdl:import
location="http://localhost:8080/DEV/ws/services/soap/Manager?wsdl=ManagerWS.wsdl"
namespace="http://api.mycompany.com/">
Is it possible to control the WSDL name of this service so that I can keep
it as 'Manager', allowing existing clients to work as before?
Ryan
--
View this message in context: http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Controlloing WSDL location name
Posted by purecharger <rn...@gmail.com>.
Adding 'name' to the @WebService annotation did what I was looking for.
Glen, thanks for the link. I did used wsdl2java with the original wsdl to
generate client classes. When I construct and call the actual Endpoint, the
WSDL file on disk is loaded and the imports are resolved, which blew up
when the name of the imported WSDL changed.
Thanks,
Ryan
On Tue, Aug 28, 2012 at 7:51 AM, Daniel Kulp [via CXF] <
ml-node+s547215n5713213h91@n5.nabble.com> wrote:
>
> Likely not via easy spring configuration. You can add name="Manager" to
> the @WebService annotation on the ManagerWS interface and that should
> definitely do it, but that obviously involves a little bit of code changes.
>
> Dan
>
>
>
> On Aug 27, 2012, at 8:11 PM, purecharger <[hidden email]<http://user/SendEmail.jtp?type=node&node=5713213&i=0>>
> wrote:
>
> > I recently upgraded to CXF 2.6.2 from 2.2, and in doing so I separated a
> > single web service interface into two interfaces and also changing the
> name
> > of the top level interface used in the deployment descriptor.
> >
> > before:
> >
> > interface name = Manager
> >
> > after:
> >
> > interface name = ManagerWS
> > and interface Manager extends ManagerWS
> >
> > Here is my jax-ws descriptor:
> >
> > <jaxws:endpoint id="Manager"
> > xmlns:s="http://api.mycompany.com/"
> > serviceName="s:Manager" name="Manager"
> > implementorClass="com.mycompany.ManagerWS"
> > endpointName="s:Manager"
> > implementor="#Manager"
> > address="/Manager" />
> >
> > The problem I have now is that the new class name causes the
> <wsdl:location
> > /> to be different, and existing clients break due to the changed port
> name:
> >
> > <wsdl:import
> > location="
> http://localhost:8080/DEV/ws/services/soap/Manager?wsdl=ManagerWS.wsdl"
> > namespace="http://api.mycompany.com/">
> >
> > Is it possible to control the WSDL name of this service so that I can
> keep
> > it as 'Manager', allowing existing clients to work as before?
> >
> > Ryan
> >
> >
> >
> > --
> > View this message in context:
> http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181.html
> > Sent from the cxf-user mailing list archive at Nabble.com.
>
> --
> Daniel Kulp
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5713213&i=1> -
> http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181p5713213.html
> To unsubscribe from Controlloing WSDL location name, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713181&code=cm5pZGVmZmVyQGdtYWlsLmNvbXw1NzEzMTgxfC0xODcxMzE4OTky>
> .
> NAML<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181p5713254.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Controlloing WSDL location name
Posted by Daniel Kulp <dk...@apache.org>.
Likely not via easy spring configuration. You can add name="Manager" to the @WebService annotation on the ManagerWS interface and that should definitely do it, but that obviously involves a little bit of code changes.
Dan
On Aug 27, 2012, at 8:11 PM, purecharger <rn...@gmail.com> wrote:
> I recently upgraded to CXF 2.6.2 from 2.2, and in doing so I separated a
> single web service interface into two interfaces and also changing the name
> of the top level interface used in the deployment descriptor.
>
> before:
>
> interface name = Manager
>
> after:
>
> interface name = ManagerWS
> and interface Manager extends ManagerWS
>
> Here is my jax-ws descriptor:
>
> <jaxws:endpoint id="Manager"
> xmlns:s="http://api.mycompany.com/"
> serviceName="s:Manager" name="Manager"
> implementorClass="com.mycompany.ManagerWS"
> endpointName="s:Manager"
> implementor="#Manager"
> address="/Manager" />
>
> The problem I have now is that the new class name causes the <wsdl:location
> /> to be different, and existing clients break due to the changed port name:
>
> <wsdl:import
> location="http://localhost:8080/DEV/ws/services/soap/Manager?wsdl=ManagerWS.wsdl"
> namespace="http://api.mycompany.com/">
>
> Is it possible to control the WSDL name of this service so that I can keep
> it as 'Manager', allowing existing clients to work as before?
>
> Ryan
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Controlloing WSDL location name
Posted by Glen Mazza <gm...@talend.com>.
The algorithm used to determine the URL is as shown in point #2 here:
http://www.jroller.com/gmazza/entry/web_service_tutorial#notes
So you have some adjustment options. Otherwise, existing clients, if
they're stub-based (wsdl2java based artifacts) will need regeneration
with the new WSDL so all the hardcoded URL information that those
artifacts use will get properly updated.
I'm not sure why your SOAP clients need to obtain the WSDL via such a
wsdl:import statement, per the JAX-WS spec, the WSDL should be
obtainable via "...web service endpointURL?wsdl" and clients should be
building their artifacts (wsdl2java) anyway via an already downloaded
version of that WSDL that they have locally on their machine.
Regards,
Glen
On 08/27/2012 08:11 PM, purecharger wrote:
> I recently upgraded to CXF 2.6.2 from 2.2, and in doing so I separated a
> single web service interface into two interfaces and also changing the name
> of the top level interface used in the deployment descriptor.
>
> before:
>
> interface name = Manager
>
> after:
>
> interface name = ManagerWS
> and interface Manager extends ManagerWS
>
> Here is my jax-ws descriptor:
>
> <jaxws:endpoint id="Manager"
> xmlns:s="http://api.mycompany.com/"
> serviceName="s:Manager" name="Manager"
> implementorClass="com.mycompany.ManagerWS"
> endpointName="s:Manager"
> implementor="#Manager"
> address="/Manager" />
>
> The problem I have now is that the new class name causes the <wsdl:location
> /> to be different, and existing clients break due to the changed port name:
>
> <wsdl:import
> location="http://localhost:8080/DEV/ws/services/soap/Manager?wsdl=ManagerWS.wsdl"
> namespace="http://api.mycompany.com/">
>
> Is it possible to control the WSDL name of this service so that I can keep
> it as 'Manager', allowing existing clients to work as before?
>
> Ryan
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Controlloing-WSDL-location-name-tp5713181.html
> Sent from the cxf-user mailing list archive at Nabble.com.