You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by in...@gmx.de on 2011/07/28 14:34:10 UTC

Camel CXF Endpoint creating incomplete WSDL?

Hi,

I am trying to implement a Camel CXF endpoint using a simple interface
having a method (just as an example):

void doLogin(User user)

I want to use this as cxf endpoint cxf:cxfEndpoint in from-statement in the
route.

Works fine so far, except that the WSDL that is dynamically created via
?wsdl-URL seems wrong, SOAP UI throws a Nullpointer-Exception when trying to
invoke the Web-Service. Looking at the WSDL, you can see the XSD complex
type defintion for the user object is missing and thus the WSDL validation
fails with message:

"Cannot resolve the name 'tns:user' to a(n) 'type definition' component."

Using the very same interface with plain CXF and declaring a jaxws:endpoint
however DOES 
produce the correct WSDL including the complex type definition of the User
object in the dynamically
created WSDL:

<xsd:complexType name="user">
    <xsd:sequence>
      <xsd:element minOccurs="0" name="name" type="xsd:string"/>
      <xsd:element minOccurs="0" name="password" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>

So what's wrong here in the Camel use case, I am using latest version 2.8? Isn't it supposed to use complex
objects in the signature
of interface methods?

Any hints appreciated.

Regards,


-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by Miroslav <in...@gmx.de>.
OK, I did it: 

https://issues.apache.org/jira/browse/CAMEL-4294

Regards,

-------- Original-Nachricht --------
> Datum: Fri, 29 Jul 2011 22:23:17 +0800
> Von: Willem Jiang <wi...@gmail.com>
> An: users@camel.apache.org
> Betreff: Re: Camel CXF Endpoint creating incomplete WSDL?

> Can you create a JIRA and submit a simple test case with it ?
> It's strange, I don't think camel-cxf code can effect the WSDL generation.
> 
> 
> On 7/29/11 7:39 PM, inliner683@gmx.de wrote:
> > I am using explicit dependencies in the POM for CXF and use version
> 2.4.1.
> >
> > I inspected the WEB-INF/lib folder and in both cases, using camel
> > 2.7.2 or 2.8.0 I have only the CXF 2.4.1 jars deployed.
> >
> > I think it is not related to version clashes, since 2.8.0 by default
> > uses CXF 2.4.1.
> >
> > I did an even more interesting test: I deploy at the same time a
> > Camel CXF Endpoint and a JAX WS endpoint of the very same class:
> >
> > <cxf:cxfEndpoint id="camelEndpoint"  address="/camel"
> serviceClass="com.test.SomeClass"  />
> >
> > <jaxws:endpoint id="cxfEndpoint" address="/cxf"
> implementor="com.test.SomeClass" />
> >
> > The WSDL at the cxf URL is correct, the Camel one not, so this makes
> > sure that the very same JARs produce the error, and it must be some
> handling related to the Camel endpoint.
> >
> > With Camel 2.7.2 none of these issues occur.
> >
> >
> > -------- Original-Nachricht --------
> >> Datum: Fri, 29 Jul 2011 19:18:35 +0800
> >> Von: Willem Jiang<wi...@gmail.com>
> >> An: users@camel.apache.org
> >> Betreff: Re: Camel CXF Endpoint creating incomplete WSDL?
> >
> >> Can you compare the mvn dependency:tree difference between using Camel
> >> 2.7.2 and Camel 2.8.0?
> >> It could relate to some ws annotation jars.
> >>
> >> On Fri Jul 29 18:58:41 2011, inliner683@gmx.de wrote:
> >>> I use latest Camel version 2.8 and CXF 2.4.1
> >>>
> >>> I don't use OSGi, but deploy Camel into Tomcat.
> >>>
> >>> I know that Camel delegates to CXF and I am using the same versions,
> >>> which is even more confusing.
> >>>
> >>> Moreover, I discovered the following:
> >>>
> >>> If I use the very same code and just change in the pom.xml from Camel
> >> 2.8.0
> >>> to 2.7.2 the WSDL is correct! I have the CXF dependencies explicitly
> in
> >> my
> >>> POM pointing to 2.4.1 an I don't change these.
> >>>
> >>> So could anyone please verify, for me this might be a hint for a bug
> >>> in version 2.8.0
> >>>
> >>> Thx.
> >>>
> >>> <quote author="Willem.Jiang">
> >>> Which version of CXF are you using?
> >>> Do you use camel inside of Karaf or other OSGi container ?
> >>>
> >>> camel-cxf is delegate the WSDL generation to CXF, so there should no
> >>> difference between the generated wsdl of camel-cxf and CXF, if you are
> >>> using same version of CXF.
> >>> </quote>
> >>
> >>
> >> --
> >> Willem
> >> ----------------------------------
> >> FuseSource
> >> Web: http://www.fusesource.com
> >> Blog:    http://willemjiang.blogspot.com (English)
> >>            http://jnn.javaeye.com (Chinese)
> >> Twitter: willemjiang
> >> Weibo: willemjiang
> >
> 
> 
> -- 
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>           http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by Willem Jiang <wi...@gmail.com>.
Can you create a JIRA and submit a simple test case with it ?
It's strange, I don't think camel-cxf code can effect the WSDL generation.


