You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by kranga <kr...@k2d2.org> on 2007/07/19 19:52:10 UTC

Error trying to run client against web service with Header

I'm trying to build a webservice against the WSDL at 
http://www.xignite.com/xRealTime.asmx?WSDL

I generated the client using wsdl2Java included the -exsh flag. However, 
when I run the SOAP client, I get the following exception:

Note: The web service works perfectly when I access from Axis2 generated 
client, but I'd really like to use CXF. So please help!

EXCEPTION STACK TRACE:
 Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find a message part matching name 
{http://www.xignite.com/services/}Header. Possible values are 
[{http://www.xignite.com/services/}Time, 
{http://www.xignite.com/services/}Symbol, 
http://www.xignite.com/services/}Exchange].

at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(Jax
WsServiceFactoryBean.java:393)

at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(Jax
WsServiceFactoryBean.java:371)

at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
(JaxWsServiceFactoryBean.java:187)

at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOp
erations(ReflectionServiceFactoryBean.java:303)

at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
s(JaxWsServiceFactoryBean.java:196)

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

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

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

at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpo
intFactory.java:83)

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

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

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

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


Re: Error trying to run client against web service with Header

Posted by kranga <kr...@k2d2.org>.
I'm using version the 2.0 release not the latest snapshot.

Thanks

----- Original Message ----- 
From: "Jim Ma" <em...@iona.com>
To: <cx...@incubator.apache.org>
Sent: Thursday, July 19, 2007 11:14 PM
Subject: Re: Error trying to run client against web service with Header


> Hi,
> I think this issue is fixed by James couple days before 
> .(http://svn.apache.org/viewvc?view=rev&rev=554819*)* . Did you used the 
> lastest cxf kit ?
> Cheers
> Jim
>
>
>
> kranga wrote:
>> Can someone please attempt to duplicate this and help me debug the root 
>> cause. The error is with the geenrated code without changes. The WSDL is 
>> readily accessible at the location (you don't have to register) and the 
>> error happens on calling the SoapPort implementation. Any help is 
>> appreciated.
>>
>> Thanks
>>
>> ----- Original Message ----- From: "kranga" <kr...@k2d2.org>
>> To: <cx...@incubator.apache.org>
>> Sent: Thursday, July 19, 2007 1:52 PM
>> Subject: Error trying to run client against web service with Header
>>
>>
>>> I'm trying to build a webservice against the WSDL at 
>>> http://www.xignite.com/xRealTime.asmx?WSDL
>>>
>>> I generated the client using wsdl2Java included the -exsh flag. However, 
>>> when I run the SOAP client, I get the following exception:
>>>
>>> Note: The web service works perfectly when I access from Axis2 generated 
>>> client, but I'd really like to use CXF. So please help!
>>>
>>> EXCEPTION STACK TRACE:
>>> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
>>> Could not find a message part matching name 
>>> {http://www.xignite.com/services/}Header. Possible values are 
>>> [{http://www.xignite.com/services/}Time, 
>>> {http://www.xignite.com/services/}Symbol, 
>>> http://www.xignite.com/services/}Exchange].
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(Jax
>>> WsServiceFactoryBean.java:393)
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(Jax
>>> WsServiceFactoryBean.java:371)
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
>>> (JaxWsServiceFactoryBean.java:187)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOp
>>> erations(ReflectionServiceFactoryBean.java:303)
>>>
>>> at
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
>>> s(JaxWsServiceFactoryBean.java:196)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
>>> WSDL(ReflectionServiceFactoryBean.java:195)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
>>> eModel(ReflectionServiceFactoryBean.java:246)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
>>> nServiceFactoryBean.java:136)
>>>
>>> at
>>> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpo
>>> intFactory.java:83)
>>>
>>> at
>>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50)
>>>
>>> at
>>> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean
>>> .java:82)
>>>
>>> at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:320)
>>>
>>> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:238)
>>>
>>
> 


Re: Error trying to run client against web service with Header

Posted by Jim Ma <em...@iona.com>.
I verified and this issue is fixed in latest cxf  kit . But I found 
another unsupported binding in CXF. When I run the soap client , I get 
the below
exception :

     [java] Exception in thread "main" javax.xml.ws.WebServiceException: 
org.apache.cxf.service.factory.ServiceConstrluctionException
     [java]     at 
org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:243)
     [java]     at javax.xml.ws.Service.getPort(Service.java:94)
       ...
     [java] Caused by: org.apache.cxf.BusException: No binding factory 
for namespace http://schemas.xmlsoap.org/wsdl/http/ registered
     [java]     at 
org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:78)
     [java]     at 
org.apache.cxf.endpoint.EndpointImpl.createBinding(EndpointImpl.java:127)
     [java]     ... 14 more

I filled a jira issue for this : 
https://issues.apache.org/jira/browse/CXF-816.

BTW , CXF implemented own http binding which can easily build restful 
webservice.
http://cwiki.apache.org/CXF20DOC/http-binding.html ,FYI.


Jim

Jim Ma wrote:
> Hi,
> I think this issue is fixed by James couple days before 
> .(http://svn.apache.org/viewvc?view=rev&rev=554819*)* . Did you used 
> the lastest cxf kit ?
> Cheers
> Jim
>
>
>
> kranga wrote:
>> Can someone please attempt to duplicate this and help me debug the 
>> root cause. The error is with the geenrated code without changes. The 
>> WSDL is readily accessible at the location (you don't have to 
>> register) and the error happens on calling the SoapPort 
>> implementation. Any help is appreciated.
>>
>> Thanks
>>
>> ----- Original Message ----- From: "kranga" <kr...@k2d2.org>
>> To: <cx...@incubator.apache.org>
>> Sent: Thursday, July 19, 2007 1:52 PM
>> Subject: Error trying to run client against web service with Header
>>
>>
>>> I'm trying to build a webservice against the WSDL at 
>>> http://www.xignite.com/xRealTime.asmx?WSDL
>>>
>>> I generated the client using wsdl2Java included the -exsh flag. 
>>> However, when I run the SOAP client, I get the following exception:
>>>
>>> Note: The web service works perfectly when I access from Axis2 
>>> generated client, but I'd really like to use CXF. So please help!
>>>
>>> EXCEPTION STACK TRACE:
>>> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
>>> Could not find a message part matching name 
>>> {http://www.xignite.com/services/}Header. Possible values are 
>>> [{http://www.xignite.com/services/}Time, 
>>> {http://www.xignite.com/services/}Symbol, 
>>> http://www.xignite.com/services/}Exchange].
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(Jax 
>>>
>>> WsServiceFactoryBean.java:393)
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(Jax 
>>>
>>> WsServiceFactoryBean.java:371)
>>>
>>> at 
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation 
>>>
>>> (JaxWsServiceFactoryBean.java:187)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOp 
>>>
>>> erations(ReflectionServiceFactoryBean.java:303)
>>>
>>> at
>>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation 
>>>
>>> s(JaxWsServiceFactoryBean.java:196)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom 
>>>
>>> WSDL(ReflectionServiceFactoryBean.java:195)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic 
>>>
>>> eModel(ReflectionServiceFactoryBean.java:246)
>>>
>>> at
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio 
>>>
>>> nServiceFactoryBean.java:136)
>>>
>>> at
>>> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpo 
>>>
>>> intFactory.java:83)
>>>
>>> at
>>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50) 
>>>
>>>
>>> at
>>> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean 
>>>
>>> .java:82)
>>>
>>> at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:320)
>>>
>>> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:238)
>>>
>>
>

