|
Page Edited :
CXF20DOC :
AppServerGuide
AppServerGuide has been edited by Artur Karazniewicz (Jan 06, 2008). Change summary: More detailed oc4j guide Application Server Specific Configuration GuideThis document provides app server-specific configuration information for running Apache CXF.
JBossIf you package the war in the ear, you might need to add the jboss specific file (jboss-app.xml) in the $EAR/META-INF folder to config the classloader. <?xml version="1.0" encoding="UTF-8"?> <jboss-app> <loader-repository> apache.cxf:loader=spring_http.ear <loader-repository-config> java2ParentDelegation=false </loader-repository-config> </loader-repository> </jboss-app> If you are coming across LinkageErrors involving the QName class, try repackaging the stax-api jar without the javax.xml.namespace.QName class. (In JBoss 4.0.5GA at least) a conflicting version of this class is included in JBoss's lib and lib/endorsed directories. This was the only way I could get CXF working in my environment.
Pack war in an ear, deploy the ear with weblogic-application.xml
WebsphereCurrently, I've only found the endorsed way to make cxf work with websphere. (Note: this has been validated against Websphere6.1.0.0) put jar in the endorsed folder
And then restart the Websphere server. (Because we changed the endorsed folder, we need to restart it to make it effect).
OC4J
DisclaimerThis guide covers only 10.1.3.X.X version of OC4J. Not that OC4J 10.1.2 is not JSE 1.5 certified server. OC4J 11g is fully JEE 5.0 certified stack and comes with their own JAX-WS implementation. BackgroundOracle OC4J comes with highly customized XML stack by Oracle including SAX, StAX, JAXP, JAX-WS, SAAJ, WSDL4J and few others. All of those frameworks are Oralce proprietary implementations in OC4J distribution. This giver Oracle really good interoperability between their products (e.g. Database) and insures interoperability with all Oracle portfolio. However it makes rather hard to introduce something
Configuration overviewFew components need to be customized in OC4J towards CFX integration: Unfortunately all of those components have to be configured in different parts of OC4J. Oracle OC4J class loadingKey part toward successful CXF integration with OC4J is to understand how does class loaders work in OC4J. Basically when starting OC4J there are generally three stages where customization could occur:
Last step is quite easy to achieve Needed componentsBefore start please download Apache CXF 2.0.1 or better Preparing stax-apiRemove javax.xml.namespace.QName from stax-api shiped with CXF. Oracle apparently has it already in $ORACLE_HOME/j2ee/home/lib/jax-qname-namespace.jar. Swapping Oracle XML parser with XercesBasic ide how to do this is described in details [here|www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html] Create OC4J shared libary named cxf.foundation and put there:
Get rid of OC4J JAX-WS librariesOC4J has preliminary support for JAX-WS, unfortunately this means that during boot there are loaded outdated JAX-WS APIs and implementation by Oracle. Boot-time OC4J libraries are configured in boot.xml file in $ORACLE_HOME/j2ee/home/oc4j.jar bootstrap jar. To get rid of this:
<!-- WS jax-rpc --> <code-source path="${oracle.home}/webservices/lib/jaxr-api.jar"/> <code-source path="${oracle.home}/webservices/lib/jaxrpc-api.jar"/> <code-source path="${oracle.home}/webservices/lib/jaxb-api.jar"/> <code-source path="${oracle.home}/webservices/lib/saaj-api.jar"/> <code-source path="${oracle.home}/webservices/lib/jws-api.jar" if="java.specification.version == /1\.[5-6]/"/> and comment out line which include jws-api.jar <!-- <code-source path="${oracle.home}/webservices/lib/jws-api.jar" if="java.specification.version == /1\.[5-6]/"/> -->
swapping Oracle wsdl.jar with wsdl4j.jarAdd -Xbootclasspath/p:"<path to wsdlj>/wsdl4j-1.6.1.jar" option to JVM parametrs (either in command line running OC4J standalone or in OPMN). Deploying applicationsWhen deploying please follow those steps:
Oracle FAQI'm getting java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImplPlease be sure You properly installed and enabled for Your application cxf.foundation shared library as described here. If Yes please be sure that You didn't include xercesImpl.jar in Your war. If You still have problems please see how You can debu JAXP problems I cannot get WSDL (getting HTTP 500 accesing my CXF service WSDL with http://myshot/myservice?wsdl
|
Unsubscribe or edit your notifications preferences
