Hi,

First of all, cxfbc consumer play the role as a server so you should configure something like http:destination but not the http:conduit.

Moreover, as you use servicemix-cxf-bc in OSGi container, so you'd better use providedBus but not busCfg, take a look at similar discussion[1] which should be helpful for you.

[1]http://fusesource.com/forums/thread.jspa?messageID=10522&#10522

Freeman
On 2011-10-6, at 下午4:25, Radomir Kadlec wrote:

Hello,
I can not use busCfg in cxfbc:consumer.
When I set the busCfg attribute to xml configuration on classpath in the
same bundle, I become this exception (log see below):
*Unable to locate Spring NamespaceHandler for XML schema namespace*

I use *cxfbc:consumer* in *osgi-bundle* packaging on Servicemix
*4.4.1-fuse-00-08*.
The <Import-Package> contains many org.apache.cxf. imports and also
META-INF.cxf, META-INF.cxf.osgi.

*When I do not set the busCfg property, the configuration file will be
processed as any other configuration file without failures*.

I know the examples and I looked in forum on many topics too and found some topics with the same exception, but I can not still solve this problem.
Can you give me some advice?

Thanks,
Radomir


*The busCfg configurationfile:*

<?xml version="1.0" encoding="UTF-8"?>
<beans
   xmlns="http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:http="http://cxf.apache.org/transports/http/configuration";
   xmlns:sec="http://cxf.apache.org/configuration/security";
   xsi:schemaLocation="
               http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
               http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
               http://servicemix.apache.org/cxfbc/1.0
http://servicemix.apache.org/cxfbc/1.0/servicemix-cxf-bc.xsd
               ">

   <http:conduit
name="{http://www.aura.cz/xrg/isl/g/v_1.0.0.0}AGWebServiceSoap.http- conduit">
       <http:tlsClientParameters>
           <sec:trustManagers>
               <sec:keyStore type="JKS" password="jks"
file="/path/test.jks" />
           </sec:trustManagers>
           <sec:cipherSuitesFilter>
               <sec:include>.*_WITH_3DES_.*</sec:include>
               <sec:include>.*_WITH_DES_.*</sec:include>
               <sec:exclude>.*_WITH_NULL_.*</sec:exclude>
               <sec:exclude>.*_DH_anon_.*</sec:exclude>
           </sec:cipherSuitesFilter>
       </http:tlsClientParameters>
   </http:conduit>

</beans>


*The exception log:*

09:58:28,461 | TRACE | xtenderThread-67 | PluggableSchemaResolver | ? ? | 67 - org.springframework.beans -
3.0.5.RELEASE | Trying to resolve XML entity with public id [null] and
system id [http://cxf.apache.org/schemas/configuration/cxf-beans.xsd]
09:58:28,461 | TRACE | xtenderThread-67 | BeansDtdResolver | ? ? | 67 - org.springframework.beans -
3.0.5.RELEASE | Trying to resolve XML entity with public ID [null] and
system ID [http://cxf.apache.org/schemas/configuration/cxf-beans.xsd]
09:58:28,461 | DEBUG | xtenderThread-67 | HttpURLConnection |
?                                   ? |  -  -  |
sun.net.www.MessageHeader@1fa7ca87 pairs: {GET
/schemas/configuration/cxf-beans.xsd HTTP/1.1: null}{Cache-Control:
no-cache}{Pragma: no-cache}{User-Agent: Java/1.6.0_24}{Host:
cxf.apache.org}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */ *;
q=.2}{Connection: keep-alive}
09:58:28,653 | DEBUG | xtenderThread-67 | HttpURLConnection |
?                                   ? |  -  -  |
sun.net.www.MessageHeader@e2eec9 pairs: {null: HTTP/1.1 200 OK} {Date: Thu,
06 Oct 2011 07:58:28 GMT}{Server: Apache/2.3.15-dev (Unix)
mod_ssl/2.3.15-dev OpenSSL/1.0.0c}{Last-Modified: Tue, 05 Apr 2011 19:17:03 GMT}{ETag: "db9d93-f0b-4a030b89cc9c0"}{Accept-Ranges: bytes}{Content- Length:
3851}{Keep-Alive: timeout=5, max=96}{Connection: Keep-Alive}
09:58:28,665 | DEBUG | xtenderThread-67 | aultBeanDefinitionDocumentReader | ? ? | 67 - org.springframework.beans -
3.0.5.RELEASE | Loading bean definitions
09:58:28,665 | TRACE | xtenderThread-67 | BundleDelegatingClassLoader | ? ? | 75 - org.springframework.osgi.core -
1.2.1 | Looking for resources META-INF/spring.handlers
09:58:28,666 | DEBUG | xtenderThread-67 | DefaultNamespaceHandlerResolver | ? ? | 67 - org.springframework.beans -
3.0.5.RELEASE | Loaded NamespaceHandler mappings: {}
09:58:28,669 | TRACE | xtenderThread-67 | DebugUtils | ? ? | 75 - org.springframework.osgi.core -
1.2.1 | Could not find class [sun.reflect.GeneratedMethodAccessor33]
required by [cxf(cz.aura.isl.gateway.cxf)] scanning available bundles
09:58:28,666 | WARN | xtenderThread-67 | SpringBusFactory | ? ? | - - | Initial attempt to create
application context was unsuccessful.
org .springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://cxf.apache.org/transports/http/configuration]
Offending resource: class path resource
[META-INF/spring/http_conduit_config.xml]

       at
org .springframework .beans .factory .parsing.FailFastProblemReporter.error(FailFastProblemReporter.java: 68)[67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans.factory.parsing.ReaderContext.error(ReaderContext.java:80) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .BeanDefinitionParserDelegate .error(BeanDefinitionParserDelegate.java:284) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .BeanDefinitionParserDelegate .parseCustomElement(BeanDefinitionParserDelegate.java:1332) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .BeanDefinitionParserDelegate .parseCustomElement(BeanDefinitionParserDelegate.java:1325) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .DefaultBeanDefinitionDocumentReader .parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .DefaultBeanDefinitionDocumentReader .registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .XmlBeanDefinitionReader .registerBeanDefinitions(XmlBeanDefinitionReader.java:493) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .springframework .beans .factory .xml .XmlBeanDefinitionReader .doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) [67:org.springframework.beans:3.0.5.RELEASE]
       at
org .apache .cxf .bus .spring .ControlledValidationXmlBeanDefinitionReader .doLoadBeanDefinitions (ControlledValidationXmlBeanDefinitionReader.java:109) [125:org.apache.cxf.bundle:2.4.2.fuse-00-08]


--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Unable-to-use-busCfg-in-cxfbc-consumer-tp4875599p4875599.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to