On 7/29/11 7:39 PM, inliner683@gmx.de wrote:
> I am using explicit dependencies in the POM for CXF and use version 2.4.1.
>
> I inspected the WEB-INF/lib folder and in both cases, using camel
> 2.7.2 or 2.8.0 I have only the CXF 2.4.1 jars deployed.
>
> I think it is not related to version clashes, since 2.8.0 by default
> uses CXF 2.4.1.
>
> I did an even more interesting test: I deploy at the same time a
> Camel CXF Endpoint and a JAX WS endpoint of the very same class:
>
> <cxf:cxfEndpoint id="camelEndpoint"  address="/camel" serviceClass="com.test.SomeClass"  />
>
> <jaxws:endpoint id="cxfEndpoint" address="/cxf" implementor="com.test.SomeClass" />
>
> The WSDL at the cxf URL is correct, the Camel one not, so this makes
> sure that the very same JARs produce the error, and it must be some handling related to the Camel endpoint.
>
> With Camel 2.7.2 none of these issues occur.
>
>
> -------- Original-Nachricht --------
>> Datum: Fri, 29 Jul 2011 19:18:35 +0800
>> Von: Willem Jiang<wi...@gmail.com>
>> An: users@camel.apache.org
>> Betreff: Re: Camel CXF Endpoint creating incomplete WSDL?
>
>> Can you compare the mvn dependency:tree difference between using Camel
>> 2.7.2 and Camel 2.8.0?
>> It could relate to some ws annotation jars.
>>
>> On Fri Jul 29 18:58:41 2011, inliner683@gmx.de wrote:
>>> I use latest Camel version 2.8 and CXF 2.4.1
>>>
>>> I don't use OSGi, but deploy Camel into Tomcat.
>>>
>>> I know that Camel delegates to CXF and I am using the same versions,
>>> which is even more confusing.
>>>
>>> Moreover, I discovered the following:
>>>
>>> If I use the very same code and just change in the pom.xml from Camel
>> 2.8.0
>>> to 2.7.2 the WSDL is correct! I have the CXF dependencies explicitly in
>> my
>>> POM pointing to 2.4.1 an I don't change these.
>>>
>>> So could anyone please verify, for me this might be a hint for a bug
>>> in version 2.8.0
>>>
>>> Thx.
>>>
>>> <quote author="Willem.Jiang">
>>> Which version of CXF are you using?
>>> Do you use camel inside of Karaf or other OSGi container ?
>>>
>>> camel-cxf is delegate the WSDL generation to CXF, so there should no
>>> difference between the generated wsdl of camel-cxf and CXF, if you are
>>> using same version of CXF.
>>> </quote>
>>
>>
>> --
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>            http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>> Weibo: willemjiang
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by in...@gmx.de.
I am using explicit dependencies in the POM for CXF and use version 2.4.1.

I inspected the WEB-INF/lib folder and in both cases, using camel
2.7.2 or 2.8.0 I have only the CXF 2.4.1 jars deployed.

I think it is not related to version clashes, since 2.8.0 by default
uses CXF 2.4.1.

