How to stop CXF to generate it's own wsdl

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to stop CXF to generate it's own wsdl

Sachin
Hi I am using Camel 2.9.1 with CXF 2.4.2.
I am facing this issue where CXF is generating it's own wsdl and exposing it inspite of what i provided. Only differnce between these two wsdls is that CXF generated one doesnt have any wsdl: types defined in it.Which causing problem while accesing this web service using ..?wsdl url.

So how can we specify in camel-cxf to stop CXF to generate it's own wsdl. In plain CXF we can do that by
attribute wsdlLocation in the element jaxws:endpoint


CXF WSDL:

wsdl:definitions name="CDSCompactService" targetNamespace="http://mustservice.summit">
<wsdl:types>  </wsdl:types>
<wsdl:message name="NewTradeResponse">........

Actual WSDL:
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mustservice.summit" xmlns:xsd1="http://mustservice.summit/NewTrade" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CDSCompactService" targetNamespace="http://mustservice.summit">
  <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:import namespace="http://mustservice.summit/NewTrade"
    schemaLocation="mustservice/summit/NewTrade/NewTrade.xsd">
    </xsd:import></xsd:schema>
</wsdl:types>
  <wsdl:message name="NewTradeRequest">.....
   
Reply | Threaded
Open this post in threaded view
|

Re: How to stop CXF to generate it's own wsdl

Christian Mueller
Administrator
Can you share your cxf endpoint configuration with us?

Best,
Christian

On Fri, Dec 14, 2012 at 12:53 PM, Sachin <[hidden email]> wrote:

> Hi I am using Camel 2.9.1 with CXF 2.4.2.
> I am facing this issue where CXF is generating it's own wsdl and exposing
> it
> inspite of what i provided. Only differnce between these two wsdls is that
> CXF generated one doesnt have any wsdl: types defined in it.Which causing
> problem while accesing this web service using ..?wsdl url.
>
> So how can we specify in camel-cxf to stop CXF to generate it's own wsdl.
> In
> plain CXF we can do that by
> attribute wsdlLocation in the element jaxws:endpoint
>
>
> CXF WSDL:
>
> wsdl:definitions name="CDSCompactService"
> targetNamespace="http://mustservice.summit">
> <wsdl:types>  </wsdl:types>
> <wsdl:message name="NewTradeResponse">........
>
> Actual WSDL:
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://mustservice.summit"
> xmlns:xsd1="http://mustservice.summit/NewTrade"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CDSCompactService"
> targetNamespace="http://mustservice.summit">
>   <wsdl:types>
>     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>         <xsd:import namespace="http://mustservice.summit/NewTrade"
>                 schemaLocation="mustservice/summit/NewTrade/NewTrade.xsd">
>         </xsd:import></xsd:schema>
> </wsdl:types>
>   <wsdl:message name="NewTradeRequest">.....
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-stop-CXF-to-generate-it-s-own-wsdl-tp5724084.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
Reply | Threaded
Open this post in threaded view
|

Re: How to stop CXF to generate it's own wsdl

AlanFoster
In reply to this post by Sachin
As Christian Mueller mentioned, it would be good to see your cxf endpoint...
I assume you are using wsdl2java and giving the cxf endpoint a SEI? If you are using payload/message format then it's probably worth a mention you don't need the java classes and you can simply give cxf your desired wsdl, and then I believe cxf will host your wsdl rather than the one created from the wsdl2java classes. I could be wrong though.
Reply | Threaded
Open this post in threaded view
|

Re: How to stop CXF to generate it's own wsdl

Willem.Jiang
Administrator
In reply to this post by Sachin
Hi,  

You can do it by specify the wsdlURL attribute in the cxfEndponit like you did on attribute wsdlLocation in jaws:endpoint.
It will tell CXF to build the service model from WSDL instead of SEI.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, December 14, 2012 at 7:53 PM, Sachin wrote:

> Hi I am using Camel 2.9.1 with CXF 2.4.2.
> I am facing this issue where CXF is generating it's own wsdl and exposing it
> inspite of what i provided. Only differnce between these two wsdls is that
> CXF generated one doesnt have any wsdl: types defined in it.Which causing
> problem while accesing this web service using ..?wsdl url.
>  
> So how can we specify in camel-cxf to stop CXF to generate it's own wsdl. In
> plain CXF we can do that by  
> attribute wsdlLocation in the element jaxws:endpoint
>  
>  
> CXF WSDL:
>  
> wsdl:definitions name="CDSCompactService"
> targetNamespace="http://mustservice.summit">
> <wsdl:types> </wsdl:types>
> <wsdl:message name="NewTradeResponse">........
>  
> Actual WSDL:
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://mustservice.summit"
> xmlns:xsd1="http://mustservice.summit/NewTrade"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CDSCompactService"
> targetNamespace="http://mustservice.summit">
> <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:import namespace="http://mustservice.summit/NewTrade"
> schemaLocation="mustservice/summit/NewTrade/NewTrade.xsd">
> </xsd:import></xsd:schema>
> </wsdl:types>
> <wsdl:message name="NewTradeRequest">.....
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-CXF-to-generate-it-s-own-wsdl-tp5724084.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).



Reply | Threaded
Open this post in threaded view
|

Re: How to stop CXF to generate it's own wsdl

Sachin
Hi, I am using PAYLOAD mode so no need of service classes. Below is my CXF endpoint configuration:

Endpoint[cxf:///ws/CDSCompactService/CDSCompactService?wsdlURL=Systems/webServices/webServices/Summit/WsdlFiles/CDSCompactService.wsdl&serviceName={http://mustservice.summit}CDSCompactService&portName={http://mustservice.summit}CDSCompactService&dataFormat=PAYLOAD]

I have already defined service using wsdlURL, cxf reads this wsdl only but while publishing it creates a new wsdl at which does not have any types information.
http://localhost:9081/bfi/ws/CDSCompactService/CDSCompactService?wsdl