13 Replies Latest reply on May 10, 2011 5:14 AM by llwang0455

    https conduit for servicemix CXF BC producer

    ramsay

      Hi,

       

      How can I configure SSL client certificates in the servicemix CXF BC producer xbean.xml itself?

       

      Thanks,

      Ram

        • 1. Re: https conduit for servicemix CXF BC producer
          ffang
          • 2. Re: https conduit for servicemix CXF BC producer
            ramsay

            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

              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

                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

                  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

                    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

                      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

                        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

                          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

                            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

                              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

                                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

                                  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 !!!