I did an even more interesting test: I deploy at the same time a
Camel CXF Endpoint and a JAX WS endpoint of the very same class:

<cxf:cxfEndpoint id="camelEndpoint"  address="/camel" serviceClass="com.test.SomeClass"  />

<jaxws:endpoint id="cxfEndpoint" address="/cxf" implementor="com.test.SomeClass" />

The WSDL at the cxf URL is correct, the Camel one not, so this makes
sure that the very same JARs produce the error, and it must be some handling related to the Camel endpoint.

With Camel 2.7.2 none of these issues occur.


-------- Original-Nachricht --------
> Datum: Fri, 29 Jul 2011 19:18:35 +0800
> Von: Willem Jiang <wi...@gmail.com>
> An: users@camel.apache.org
> Betreff: Re: Camel CXF Endpoint creating incomplete WSDL?

> Can you compare the mvn dependency:tree difference between using Camel 
> 2.7.2 and Camel 2.8.0?
> It could relate to some ws annotation jars.
> 
> On Fri Jul 29 18:58:41 2011, inliner683@gmx.de wrote:
> > I use latest Camel version 2.8 and CXF 2.4.1
> >
> > I don't use OSGi, but deploy Camel into Tomcat.
> >
> > I know that Camel delegates to CXF and I am using the same versions,
> > which is even more confusing.
> >
> > Moreover, I discovered the following:
> >
> > If I use the very same code and just change in the pom.xml from Camel
> 2.8.0
> > to 2.7.2 the WSDL is correct! I have the CXF dependencies explicitly in
> my
> > POM pointing to 2.4.1 an I don't change these.
> >
> > So could anyone please verify, for me this might be a hint for a bug
> > in version 2.8.0
> >
> > Thx.
> >
> > <quote author="Willem.Jiang">
> > Which version of CXF are you using?
> > Do you use camel inside of Karaf or other OSGi container ?
> >
> > camel-cxf is delegate the WSDL generation to CXF, so there should no
> > difference between the generated wsdl of camel-cxf and CXF, if you are
> > using same version of CXF.
> > </quote>
> 
> 
> -- 
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>           http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by Willem Jiang <wi...@gmail.com>.
Can you compare the mvn dependency:tree difference between using Camel 
2.7.2 and Camel 2.8.0?
It could relate to some ws annotation jars.

On Fri Jul 29 18:58:41 2011, inliner683@gmx.de wrote:
> I use latest Camel version 2.8 and CXF 2.4.1
>
> I don't use OSGi, but deploy Camel into Tomcat.
>
> I know that Camel delegates to CXF and I am using the same versions,
> which is even more confusing.
>
> Moreover, I discovered the following:
>
> If I use the very same code and just change in the pom.xml from Camel 2.8.0
> to 2.7.2 the WSDL is correct! I have the CXF dependencies explicitly in my
> POM pointing to 2.4.1 an I don't change these.
>
> So could anyone please verify, for me this might be a hint for a bug
> in version 2.8.0
>
> Thx.
>
> <quote author="Willem.Jiang">
> Which version of CXF are you using?
> Do you use camel inside of Karaf or other OSGi container ?
>
> camel-cxf is delegate the WSDL generation to CXF, so there should no
> difference between the generated wsdl of camel-cxf and CXF, if you are
> using same version of CXF.
> </quote>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by in...@gmx.de.
I use latest Camel version 2.8 and CXF 2.4.1

I don't use OSGi, but deploy Camel into Tomcat.

I know that Camel delegates to CXF and I am using the same versions,
which is even more confusing.

Moreover, I discovered the following:

If I use the very same code and just change in the pom.xml from Camel 2.8.0
to 2.7.2 the WSDL is correct! I have the CXF dependencies explicitly in my
POM pointing to 2.4.1 an I don't change these.

So could anyone please verify, for me this might be a hint for a bug
in version 2.8.0

Thx.

<quote author="Willem.Jiang">
Which version of CXF are you using?
Do you use camel inside of Karaf or other OSGi container ?

