-
1. Re: https conduit for servicemix CXF BC producer
ffang Nov 7, 2010 8:41 AM (in response to ramsay)Hi,
Take a look at CxfBcProviderHttpsTest, I believe it's exactly what you're looking for.
https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/ws/security/CxfBcProviderHttpsTest.java
Freeman
-
2. Re: https conduit for servicemix CXF BC producer
ramsay Nov 8, 2010 8:55 AM (in response to ffang)Thanks,
but I get the below error, why we need the cxf.xml in meta-inf, please see my configuration also, let me know if I am wrong any item.
-
xbean.xml----
<cxfbc:provider wsdl="classpath:wsdl/client.wsdl"
locationURI="https://clienturl"
service="abc:ClientWS"
endpoint="ClientWSPort"
interfaceName="abc:ClientWSPort"
useJBIWrapper="false"
busCfg="SecurityClient.xml"
useSOAPEnvelope = "true">
</cxfbc:provider>
-
SecurityClient.xml----
<http:conduit name="ClientWSPort.http-conduit">
<http:tlsClientParameters disableCNCheck="true">
<sec:trustManagers>
<sec:keyStore type="JKS" password="password" file="C:/conduit/client.jks"/>
</sec:trustManagers>
<sec:cipherSuitesFilter>
<sec:include>.EXPORT.</sec:include>
<sec:include>.EXPORT1024.</sec:include>
<sec:include>.WITHDES_.</sec:include>
<sec:include>.WITHNULL_.</sec:include>
<sec:exclude>.DHanon_.</sec:exclude>
</sec:cipherSuitesFilter>
</http:tlsClientParameters>
</http:conduit>
</beans>
-
Error----
Caused by: java.io.FileNotFoundException: class path resource cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:141)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
... 55 more
19:11:57,041 | INFO | xtenderThread-24 | BusApplicationContext | pport.AbstractApplicationContext 456 | 60 - org.springframework.context
- 3.0.3.RELEASE | Refreshing org.apache.cxf.bus.spring.BusApplicationContext@178d67e: startup date ; root of conte
xt hierarchy
19:11:57,041 | WARN | xtenderThread-24 | BusApplicationContext | ache.cxf.common.logging.LogUtils 365 | - - | Failed to load configura
tion SecurityClient.xml
19:11:57,041 | WARN | xtenderThread-24 | SpringBusFactory | ache.cxf.common.logging.LogUtils 365 | - - | Failed to create applica
tion context.
org.springframework.context.ApplicationContextException: Failed to load configuration SecurityClient.xml
at org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusApplicationContext.java:152)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:120)
at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:262)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130
)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[60:org.springfra
mework.context:3.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)[60:org.springframework.context:
3.0.3.RELEASE]
at org.apache.cxf.bus.spring.BusApplicationContext.(BusApplicationContext.java:91)
-
3. Re: https conduit for servicemix CXF BC producer
ffang Nov 8, 2010 7:23 PM (in response to ramsay)Hi,
I assume you're using FUSE ESB 4.x, so you should use providedBus but not busCfg.
I think the testcase I point to you using providedBus as well.
Freeman
-
4. Re: https conduit for servicemix CXF BC producer
ramsay Nov 9, 2010 6:46 AM (in response to ffang)Yes, I am using 4.3-00 version.
This is the xsd I am using,
http://servicemix.apache.org/cxfbc/1.0 http://servicemix.apache.org/schema/servicemix-cxf-bc-2009.01.xsd
But there is no attribute called providedBus in the cxfbc:provider
-
5. Re: https conduit for servicemix CXF BC producer
ffang Nov 9, 2010 7:56 AM (in response to ramsay)Hi,
You should use
http://servicemix.apache.org/cxfbc/1.0 http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd
instead, which use local latest xsd files shipped with the lib. the providedBus is new added attribute so the early released 2009.01 doesn't have it.
Also I suggest you should the latest released 4.3.0-fuse-02-00
Freeman
-
6. Re: https conduit for servicemix CXF BC producer
ramsay Nov 9, 2010 1:16 PM (in response to ffang)When use this xsd,
http://servicemix.apache.org/cxfbc/1.0 http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd
I am getting a validation error cxfbc:provider tage not found. Is there any complete working example which uses client ssl certs, I am developing this as OSGI bundle and will deploy it to FUSE ESB.
Thanks,
Ram
-
7. Re: https conduit for servicemix CXF BC producer
ramsay Nov 10, 2010 10:10 AM (in response to ramsay)I crossed over the mentioned error and landing up on this,
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schea namespace http://cxf.apache.org/transports/http/configuration
Offending resource: class path resource
-
SecurityClient.xml----
.EXPORT.</sec:include>
<sec:include>.EXPORT1024.</sec:include>
<sec:include>.WITHDES_.</sec:include>
<sec:include>.WITHNULL_.</sec:include>
<sec:exclude>.DHanon_.</sec:exclude>
</sec:cipherSuitesFilter>
</http:tlsClientParameters>
</http:conduit>
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl" />
</beans>
-
8. Re: https conduit for servicemix CXF BC producer
ffang Nov 10, 2010 7:57 PM (in response to ramsay)Hi,
What kind of packaging you are using? JBI or OSGi?
If you're using OSGi Packaging, this error means you miss some package import.
If you're using JBI Packaging, this error means you miss some dependencies from your pom.
Freeman
-
9. Re: https conduit for servicemix CXF BC producer
ramsay Nov 11, 2010 5:12 AM (in response to ffang)I am using OSGI and this is how my import package looks like, can you please point me what I am missing to resolve the above issue,
<Import-Package>
javax.jws,
javax.wsdl,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
javax.xml.ws,
org.apache.camel,
org.apache.camel.osgi,
org.apache.servicemix.camel,
org.apache.camel.component.file,
org.apache.servicemix.camel.nmr,
org.apache.servicemix.common.osgi,
org.apache.servicemix.http,
org.apache.servicemix.http.endpoints,
org.apache.servicemix.nmr.api,
org.springframework.beans.factory.config,
org.apache.ws.security,
javax.security.auth.callback,
org.apache.cxf.binding.soap.saaj,
org.apache.cxf.interceptor,
org.apache.cxf.ws.security.wss4j,
org.apache.servicemix.cxfbc,
org.apache.ws.security.action,
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,
org.apache.cxf.transport.http
</Import-Package>
-
10. Re: https conduit for servicemix CXF BC producer
ffang Nov 11, 2010 5:37 AM (in response to ramsay)Hi,
At lease you still need import org.apache.cxf.transport.http.spring package, the NamespaceHandler for http\://cxf.apache.org/transports/http/configuration is in this package.
Freeman
-
11. Re: https conduit for servicemix CXF BC producer
llwang0455 May 10, 2011 4:36 AM (in response to ffang)Hello,I was confused with the problem that configing jetty thread pool size by using busCfg(providedBus) attribute of cxfbc,but I don't know how to use providedBus ?
I want to use jbi package, in fact,I am not really clear how to write the xbean.xml file when using providedBus, and which dependencies I should add in the pom.xml file.
I use smx4.2.0,would you please give me a full example about this?
Thanks a lot!
-
12. Re: https conduit for servicemix CXF BC producer
ffang May 10, 2011 5:02 AM (in response to llwang0455)Hi,
Take a look at the links I mentioned early in this thread, I believe you'll figure it out yourself.
Btw, if you have a FUSE subscription, you can use that channel to ask for further help.
Freeman
-
13. Re: https conduit for servicemix CXF BC producer
llwang0455 May 10, 2011 5:14 AM (in response to ffang)thanks for your reply!
I have seen the code in your links,but the code was too much.
And I want to see the pom.xml as well ,could you give me a help?
I tried many times but it didn't worked !
The attach is my jbi folder,would you please have a look at it? Thanks !!!