Re: Error trying to run client against web service with Header

Posted by Jim Ma <em...@iona.com>.
Hi,
I think this issue is fixed by James couple days before 
.(http://svn.apache.org/viewvc?view=rev&rev=554819*)* . Did you used the 
lastest cxf kit ?
Cheers
Jim



kranga wrote:
> Can someone please attempt to duplicate this and help me debug the 
> root cause. The error is with the geenrated code without changes. The 
> WSDL is readily accessible at the location (you don't have to 
> register) and the error happens on calling the SoapPort 
> implementation. Any help is appreciated.
>
> Thanks
>
> ----- Original Message ----- From: "kranga" <kr...@k2d2.org>
> To: <cx...@incubator.apache.org>
> Sent: Thursday, July 19, 2007 1:52 PM
> Subject: Error trying to run client against web service with Header
>
>
>> I'm trying to build a webservice against the WSDL at 
>> http://www.xignite.com/xRealTime.asmx?WSDL
>>
>> I generated the client using wsdl2Java included the -exsh flag. 
>> However, when I run the SOAP client, I get the following exception:
>>
>> Note: The web service works perfectly when I access from Axis2 
>> generated client, but I'd really like to use CXF. So please help!
>>
>> EXCEPTION STACK TRACE:
>> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
>> Could not find a message part matching name 
>> {http://www.xignite.com/services/}Header. Possible values are 
>> [{http://www.xignite.com/services/}Time, 
>> {http://www.xignite.com/services/}Symbol, 
>> http://www.xignite.com/services/}Exchange].
>>
>> at 
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(Jax 
>>
>> WsServiceFactoryBean.java:393)
>>
>> at 
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(Jax 
>>
>> WsServiceFactoryBean.java:371)
>>
>> at 
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation 
>>
>> (JaxWsServiceFactoryBean.java:187)
>>
>> at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOp 
>>
>> erations(ReflectionServiceFactoryBean.java:303)
>>
>> at
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation 
>>
>> s(JaxWsServiceFactoryBean.java:196)
>>
>> at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom 
>>
>> WSDL(ReflectionServiceFactoryBean.java:195)
>>
>> at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic 
>>
>> eModel(ReflectionServiceFactoryBean.java:246)
>>
>> at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio 
>>
>> nServiceFactoryBean.java:136)
>>
>> at
>> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpo 
>>
>> intFactory.java:83)
>>
>> at
>> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50) 
>>
>>
>> at
>> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean 
>>
>> .java:82)
>>
>> at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:320)
>>
>> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:238)
>>
>

