Weblogic下部署CXF WebService jar冲突问题

1、问题描述
Hi,

I am newbie for web service Need your help.

I am having well developed webservice project with apache cxf 2.2.3 and working fine on Weblogic server 10.3

But After migration from 10.3 to 10.3.4 Facing below problem.

While calling call back service of third party it is giving warning messages like

12 Apr, 2011 5:42:36 PM weblogic.wsee.jaxws.framework.policy.advertisementimpl.AdvertisementHelperImpl registerExtension
WARNING: Registering oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry extension failed; java.lang.NoSuchMethodException: oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry*.registerSerializersAndTypes()*12 Apr, 2011 5:42:36 PM weblogic.wsee.jaxws.spi.WLSServiceDelegate addWsdlDefinitionFeature
SEVERE: Failed to create WsdlDefinitionFeature for wsdl location: http://serverName:port/WSDLURL, error: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException, message: 2 counts of InaccessibleWSDLException.

I tried Below solutions

1. I added com.oracle.ws.orawsdl_1.3.0.0.jar file in web service application provided the required clssess to resolve the issue. Now getting below exceptions

But getting Exception related org.apache.cxf.wsdl.WSDLManager as it is referenced from my beans.xml import some xml file from cxf 2.2.3.jar and due to
above jar, the WSDL4J.jar is not getting deployed and throwing getElementType() menthod not found exception while creating bean class for Webservice.

2. Now I just rename this jar file so that I can expose WSDL, But getting below exception after calling call back servic

12 Apr, 2011 5:42:36 PM weblogic.wsee.jaxws.framework.policy.advertisementimpl.AdvertisementHelperImpl registerExtension
WARNING: Registering oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry extension failed; java.lang.NoSuchMethodException: oracle.j2ee.ws.wsdl.extensions.addressing.AddressingExtensionRegistry.registerSerializersAndTypes*(com.ibm.wsdl.extensions.PopulatedExtensionRegistry)*12 Apr, 2011 5:42:36 PM weblogic.wsee.jaxws.spi.WLSServiceDelegate addWsdlDefinitionFeature
SEVERE: Failed to create WsdlDefinitionFeature for wsdl location: http://serverName:port/WSDLURL, error: com.sun.xml.ws.wsdl.parser.InaccessibleWSDLException, message: 2 counts of InaccessibleWSDLException.

After investingation I found that in cxf 2.2.3.jar there are some classes which are also present in com.oracle.ws.orawsdl_1.3.0.0.jar.

now in this case deployer is able to find out the call but signature is getting mismatch, because com.ibm.wsdl.extensions.PopulatedExtensionRegistry is referred from cxf2.2.3.jar file.
I am having below jar files in my WEB-INT/lib, If you want to suugest me to remove jar files, please suggest.

abdera-core-0.4.0-incubating.jar
abdera-extensions-json-0.4.0-incubating.jar
abdera-extensions-main-0.4.0-incubating.jar
abdera-i18n-0.4.0-incubating.jar
abdera-parser-0.4.0-incubating.jar
ant-1.6.5.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-2.2.3.jar
axiom-api-1.2.7.jar
axiom-impl-1.2.7.jar
axis.jar
bcel.jar
bcprov-jdk15-1.43.jar
commons-beanutils.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-collections.jar
commons-digester.jar
commons-discovery.jar
commons-httpclient-3.1.jar
commons-httpclient.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
commons-logging.jar
commons-pool-1.3.jar
cxf-2.2.3.jar
cxf-manifest.jar
cxf-xjc-bug671-2.2.3.jar
FastInfoset-1.2.7.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-jaxws_2.1_spec-1.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jax-qname.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.12.jar
jaxb-xjc-2.1.12.jar
jaxen-1.1.jar
jaxrpc-api.jar
jdom.jar
jettison-1.1.jar
jmi.jar
jra-1.0-alpha-4.jar
js-1.7R1.jar
jsr311-api-1.0.jar
neethi-2.0.4.jar
oro-2.0.8.jar
saaj-api-1.3.jar
saaj-api.jar
saaj-impl-1.3.2.jar
sam.jar
serializer-2.7.1.jar
slf4j-api-1.5.8.jar
slf4j-jdk14-1.5.8.jar
SoapHandlerService.jar
Spring-beans-2.5.5.jar
spring-context-2.5.5.jar
spring-context-support-2.5.5.jar
spring-core-2.5.5.jar
spring-jms-2.5.5.jar
spring-tx-2.5.5.jar
spring-web-2.5.5.jar
velocity-1.5.jar
wsdl4j-1.6.2.jar
wsdl4j.jar
wss4j-1.5.8.jar
wstx-asl-3.2.8.jar
xalan-2.7.1.jar
xercesImpl.jar
xml-resolver-1.2.jar
xmlbeans-2.4.0.jar
XmlSchema-1.4.5.jar
xmlsec-1.4.3.jar

Thanks,


2、解决方法:
Oh jee

I think you can leave out all the geronimo classes, i.e.,

geronimo-activation_1.1_spec-1.0.2.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-jaxws_2.1_spec-1.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar

Also the jax related ones

jax-qname.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.12.jar
jaxb-xjc-2.1.12.jar
jaxen-1.1.jar
jaxrpc-api.jar

do not know what the function of these is

jdom.jar
jettison-1.1.jar
jmi.jar
jra-1.0-alpha-4.jar
js-1.7R1.jar
jsr311-api-1.0.jar

saaj is already present in Java runtime

saaj-api-1.3.jar
saaj-api.jar
saaj-impl-1.3.2.jar

There is also some other xml related stuff

xercesImpl.jar
xml-resolver-1.2.jar
xmlbeans-2.4.0.jar
XmlSchema-1.4.5.jar
xmlsec-1.4.3.jar

There are probably other jars as well, which are not relavent to your application (web service)

你可能感兴趣的:(webservice)