camel-cxf is delegate the WSDL generation to CXF, so there should no 
difference between the generated wsdl of camel-cxf and CXF, if you are 
using same version of CXF.
</quote>

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by in...@gmx.de.
-------- Original-Nachricht --------
> Datum: Thu, 28 Jul 2011 23:21:04 +0800
> Von: Willem Jiang <wi...@gmail.com>
> An: users@camel.apache.org
> Betreff: Re: Camel CXF Endpoint creating incomplete WSDL?

> Which version of CXF are you using?
> Do you use camel inside of Karaf or other OSGi container ?
> 
> camel-cxf is delegate the WSDL generation to CXF, so there should no 
> difference between the generated wsdl of camel-cxf and CXF, if you are 
> using same version of CXF.
> 
> Willem
> 
> On 7/28/11 8:34 PM, inliner683@gmx.de wrote:
> > Hi,
> >
> > I am trying to implement a Camel CXF endpoint using a simple interface
> > having a method (just as an example):
> >
> > void doLogin(User user)
> >
> > I want to use this as cxf endpoint cxf:cxfEndpoint in from-statement in
> the
> > route.
> >
> > Works fine so far, except that the WSDL that is dynamically created via
> > ?wsdl-URL seems wrong, SOAP UI throws a Nullpointer-Exception when
> trying to
> > invoke the Web-Service. Looking at the WSDL, you can see the XSD complex
> > type defintion for the user object is missing and thus the WSDL
> validation
> > fails with message:
> >
> > "Cannot resolve the name 'tns:user' to a(n) 'type definition'
> component."
> >
> > Using the very same interface with plain CXF and declaring a
> jaxws:endpoint
> > however DOES
> > produce the correct WSDL including the complex type definition of the
> User
> > object in the dynamically
> > created WSDL:
> >
> > <xsd:complexType name="user">
> >      <xsd:sequence>
> >        <xsd:element minOccurs="0" name="name" type="xsd:string"/>
> >        <xsd:element minOccurs="0" name="password" type="xsd:string"/>
> >      </xsd:sequence>
> >    </xsd:complexType>
> >
> > So what's wrong here in the Camel use case, I am using latest version
> 2.8? Isn't it supposed to use complex
> > objects in the signature
> > of interface methods?
> >
> > Any hints appreciated.
> >
> > Regards,
> >
> >
> 
> 
> -- 
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>           http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
> Weibo: willemjiang
> 

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

Re: Camel CXF Endpoint creating incomplete WSDL?

Posted by Willem Jiang <wi...@gmail.com>.
Which version of CXF are you using?
Do you use camel inside of Karaf or other OSGi container ?

camel-cxf is delegate the WSDL generation to CXF, so there should no 
difference between the generated wsdl of camel-cxf and CXF, if you are 
using same version of CXF.

Willem

On 7/28/11 8:34 PM, inliner683@gmx.de wrote:
> Hi,
>
> I am trying to implement a Camel CXF endpoint using a simple interface
> having a method (just as an example):
>
> void doLogin(User user)
>
> I want to use this as cxf endpoint cxf:cxfEndpoint in from-statement in the
> route.
>
> Works fine so far, except that the WSDL that is dynamically created via
> ?wsdl-URL seems wrong, SOAP UI throws a Nullpointer-Exception when trying to
> invoke the Web-Service. Looking at the WSDL, you can see the XSD complex
> type defintion for the user object is missing and thus the WSDL validation
> fails with message:
>
> "Cannot resolve the name 'tns:user' to a(n) 'type definition' component."
>
> Using the very same interface with plain CXF and declaring a jaxws:endpoint
> however DOES
> produce the correct WSDL including the complex type definition of the User
> object in the dynamically
> created WSDL:
>
> <xsd:complexType name="user">
>      <xsd:sequence>
>        <xsd:element minOccurs="0" name="name" type="xsd:string"/>
>        <xsd:element minOccurs="0" name="password" type="xsd:string"/>
>      </xsd:sequence>
>    </xsd:complexType>
>
> So what's wrong here in the Camel use case, I am using latest version 2.8? Isn't it supposed to use complex
> objects in the signature
> of interface methods?
>
> Any hints appreciated.
>
> Regards,
>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang