日期:2014-05-19  浏览次数:20702 次

cxf集成spring 发布到jboss 出错求大师解决在Tomcat下没错
代码<?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:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

<!--订购退订-->
<bean id="VACServiceImpl" class="com.drutt.ws.vac.VACServiceImpl"/>

<jaxws:endpoint xmlns:tns="http://ws.drutt.com/vac" id="vacserviceimplporttype"
implementor="#VACServiceImpl"
wsdlLocation="/wsdl/vacServiceImplPort.wsdl"
serviceName="tns:VACServiceImplService"
endpointName="tns:VACServiceImplPort"
address="/vacServiceImplPort">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature" />
</jaxws:features>
</jaxws:endpoint>
<!-- <jaxws:endpoint xmlns:tns="http://ws.ericsson.com/vac" id="vacserviceimplporttype"
implementor="#VACServiceImpl" wsdlLocation="/wsdl/vacServiceImplPort.wsdl"
endpointName="tns:VACServiceImplPort" serviceName="tns:VACServiceImplService"
address="/VACServiceImplPort">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature" />
</jaxws:features>
</jaxws:endpoint>
-->


<!--查询订购关系-->

<bean id="PortalEngineImpl" class="com.unicom.vac.portalengine.PortalEngineImpl"/>

<jaxws:endpoint xmlns:tns="http://portalEngine.vac.unicom.com" id="portalEngineVAC"
implementor="#PortalEngineImpl" wsdlLocation="/wsdl/PortalEngine.wsdl"
endpointName="tns:PortalEngine" serviceName="tns:PortalEngineService"
address="/PortalEngine">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature" />
</jaxws:features>
</jaxws:endpoint>

</beans>





------解决方案--------------------
是不是少包了,还是包版本问题.
------解决方案--------------------
slf4j与jboss内部 的lib是有冲突的,请将war,jar,war包中的关于slf4j的包去除。
如果是maven工程,请使用
XML code

<exclusions>
    <exclusion>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
    </exclusion>
</exclusions>

------解决方案--------------------
jdk版本太低!换个高版本试试!呵呵……不行再来找我!在线回复!
------解决方案--------------------
如果是W.A.S 的话 

发布完成把项目模块设置PARENT_LAST

就是说项目加载时容器的jar包最后加载 避免jar包版本冲突

jboss的话 楼主找找相关配置