Please help ...
I am also getting the same error " Could not find conduit initiator for transport http://schemas.xmlsoap.org/soap/http"
so i have added follwing import in cfxse but still I am getting the same error
I have noticed that while compiling the code I get
Caused by: java.lang.NoSuchFieldError: activationNamespaces
... 47 more
It looks like you have more than one version of CXF in your classpath.
Can you double check it?
BTW, I don't think your cxf-se need to use the these kind of configuration, as SE don't need the http transport implementation.
It confused me a little but because cxf se endpoint doesn't need http transport, so you needn't import such files.
Could you elaborate your working flow, how you use the cxf se endpoint? Did you expose a webservice through http-jetty endpoint directly in cxf se SEI? If so, that's not the correct way to use cxf se, you should use cxf bc to handle the external protocol stuff.
Do you use JBI packaging or OSGi packaing?
About the java.lang.NoSuchFieldError: activationNamespaces, generally it means cxf version mismatch, could you check if your dependency have more cxf version, you can use "mvn dependency:tree" to check it. Also you need ensure the cxf version used in your pom is same as it in the OSGi container.
Thanks for the response.
What I am trying to do is :
I have a cfxbc-> cfxse ->Business logic
in business logic .
I have two methods one of them call third party webservice.
To call third party webservice I have created the stub using cfx-code-gen plugin. so when I am calling this method i am getting the error.
Kindly let me know if i am doing some thing wrong.
After removing the below lines i do not get the
" Caused by: java.lang.NoSuchFieldError: activationNamespaces
at org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.finalizeConfig(JettyHTTPTransportFactory.java:62)" error any more
but when i try to invoke the webservice i get :
Could not find conduit initiator for transport http://schemas.xmlsoap.org/soap/http
we are following config in cfxse:
And then we used the cfxbc (<cxfbc:consumer) component.
You shouldn't call external webservice directly from cxf se endpoint, this cause the error.
You need use cxfbc:provider to do so.
The correct working flow should be
>cxf se->cxf se proxy--->cxf bc provider.
Btw, it is cxf but not cfx.
Thanks for the response.
Could you please let me know if there is any example on this.
Internal webservice and external webservice
Take a look at CxfBcProviderTest, which demostrate how to use cxfse:proxy to call a cxf bc provider.
Thanks for the respose.
Please help me how i can achive this:
1.I have my own wsdl with some operations for which i have below flow
CXFBC:Consume -> CXFSE
2. Now i want to add one more operation in my WSDL which will call third party Webservice.
For that if I am using CXFBC:provider then how i can represent my internal + external together.
So If UI team want to access they get only one wsdl..
The answer is it depends...
Normally you can't do it, as cxfbc:consumer target service/endpoint name is specified, so the target service/endpoint should be a certain endpoint so it can't be a cxf se and cxfbc:provider at the same time. So generally you need define two cxfbc:consumer endpoint, one for target cxfse, one for target cxfbc:provider.
However, there's a way can do it if your external client can set ws-addressing headers for sending soap request to the cxfbc:consumer, using this way, cxfbc consumer endpoint will retrieve the wsa:To headers and dynamically set the target JBI endpoint through it, so that you can dynamically determine which target jbi endpoint you want to dispatch per each request. It just need some work on your client side. You can get more details from, WS-Addressing part, also, here is a testcase to demonstrate how it works, the testExplicitMAPsAddressTo.
Hope this helps.
Thanks for the response.
I am trying to implement the first option. I am getting the wsdl returned but not able to call the operation. It fails with no end point . Please help
Steps i have followed are :
1. Generated the code using wsdl2java
2.created the cxfbc:provider as:
<wsdl:port name="BasicHttpBinding_IService" binding="tns:BasicHttpBinding_IService">
Thanks .I got the solution
Thanks a lot .
I got cxfbc consumer - cfxse end point (internal service )
cxfbc consumer - cfxbc provider (external webservice)
Could you please tell
How i can call the external service inside the internbal service
Edited by: chandraprabha on May 19, 2011 12:08 AM
First of all, it's CXF but not CFX
You can use cxfse:proxy to call cxfbc:provider from cxf se endpoint, take a look at, "Proxies" part.
Thanks a lot for info.
i have configure cxfse endpoint to use proxy as
now i am getting error :
Caused by: org.springframework.context.ApplicationContextException: Failed to load configuration META-INF/cxf/transport/jbi/cxf-transport-jbi.xml
and when i add context in cfxse i get context not found .