Re: Error trying to run client against web service with Header

Posted by kranga <kr...@k2d2.org>.
Can someone please attempt to duplicate this and help me debug the root 
cause. The error is with the geenrated code without changes. The WSDL is 
readily accessible at the location (you don't have to register) and the 
error happens on calling the SoapPort implementation. Any help is 
appreciated.

Thanks

----- Original Message ----- 
From: "kranga" <kr...@k2d2.org>
To: <cx...@incubator.apache.org>
Sent: Thursday, July 19, 2007 1:52 PM
Subject: Error trying to run client against web service with Header


> I'm trying to build a webservice against the WSDL at 
> http://www.xignite.com/xRealTime.asmx?WSDL
>
> I generated the client using wsdl2Java included the -exsh flag. However, 
> when I run the SOAP client, I get the following exception:
>
> Note: The web service works perfectly when I access from Axis2 generated 
> client, but I'd really like to use CXF. So please help!
>
> EXCEPTION STACK TRACE:
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
> Could not find a message part matching name 
> {http://www.xignite.com/services/}Header. Possible values are 
> [{http://www.xignite.com/services/}Time, 
> {http://www.xignite.com/services/}Symbol, 
> http://www.xignite.com/services/}Exchange].
>
> at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(Jax
> WsServiceFactoryBean.java:393)
>
> at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(Jax
> WsServiceFactoryBean.java:371)
>
> at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
> (JaxWsServiceFactoryBean.java:187)
>
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOp
> erations(ReflectionServiceFactoryBean.java:303)
>
> at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation
> s(JaxWsServiceFactoryBean.java:196)
>
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFrom
> WSDL(ReflectionServiceFactoryBean.java:195)
>
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServic
> eModel(ReflectionServiceFactoryBean.java:246)
>
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflectio
> nServiceFactoryBean.java:136)
>
> at
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpo
> intFactory.java:83)
>
> at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50)
>
> at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean
> .java:82)
>
> at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:320)
>
> at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:238)
>