gpt4 book ai didi

Spring 命名空间处理程序 - http ://cxf. apache.org/transports/http/configuration

转载 作者:行者123 更新时间:2023-12-02 11:36:48 27 4
gpt4 key购买 nike

问题日志:

Configuration problem: Unable to locate Spring Namespace Handler for XML schema
namespace [http://cxf.apache.org/transports/http/configuration]
  1. 解决这个问题有什么线索吗?
  2. 谁能看出我错过了什么吗?

环境:

Spring 4.0 Apache CXF : 2.7.7 WildFly App server

bean.xml

<?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:jaxws="http://cxf.apache.org/jaxws"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schema/jaxws.xsd">

<http-conf:conduit name="*.http-conduit">
<http-conf:client ReceiveTimeout="120000" ConnectionTimeout="120000" />
</http-conf:conduit>

</beans>

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>com.test</groupId>
<artifactId>b2cApplication</artifactId>
<name>B2C Version</name>
<version>3.0-SNAPSHOT</version>
<packaging>war</packaging>

<url>http://jboss.org/richfaces</url>

<build>
<finalName>b2cApplication-3.0-SNAPSHOT</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>

<packagingExcludes>**/ojdbc14-10.2.0.3.0.jar,
**/asm*.jar,
**/cxf-2.4.0.jar,
**/cxf-manifest-2.4.0.jar,
**/ant-optional-1.5.1.jar,
**/activation-1.0.2.jar,
**/xalan-2.7.0.jar,
**/mail-1.3.jar,
**/xercesImpl-2.2.1.jar,
**/extranet-hotel-deduplicate-2.0.0.jar,
**/javassist-3.18.1-GA.jar,
**/cxf-api-2.7.7.jar,
**/cxf-rt-bindings-soap-2.7.7.jar,
**/cxf-rt-core-2.7.7.jar,
**/cxf-rt-databinding-jaxb-2.7.7.jar,
**/cxf-rt-frontend-simple-2.7.7.jar,
**/cxf-rt-transports-http-2.7.7,
**/cxf-rt-ws-addr-2.7.7.jar,
**/cxf-rt-ws-policy-2.7.7.jar,
**/cxf-rt-bindings-xml-2.7.7.jar,
**/cxf-rt-frontend-jaxws-2.7.7.jar,
**/cxf-rt-transports-http-2.7.7.jar,
**/neethi-3.0.0.jar,
**/servlet-api-2.5-6.1.5.jar,
**/velocity-1.3.jar,
**/mail-1.3.jar,
**/xerces-1.2.3.jar,
**/xercesImpl-2.9.1.jar,
**/ota-car-rentals-v2-2.0-SNAPSHOT.jar,
**/otasonata-FINAL.jar,
**/wagon*.jar,
**/doxia*.jar,
**/maven*.jar,
**/javaee-api-6.0.jar
</packagingExcludes>

</configuration>

<dependencies>

<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>


<!-- Apache Commons -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>

<!-- Apache POI -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10.1</version>
</dependency>

<!-- JoSQL -->
<dependency>
<groupId>JoSQL</groupId>
<artifactId>JoSQL</artifactId>
<version>1.9</version>
</dependency>

<dependency>
<groupId>gently</groupId>
<artifactId>gently</artifactId>
<version>1.5</version>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<version>2.7.7</version>

</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.7</version>

</dependency>

<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.3.2</version>

</dependency>

</dependencies>

</project>

最佳答案

添加此依赖项:

    <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>

如果你查看这个 JAR 的内部,你会看到一个文件 META-INF/spring.handlers:

http\://cxf.apache.org/transports/http/configuration=org.apache.cxf.transport.http.spring.NamespaceHandler

这表示“如果有人请求http://cxf.apache.org/transports/http/configuration,则委托(delegate)给Java类org.apache.cxf.transport。 http.spring.NamespaceHandler"

关于Spring 命名空间处理程序 - http ://cxf. apache.org/transports/http/configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28719036/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com