Apache SOAP Frequently Asked Questions (FAQ)

Apache SOAP Frequently Asked Questions (FAQ)

[Consider this a first draft .. comments welcome]

Author: Steve Livingston

Installation

  • Can Apache Soap 2.2 be installed with WebLogic 6.1beta?

    The short answer is "yes", but you may have to resolve a namespace conflict because SOAP 2.2 now uses JAXP (instead of using Xerces directly).

    When using Xerces directly there is no problem (other than to have the correct version first in the classpath). When using JAXP there are two property values which tell JAXP which parser to use. WL changes these to their bundled Xerces parser (which is found in weblogic.apache.xerces -- at least in WL6.0). With the entries described below, you change them to the original Xerces. If WL6.1 has the bundled Xerces in org.apache.xerces you also have to have the original xerces.jar first in classpath, otherwise it should not matter. So the problem is that WL by default uses their bundled Xerces as JAXP parser.

    If you get Unable to resolve namespace, here's how to resolve the conflict:

    1. Put Xerces in front of WebLogic's classpath (in startWebLogic script):
      • set CLASSPATH=E:\apache\xerces-1_4_0\xerces.jar;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
        (Starting with WebLogic 6.1beta, you may have to proceed with Setp #2 below.)

    2. Configure WebLogic to use the same Xerces as Soap, using the WebLogic console:
      • mydomain/Services/XML => Configure a new XML Registry...
        Name = Xerces JAXP DocumentBuilderFactory = org.apache.xerces.jaxp.DocumentBuilderFactoryImpl SAXParserFactory = org.apache.xerces.jaxp.SAXParserFactoryImpl Transformer Factory = weblogic.apache.xalan.processor.TransformerFactoryImpl [default] When To Cache = "Cache-on-reference" [default]
      • mydomain/Servers/myserver => "Services" tab / "XML" tab
        Select "Xerces JAPX" from "XML Registry" pulldown

    3. Step 2 results in these changes to WebLogic's config.xml:
      • Note the new XMLRegistry-attribute in the Server-tag:
        <ServerListenPort="7001" Name="myserver" NativeIOEnabled="true" TransactionLogFilePrefix="config/mydomain/logs/" XMLRegistry="Xerces JAXP"> ... </Server>
      • An XMLRegistry-tag is created:
        <XMLRegistry DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" Name="Xerces JAXP" SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl" TransformerFactory="weblogic.apache.xalan.processor.TransformerFactoryImpl" WhenToCache="cache-on-reference"/>