У меня есть веб-приложение с веб-содержимым. xml содержимое, как показано ниже
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>TransactionGateway</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/cxf-servlet.xml</param-value>
</context-param>
<!-- CXF servlet -->
<servlet>
<servlet-name>cxf</servlet-name>
<display-name>cxf</display-name>
<description>Apache CXF Endpoint</description>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>pages/AppTestPage.jsp</welcome-file>
</welcome-file-list>
</web-app>
У меня есть файл cxf-servlet. xml в каталоге WEB-INF, а также содержимое, как показано ниже
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<cxf:cxfEndpoint id="GatewayRequest"
address="/GatewayRequest"
serviceClass="com.optum.comet.tg.GatewayRequest"
endpointName="s:GatewayRequest"
serviceName="s:GatewayRequest"
xmlns:s="http://gateway.ut.uhg.com">
<cxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
</cxf:properties>
</cxf:cxfEndpoint>
<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
<camel:package>com.optum.comet.tg.camel</camel:package>
</camel:camelContext>
</beans>
Когда я развертываю веб-приложение в виде папки с именем xx.war, среда выполнения развертывается успешно, а конечная точка веб-службы cxf публикуется и отображается вместе с маршрутами верблюда. Но когда я архивирую среду выполнения и упаковываю ее как войну, точки cxfend больше не видны, и при доступе к списку служб CXF появляется сообщение:
Служба не найдена.
Я также вижу, что верблюда нет маршруты были начаты.
Нужна помощь в исправлении войны и начало верблюжьих маршрутов с нее.
sever Журналы, когда развернуто сжатое имя среды выполнения xx.war
15:20:12,225 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 83) Initializing Mojarra 2.3.5.SP2-redhat-00001 for context '/TransactionGateway'
2020-03-25 15:20:19,954 [read Pool -- 83] INFO SpringCamelContext - Apache Camel 3.0.1 (CamelContext: camel-1) is starting
2020-03-25 15:20:19,957 [read Pool -- 83] INFO DefaultManagementStrategy - JMX is disabled
2020-03-25 15:20:20,268 [read Pool -- 83] INFO SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2020-03-25 15:20:20,289 [read Pool -- 83] INFO SpringCamelContext - Total 0 routes, of which 0 are started
2020-03-25 15:20:20,305 [read Pool -- 83] INFO SpringCamelContext - Apache Camel 3.0.1 (CamelContext: camel-1) started in 0.345 seconds
2020-03-25 15:20:20,429 [read Pool -- 83] INFO stdout - =========== Loading Transantion Gateway [MTST1] ===========
2020-03-25 15:20:20,456 [read Pool -- 83] INFO stdout - ______ __ _ _____ __ ____ _
2020-03-25 15:20:20,459 [read Pool -- 83] INFO stdout - /_ __/ ____ ___ _ ___ ___ ___ _ ____ / /_ (_) ___ ___ / ___/ ___ _ / /_ ___ _ __ ___ _ __ __ / __/ ___ ____ _ __ (_) ____ ___ ___
2020-03-25 15:20:20,462 [read Pool -- 83] INFO stdout - / / / __// _ `/ / _ \ (_-</ _ `// __// __/ / / / _ \ / _ \ / (_ / / _ `// __// -_)| |/|/ // _ `/ / // / _\ \ / -_) / __/| |/ / / / / __// -_) (_-<
2020-03-25 15:20:20,462 [read Pool -- 83] INFO stdout - /_/ /_/ \_,_/ /_//_//___/\_,_/ \__/ \__/ /_/ \___//_//_/ \___/ \_,_/ \__/ \__/ |__,__/ \_,_/ \_, / /___/ \__/ /_/ |___/ /_/ \__/ \__/ /___/
2020-03-25 15:20:20,469 [read Pool -- 83] INFO stdout - /___/
2020-03-25 15:20:20,485 [read Pool -- 83] INFO stdout - RealPath variable for the application evaluated to [C:/DEVTOOLS/redhat/EAP720/standalone/tmp/vfs/temp/temp5222a01a9da29f08/content-25546683f882dc4e/WEB-INF/config/uhg_config]
2020-03-25 15:20:20,485 [read Pool -- 83] INFO stdout - Environment evaluated to [MTST1]
2020-03-25 15:20:22,010 [read Pool -- 83] INFO Configuration - Configuration's UHG_CONFIG_ROOT is 'C:/DEVTOOLS/redhat/EAP720/standalone/tmp/vfs/temp/temp5222a01a9da29f08/content-25546683f882dc4e/WEB-INF/config/uhg_config'
2020-03-25 15:20:22,081 [read Pool -- 83] INFO Configuration - Configuration's UHG_CONFIG_ROOT is 'C:\DEVTOOLS\redhat\EAP720\standalone\tmp\vfs\temp\temp5222a01a9da29f08\content-25546683f882dc4e\WEB-INF\config\uhg_config'
2020-03-25 15:20:22,146 [read Pool -- 83] INFO stdout - =========== Loaded system context root ===========
2020-03-25 15:20:22,150 [read Pool -- 83] INFO stdout - =========== Loaded log4j_MTST1.properties===========
15:20:22,168 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 83) WFLYUT0021: Registered web context: '/TransactionGateway' for server 'default-server'
15:20:22,170 INFO [org.wildfly.extension.camel] (ServerService Thread Pool -- 83) Add Camel endpoint: http://127.0.0.1:8080/TransactionGateway
15:20:22,247 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "TransactionGateway.war" (runtime-name : "TransactionGateway.war")
15:20:22,256 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "hawtio-wildfly-2.0.0.fuse-750020-redhat-00001.war" (runtime-name : "hawtio-wildfly-2.0.0.fuse-750020-redhat-00001.war")
15:20:22,487 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
15:20:22,505 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
15:20:22,508 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
15:20:22,511 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.2.0.GA (WildFly Core 6.0.11.Final-redhat-00001) started in 84745ms - Started 593 of 779 services (331 services are lazy, passive or on-demand)
Журналы сервера при развертывании папки с именем xx.war
2020-03-25 15:28:31,725 [read Pool -- 78] INFO servlet - No Spring WebApplicationInitializer types detected on classpath
15:28:31,897 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 78) Initializing Mojarra 2.3.5.SP2-redhat-00001 for context '/TransactionGateway'
2020-03-25 15:28:43,921 [read Pool -- 78] INFO SpringCamelContext - Apache Camel 3.0.1 (CamelContext: camel-1) is starting
2020-03-25 15:28:43,923 [read Pool -- 78] INFO DefaultManagementStrategy - JMX is disabled
2020-03-25 15:28:44,511 [read Pool -- 78] INFO SpringCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
**2020-03-25 15:28:44,639 [read Pool -- 78] INFO ReflectionServiceFactoryBean - Creating Service {http://gateway.ut.uhg.com}GatewayRequest from class com.optum.comet.tg.GatewayRequest
2020-03-25 15:28:45,546 [read Pool -- 78] INFO ServerImpl - Setting the server's publish address to be /GatewayRequest
2020-03-25 15:28:45,570 [read Pool -- 78] INFO PayLoadDataFormatFeature - Initialized CXF Server: org.apache.cxf.endpoint.ServerImpl@4c1f46b8 in Payload mode with allow streaming: true
2020-03-25 15:28:45,594 [read Pool -- 78] INFO SpringCamelContext - Route: route1 started and consuming from: cxf://bean:GatewayRequest
2020-03-25 15:28:45,602 [read Pool -- 78] INFO SpringCamelContext - Total 1 routes, of which 1 are started
2020-03-25 15:28:45,625 [read Pool -- 78] INFO SpringCamelContext - Apache Camel 3.0.1 (CamelContext: camel-1) started in 1.692 seconds**
2020-03-25 15:28:45,757 [read Pool -- 78] INFO stdout - =========== Loading Transantion Gateway [MTST1] ===========
2020-03-25 15:28:45,793 [read Pool -- 78] INFO stdout - ______ __ _ _____ __ ____ _
2020-03-25 15:28:45,797 [read Pool -- 78] INFO stdout - /_ __/ ____ ___ _ ___ ___ ___ _ ____ / /_ (_) ___ ___ / ___/ ___ _ / /_ ___ _ __ ___ _ __ __ / __/ ___ ____ _ __ (_) ____ ___ ___
2020-03-25 15:28:45,803 [read Pool -- 78] INFO stdout - / / / __// _ `/ / _ \ (_-</ _ `// __// __/ / / / _ \ / _ \ / (_ / / _ `// __// -_)| |/|/ // _ `/ / // / _\ \ / -_) / __/| |/ / / / / __// -_) (_-<
2020-03-25 15:28:45,804 [read Pool -- 78] INFO stdout - /_/ /_/ \_,_/ /_//_//___/\_,_/ \__/ \__/ /_/ \___//_//_/ \___/ \_,_/ \__/ \__/ |__,__/ \_,_/ \_, / /___/ \__/ /_/ |___/ /_/ \__/ \__/ /___/
2020-03-25 15:28:45,809 [read Pool -- 78] INFO stdout - /___/
2020-03-25 15:28:45,860 [read Pool -- 78] INFO stdout - RealPath variable for the application evaluated to [C:/DEVTOOLS/redhat/EAP720/standalone/deployments/TransactionGateway.war/WEB-INF/config/uhg_config]
2020-03-25 15:28:45,864 [read Pool -- 78] INFO stdout - Environment evaluated to [MTST1]
2020-03-25 15:28:47,832 [read Pool -- 78] INFO Configuration - Configuration's UHG_CONFIG_ROOT is 'C:/DEVTOOLS/redhat/EAP720/standalone/deployments/TransactionGateway.war/WEB-INF/config/uhg_config'
2020-03-25 15:28:47,915 [read Pool -- 78] INFO Configuration - Configuration's UHG_CONFIG_ROOT is 'C:\DEVTOOLS\redhat\EAP720\standalone\deployments\TransactionGateway.war\WEB-INF\config\uhg_config'
2020-03-25 15:28:47,986 [read Pool -- 78] INFO stdout - =========== Loaded system context root ===========
2020-03-25 15:28:47,996 [read Pool -- 78] INFO stdout - =========== Loaded log4j_MTST1.properties===========
15:28:48,014 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 78) WFLYUT0021: Registered web context: '/TransactionGateway' for server 'default-server'
15:28:48,018 INFO [org.wildfly.extension.camel] (ServerService Thread Pool -- 78) Add Camel endpoint: http://127.0.0.1:8080/TransactionGateway
15:28:48,121 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "TransactionGateway.war" (runtime-name : "TransactionGateway.war")
15:28:48,174 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "hawtio-wildfly-2.0.0.fuse-750020-redhat-00001.war" (runtime-name : "hawtio-wildfly-2.0.0.fuse-750020-redhat-00001.war")
15:28:48,676 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
15:28:48,709 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
15:28:48,715 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
15:28:48,727 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: JBoss EAP 7.2.0.GA (WildFly Core 6.0.11.Final-redhat-00001) started in 79799ms - Started 593 of 779 services (331 services are lazy, passive or on-demand)