So I think I managed to get my cxf third party client to FINALLY initialize without the ClassNotFoundException.. which seems to have been by renaming my cxf.xml and putting it into my cxfbx serviceunit (which means now I have duplicate cfx.xml configs laying around, but what can you do) along with the wsdl. This appears to have left me with the problem, so is there a way to configure ssl for servicemix to use for a cxf client? I can't see why it would matter since it's configured in the cxf.xml:
<component-task-result xmlns=" http://java.sun.com/xml/ns/jbi/management-message"> <component-name>servicemix-cxf-se</component-name> <component-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>SUCCESS</task-result> </task-result-details> </component-task-result-details> </component-task-result> <component-task-result> <component-name>servicemix-cxf-bc</component-name> <component-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>FAILED</task-result> <message-type>ERROR</message-type> <task-status-msg> <msg-loc-info> <loc-token/> <loc-message>Unable to parse result string</loc-message> </msg-loc-info> </task-status-msg> <exception-info> <nesting-level>1</nesting-level> <loc-token/> <loc-message>java.io.IOException: Protocol mismatch: engine's protocol is http, the url protocol is https</loc-message> <stack-trace><![CDATA[javax.jbi.management.DeploymentException : java.io.IOException: Protocol mismatch: engine's protocol is http, the url protocol is https at org.apache.servicemix.cxfbc.CxfBcConsumer.validate( CxfBcConsumer.java:288) at org.apache.servicemix.common.AbstractDeployer.validate ( AbstractDeployer.java:58) at org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate( BaseXBeanDeployer.java:55) at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy( AbstractXBeanDeployer.java :96) at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy( BaseServiceUnitManager.java:88) at org.apache.servicemix.common.BaseServiceUnitManager.deploy( BaseServiceUnitManager.java:69) at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly( DeploymentService.java:508) at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs( AutoDeploymentService.java:479) at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents (AutoDeploymentService.java:53 2) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary( AutoDeploymentService.java:314) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive( AutoDeploymentService.java:251) at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory ( AutoDeploymentService.java:647) at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800( AutoDeploymentService.java:60) at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run ( AutoDeploymentService.java:611) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.io.IOException: Protocol mismatch: engine's protocol is http, the url protocol is https at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine (JettyHTTPServerEn gineFactory.java:175) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.retrieveEngine ( JettyHTTPDestination.java:104) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig( JettyHTTPDestination.java:132) at org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination( JettyHTTPTransportFactory.java :103) at org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination (JettyHTTPTransportFactory.java:83 ) at org.apache.cxf.endpoint.ServerImpl.initDestination ( ServerImpl.java:90) at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:58) at org.apache.servicemix.cxfbc.CxfBcConsumer.validate( CxfBcConsumer.java:282) ... 15 more ]]></stack-trace> </exception-info> </task-result-details> </component-task-result-details> </component-task-result> </jbi-task-result> </jbi-task> at org.apache.servicemix.jbi.framework.ManagementSupport.failure ( ManagementSupport.java:125) at org.apache.servicemix.jbi.framework.ManagementSupport.failure( ManagementSupport.java:111) at org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly( DeploymentService.java:543) at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingSAs( AutoDeploymentService.java:479) at org.apache.servicemix.jbi.framework.AutoDeploymentService.checkPendingComponents( AutoDeploymentService.java:53 2) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateSharedLibrary (AutoDeploymentService.java:314) at org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive ( AutoDeploymentService.java:251) at org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory( AutoDeploymentService.java:647) at org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800 ( AutoDeploymentService.java:60) at org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run( AutoDeploymentService.java:611) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run (Timer.java:462) Here are my configuration files: <?xml version=" 1.0" encoding="UTF-8"?> <beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0" xmlns:not=" http://www.examplenotification.com/notification"> <cxfse:endpoint> <cxfse:pojo> <bean id="communicationBean" class=" proxy.communication.CommunicationServiceImpl "> <property name="not"> <cxfse:proxy service="not:Notification_Service" type="com.examplenotification.NotificationServiceSoap" /> </property> </bean> </cxfse:pojo> <cxfse:inInterceptors> <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/> </cxfse:inInterceptors> <cxfse:outInterceptors> <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/> </cxfse:outInterceptors> <cxfse:inFaultInterceptors> <bean class=" org.apache.cxf.interceptor.LoggingInInterceptor"/> </cxfse:inFaultInterceptors> <cxfse:outFaultInterceptors> <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor "/> </cxfse:outFaultInterceptors> </cxfse:endpoint> </beans> Then in my cxf.xml (which appears to be getting picked up) that seems to be where the problem is: <beans xmlns=" http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sec=" http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws=" http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <http:conduit name="{http://www.examplenotification.com/notification}Notification_ServiceSoap.http-conduit<http://www.examplenotification.com/notification%7DNotification_ServiceSoap.http-conduit> "> <http:client MaxRetransmits="1" AllowChunking="false"/> <http:tlsClientParameters secureSocketProtocol="SSL"> <sec:trustManagers> <sec:keyStore type="JKS" password="notuser" resource="notification.jks"/> </sec:trustManagers> <sec:keyManagers keyPassword=""> <sec:keyStore type="JKS" password="notpass" resource="notification.jks"/> </sec:keyManagers> <sec:cipherSuitesFilter> <sec:include>SSL_RSA_WITH_RC4_128_MD5</sec:include> <sec:include>SSL_RSA_WITH_RC4_128_SHA</sec:include> </sec:cipherSuitesFilter> </http:tlsClientParameters> </http:conduit> <jaxws:client name="{ http://www.examplenotification.com/notification}Notification_ServiceSoap<http://www.examplenotification.com/notification%7DNotification_ServiceSoap>" createdFromAPI="true"> <jaxws:conduitSelector> <bean class="org.apache.cxf.endpoint.DeferredConduitSelector"/> </jaxws:conduitSelector> </jaxws:client> </beans> <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0 " xmlns:communication="urn://notification.proxy.com"> <cxfbc:consumer wsdl="classpath:CommunicationService.wsdl" targetEndpoint="soap" targetService="communication:CommunicationService" targetInterface="communication:CommunicationServicePort"/> <cxfbc:consumer wsdl="classpath: notification.wsdl" targetEndpoint=" https://wsnet.examplenotification.com/webservices/messaging.asmx" targetService="not:Notification_Service" targetInterface="not:Notification_ServiceSoap" busCfg="cxf-not.xml"/> </beans> On 10/1/07, Freeman Fang <[EMAIL PROTECTED]> wrote: > > Hi Ryan, > > Your exception shows that inside servicemix the cxf-se can't load > cxf-http transport, this behavior is intended since inside servicemix > we should use cxf-jbi transport. > Your code can run successfully outside servicemix doesn't mean it can > run successfully inside servicemix, the configuration is not same.The > cxf-se shouldn't use any jetty jar IIRC. > > > Basicly, when we create client inside cxf-se, something should be like > JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean(); > cf.setServiceName(getService()); > cf.setServiceClass(type); > cf.setAddress("jbi://" + new > IdGenerator().generateSanitizedId());// to use cxf-jbi transport > cf.setBindingId ( > org.apache.cxf.binding.jbi.JBIConstants.NS_JBI_BINDING);// > to use cxf-jbi binding > return cf.create(); > > But We already support client proxy now in cxf-se, from which we set > all for you and you needn't worry the details. You can get more > details how the client-proxy is working form [1] [2] > [1]http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java > > [2] > http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/resources/org/apache/servicemix/cxfse/client-proxy.xml > > > Would you please try the client-proxy in cxf-se, I believe it's the > better way for you. > > Best Regards > > Freeman > > On 10/2/07, Ryan Moquin <[EMAIL PROTECTED] > wrote: > > sorry, I meant for a 3rd party webservice... my fingers have a mind of > their > > own. > > > > On 10/1/07, Ryan Moquin <[EMAIL PROTECTED] > wrote: > > > > > > I'm trying to figure out if I'm going about this the wrong way (which > I'm > > > sure I am)... I have a cxfse service that I'm using as an abstraction > to > > > several third party related services. To do this, I generated a CXF > > client > > > for a 3rd party service and attempt to invoke it from my service. The > > > problem is, I get this error: > > > > > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept > > > INFO: Interceptor has thrown exception, unwinding *now* > > > org.apache.cxf.interceptor.Fault: *No* *conduit* *initiator* *was* > *found* > > > * for* *the* > > > *namepsace* http://schemas.xmlsoap.org/soap/http. > > > at > > > > > org.apache.cxf.service.invoker.AbstractInvoker.invoke( > AbstractInvoker.java:85) > > > > > > at > > > org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke ( > JAXWSMethodInvoker.java:82) > > > > > > at > > > > > org.apache.cxf.service.invoker.AbstractInvoker.invoke( > AbstractInvoker.java:56) > > > > > > at > > > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run ( > > > ServiceInvokerInterceptor.java:56) > > > at > > > org.apache.cxf.workqueue.SynchronousExecutor.execute( > > > SynchronousExecutor.java:37) > > > at > > > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage ( > > > ServiceInvokerInterceptor.java:87) > > > at > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept( > > > PhaseInterceptorChain.java:206) > > > > > > Now, I know what the solution is to it, but the problem is.. I already > > > > have my client configured correctly. When I invoke my client (it's a > > maven > > > 2 project) outside of servicemix it's fine, but when I have my service > > > bundle it and try to use it, I get that error. I did notice that the > > cxfse > > > component is missing some of the jetty jars which I initially thought > > might > > > be the problem. I included them but I still have the error. Is there > a > > > better way if I have a cxf client I generated to use it inside of my > > > service? > > > > > >
