-
1. Re: SOAPFaultException: Could not find conduit initiator for transport
ffang Feb 19, 2011 8:10 PM (in response to nohaapav)How,
Could you provide more about your scenario.
I assume you use a customer bundle to connect a external webservice, your customer bundle play the role as a client side, is it correct?
If so, how you configure your client? Do you use spring file to configure your client?
If you use spring file, this exception could be caused by missing
Freeman
-
2. Re: SOAPFaultException: Could not find conduit initiator for transport
njiang Feb 20, 2011 5:08 AM (in response to ffang)You also need to include the CXF bus definition cxf.xml like this
<import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"></import> <import resource="classpath:META-INF/cxf/cxf-extension-http.xml"></import>
Willem
-
3. Re: SOAPFaultException: Could not find conduit initiator for transport
nohaapav Feb 20, 2011 8:38 AM (in response to nohaapav)Thanks for quick response guys :
So my scenario seems like : i have a listener bundle which contains spring file which listen on folder temp and when i put xml file in folder --> listener put the file in some topic. Than i have some adapter which takes this xml file from topic and call the ws.
listener spring file : project-events-listener.xml
adapter spring file : planview-services.xml
Both of that files as attachement.
Implementation of method loginCaller which call ws looks like :
public Map<String, Object> loginCaller(Object xmlType){
logger.debug("loginCaller started.");
Map<String, Object> infoStore = new ManagedMap<String, Object>();
try {
setLoginCert(loginService.login(datasource, userName, password));
logger.debug("loginCaller finished.");
logger.info(loginCert);
infoStore.put("loginCert", loginCert);
infoStore.put("Object",xmlType);
return infoStore;
} catch (javax.xml.ws.WebServiceException ex) {
logger.error("loginCaller: Unable to talk to web service.", ex);
infoStore.put("loginCert", "-1");
infoStore.put("Object",xmlType);
return infoStore;
}
}
On some places i have stars cause it's internal project and i'm not able to show whole code as well so sorry for that. The interesting thing is that it's working ok in work on my PC, but when i tried to run that on my personal workstation the excepion SOAPFault appears and i can't find where should be some differences.
Edited by: nohaapav on Feb 20, 2011 1:38 PM
-
planview-services.xml 2.6 KB
-
4. Re: SOAPFaultException: Could not find conduit initiator for transport
nohaapav Feb 20, 2011 2:27 PM (in response to nohaapav)Thanks guys.
After i've imported :
in my spring file ws works great But is interesting why i need this import from my home office and from work office it works without it .. i need to somehow check
Edit:
I finally find out where was the differences between work and home version : at work i'm always deploying bundles like feature and at home i was deploying one by one :):
<feature name="services-adapter-features" version="$">
so i don't need to import previous stuff cause i've already imported cxf here and also i forgot about /etc/org.apache.karaf.features.cfg file which i rewrite with the work version
Edited by: nohaapav on Feb 20, 2011 7:22 PM
-
5. Re: SOAPFaultException: Could not find conduit initiator for transport
njiang Feb 21, 2011 7:40 PM (in response to nohaapav)If you deploy you application with Feature, you application my always uses a same bus, as the bus can be get from thread local by default.
If you deploy the application bundle per bundle, I can't guarantee there is one thread to load the bundle, and your CXF application can use a different bus. By specify the imports of the spring files can make sure you get a right configured bus.
Willem
-
6. Re: SOAPFaultException: Could not find conduit initiator for transport
atlantix Mar 22, 2011 7:40 AM (in response to ffang)Hello,
I have the same issue, but I am not using any spring configuration file
Actually the WS part works fine (CXF/JAXWS in ServiceMix)
to create my client I did the following
I create a bundle activator and I added the few lines in the start method
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(Payments.class);
factory.setAddress("http://localhost:9090/Payments");
Payments payment=null;
//try catch..
payment = (Payments)factory.create();
//works fine payments is not NULL
//the same exception when i call my service
payment.transferFunds("ffff", "ttttt", 100);
any ideas ?
in my POM I only added these dependencies
</Import-Package>
: ??
I know those wil be translated in the META-INF descriptor but I have no clue which one I need if I am not following a sample or a tutorial
Thanks
-
7. Re: SOAPFaultException: Could not find conduit initiator for transport
ffang Mar 22, 2011 8:47 AM (in response to atlantix)Hi,
Your bundle Import-Package part should be more, at lease those should be there
javax.jws,
javax.xml.bind.annotation,
javax.wsdl,
javax.xml.namespace,
META-INF.cxf,
org.apache.cxf.bus,
org.apache.cxf.bus.spring,
org.apache.cxf.bus.resource,
org.apache.cxf.configuration.spring,
org.apache.cxf.resource,
org.apache.cxf.transport.http,
org.springframework.beans.factory.config,
org.apache.commons.logging
and generally you don't need use DynamicImport-Package
You can use osgi:headers your_customer_bundle_id to see the OSGi metadate.
Freeman
-
8. Re: SOAPFaultException: Could not find conduit initiator for transport
atlantix Mar 22, 2011 9:17 AM (in response to ffang)Thanks for the reply
that fixed the first issue
but any idea why I would get a HTTP 404 error ??
this happens when I run both my client and my service in the same ServiceMix instance
karaf@root> javax.xml.ws.WebServiceException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at $Proxy111.transferFunds(Unknown Source)
at demo.osgi.HelloWorldActivator.start(HelloWorldActivator.java:45)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.resumeBundles(PackageAdminImpl.java:297)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:546)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:239)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhos
t:9090/Payments
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2255)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInter
ceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
... 13 more
when I run my client in another instance of service mix (while my first instance stil run the service ) I get a different error
at this level
factory.create()
java.lang.NullPointerException
at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:559)
at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:87
)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java
:445)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:680)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.jav
a:508)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:245)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:117)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:124)
at demo.osgi.HelloWorldActivator.start(HelloWorldActivator.java:30)
I should say that the way I am doing this is not guided by any tutorial
I used wsdl2java to generate my interfaces and I just added them to my client bundle
Please advise,
Thanks
-
9. Re: SOAPFaultException: Could not find conduit initiator for transport
ffang Mar 22, 2011 9:30 AM (in response to atlantix)Hi,
You need first check if your webservice really start on
http://localhost:9090/Payments
You can use a browser to try to access
http://localhost:9090/Payments?wsdl
to see if you can successfully fetch the wsdl so that you can know if your webservice really start there.
Freeman
-
10. Re: SOAPFaultException: Could not find conduit initiator for transport
atlantix Mar 22, 2011 9:37 AM (in response to ffang)My web service is actually running (I used soapUI to check everytime)
I even tried accessing another webservice that is a cxf endpoint developed with camel/cxf
but i fell in the same issue.
if you think of anyother reason this can happen , otherwise I might upload the bundles with the source code to get a better visibility
Thanks
-
11. Re: SOAPFaultException: Could not find conduit initiator for transport
atlantix Mar 22, 2011 9:45 AM (in response to ffang)I also have noticed the following
i replaced localhost with 127.0.0.1
and then i had the following
Tue Mar 22 14:39:26 CET 2011]>Invoking remote web service ...
javax.xml.ws.soap.SOAPFaultException: No namespace on "HTML" element.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:146)
at $Proxy113.transferFunds(Unknown Source)
at demo.osgi.HelloWorldActivator.start(HelloWorldActivator.java:45)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)
at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:54)
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)
at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)
at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)
at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)
at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:170)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML" element.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:125)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInte
ceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
... 20 more
edited {this happened with the client and the service running in the same servicemix instance}
for the client running in the separate servicemix instance , I still have the NullpointerException with the factory.create()
-
12. Re: SOAPFaultException: Could not find conduit initiator for transport
ffang Mar 23, 2011 5:19 AM (in response to atlantix)Hi,
javax.xml.ws.soap.SOAPFaultException: No namespace on "HTML" element.
this means the server side not return a soap message, somehow it return a html page.
You can put some tool like tcpmon between your client and server to dump the onwire message, which generally can give you more concrete idea what happened there.
Freeman
-
13. Re: SOAPFaultException: Could not find conduit initiator for transport
kanmisc Apr 8, 2011 7:29 AM (in response to ffang)Hi
I too got stuck up with this issue and included in my spring imports as -
<!
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>><!
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>>Error i am getting is -
"Could not find conduit initiator for transport http://schemas.xmlsoap.org/soap/http"
The webservice is called from the java class simply as -
CreateReponse coachService = new CreateReponse();
coachService.setHandlerResolver(handlerResolver);
CreateReponsePort coachPort = coachService.getCreateReponsePort();
//endPoint.getOutInterceptors().add(new SAAJInInterceptor());
Response resp = new Response();
resp.setConsumerCode("4382241");
ListConsumerCreateResponse listRes = new ListConsumerCreateResponse();
listRes.getResponse().add(resp);
CreateReponseInput respInput = new CreateReponseInput();
respInput.setListConsumerCreateResponse(listRes);
CreateReponseOutput respOutput = coachPort.CreateReponse(respInput);
ListConsumerCreateResponse output = respOutput.getListConsumerCreateResponse();
List returnRes = new ArrayList();
returnRes = output.getResponse();
This class is injected thru spring config. Is there any other worksround to fix this issue.
Thanks in advance.
Edited by: kanmisc on Apr 8, 2011 11:27 AM
-
14. Re: SOAPFaultException: Could not find conduit initiator for transport
njiang Apr 11, 2011 8:58 PM (in response to kanmisc)It looks like a typical bus configure issue.
You need to make sure you inject a right bus into the client factory that you use.
From the below code , the bus is just take from thread local which is not safe to use from the ServiceMix, as there could be lots of CXF components which create their own bus to use and the bus may set as a thread local variable.
CreateReponsePort coachPort = coachService.getCreateReponsePort();
You may consider to use the bus which injected from the ApplicationContext, or you can use the <jaxws:client> to inject the service proxy that you are using.
Willem