You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Michael <mt...@optonline.net> on 2011/10/29 18:49:22 UTC

CXF Web Service Client Bombs

When I try to run a CXF web service client I generated from a WSDL I get the
following error.

 

Can someone help me out?  Thanks.

 

log4j:WARN No appenders could be found for logger
(org.apache.cxf.common.logging.LogUtils).

log4j:WARN Please initialize the log4j system properly.

Exception in thread "main" java.lang.NoSuchFieldError: QUALIFIED

        at
org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146)

        at
org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:136)

        at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:81)

        at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)

        at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)

        at
org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:
357)

        at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.ja
va:324)

        at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.ja
va:188)

        at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:134)

        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
WSDL(ReflectionServiceFactoryBean.java:382)

        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
eModel(ReflectionServiceFactoryBean.java:499)

        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
nServiceFactoryBean.java:241)

        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
oryBean.java:202)

        at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
ractWSDLBasedEndpointFactory.java:101)

        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)

        at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean
.java:152)

        at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java
:142)

        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:464)

        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:331)

        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:318)

        at javax.xml.ws.Service.getPort(Unknown Source)

        at
gov.faa.swim.nsrr.rd.soaphttp.SoapHttpWeatherImpl.getSoapHttpWeatherImplPort
(SoapHttpWeatherImpl.java:63)

        at
gov.faa.swim.nsrr.rd.soaphttp.SoapHttpWeatherImplPortType_SoapHttpWeatherImp
lPort_Client.main(SoapHttpWeatherImplPortType_SoapHttpWeatherImplPort_Client
.java:55)


Re: CXF Web Service Client Bombs

Posted by Glen Mazza <gm...@talend.com>.
Googling your error message suggests the problem results from having an 
old version of XmlSchema.jar present in your classpath:
http://cxf.547215.n5.nabble.com/consuming-dynamic-client-in-glassfish-NoSuchFieldError-QUALIFIED-td4496629.html
http://cxf.547215.n5.nabble.com/java-lang-NoSuchMethodError-Exception-While-Using-Apache-CXF-2-4-and-wss4j-1-5-11-td4528453.html

Creating your project with Maven might help:
http://www.jroller.com/gmazza/entry/soap_client_tutorial

Glen


On 10/29/2011 12:49 PM, Michael wrote:
> When I try to run a CXF web service client I generated from a WSDL I get the
> following error.
>
>
>
> Can someone help me out?  Thanks.
>
>
>
> log4j:WARN No appenders could be found for logger
> (org.apache.cxf.common.logging.LogUtils).
>
> log4j:WARN Please initialize the log4j system properly.
>
> Exception in thread "main" java.lang.NoSuchFieldError: QUALIFIED
>
>          at
> org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146)
>
>          at
> org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:136)
>
>          at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:81)
>
>          at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)
>
>          at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)
>
>          at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:
> 357)
>
>          at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.ja
> va:324)
>
>          at
> org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.ja
> va:188)
>
>          at
> org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:134)
>
>          at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:382)
>
>          at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:499)
>
>          at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:241)
>
>          at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFact
> oryBean.java:202)
>
>          at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
> ractWSDLBasedEndpointFactory.java:101)
>
>          at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
>
>          at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean
> .java:152)
>
>          at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java
> :142)
>
>          at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:464)
>
>          at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:331)
>
>          at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:318)
>
>          at javax.xml.ws.Service.getPort(Unknown Source)
>
>          at
> gov.faa.swim.nsrr.rd.soaphttp.SoapHttpWeatherImpl.getSoapHttpWeatherImplPort
> (SoapHttpWeatherImpl.java:63)
>
>          at
> gov.faa.swim.nsrr.rd.soaphttp.SoapHttpWeatherImplPortType_SoapHttpWeatherImp
> lPort_Client.main(SoapHttpWeatherImplPortType_SoapHttpWeatherImplPort_Client
> .java:55)
>
>


-- 
Glen Mazza
Talend - http://www.talend.com/apache
Blog - http://www.jroller.com/gmazza/
Twitter - glenmazza


Re: Validation results

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, November 01, 2011 10:45:54 AM Rene Mondeel wrote:
> Hi all,
> I am trying to generate a Web Service client using CXF 2.4.3. I am using
> the Eclipse WTP wizard to do so.
> After selecting a remote WSDL file via the "Browse" button and waiting for
> the validation to complete i get a terse validation warning. Is there a
> way or a place(logfile) to see what the warning is about?

>From within WTP, I have no idea.   If you run from the command line, you can 
try adding the -verbose flag to wsdl2java and it may produce a better warning 
message.   If it ends up being a JAXB error, I would retry with CXF 2.5.0.   
CXF does a better job reporting multiple JAXB errors than 2.4.3.   In some 
cases, JAXB splits error message across several calls to the error listener 
and 2.4.3 just reported the first call (threw an exception immediately).   
With 2.5.0, it stores all the messages from multiple calls and reports them 
all at the end.

Dan



> 
> Regards,
> René Mondeel
> 
> 
> Proclaimer RIVM
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Validation results

Posted by Rene Mondeel <re...@rivm.nl>.
Hi all,
I am trying to generate a Web Service client using CXF 2.4.3. I am using 
the Eclipse WTP wizard to do so.
After selecting a remote WSDL file via the "Browse" button and waiting for 
the validation to complete i get a terse validation warning. Is there a 
way or a place(logfile) to see what the warning is about?

Regards,
René Mondeel 


Proclaimer RIVM