I am using the Axiom and Xerces JAR files included with the Axis2-1.2 
distribution:

axiom-api-1.2.4.jar
axiom-dom-1.2.4.jar
axiom-impl-1.2.4.jar
xercesImpl-2.8.1.jar

I assume those are the right ones??  These are included in the deployed WAR 
file.  I went through the pain of my 1st Websphere installation a few weeks 
back so I knew to set the parent class loader to last.

Is there anything else I should check?  I've been flustered thus far.

- T


Martin Gainty <[EMAIL PROTECTED]> wrote:       For your websphere environment

check the  version of axiom jar 
(assume  axiom-api-1.1.1.jar)

 check the version of  Xerces
 (assume version 2.8.0  xercesImpl.jar)

in either case I would copy the 2 good jars to your  webspere deployment 
library folder

HTH
M--

    ----- Original Message ----- 
   From:    Jack    Sprat 
   To: axis-user@ws.apache.org 
   Sent: Monday, September 24, 2007 12:53    PM
   Subject: [Axis2] schema validation    exception
   

I am getting    an UnsupportedOperation Exception each time I try to validate 
an OMElement    against a schema.  I am using Axis2 1.2 with no data binding so 
my    service class receives an OMElement object.  The validation code is quite 
   simple:

        // Get XML stream reader    from OMElement received
           XMLStreamReader reader = doc.getXMLStreamReader();
           //Create the DOOM OMFactory
           OMFactory doomFactory =    DOOMAbstractFactory.getOMFactory();
           //Create the new builder
           StAXOMBuilder doomBuilder = new StAXOMBuilder(doomFactory,    
reader);
        //Get the document    element
        OMElement omElem =    doomBuilder.getDocumentElement();

           try {
               SchemaFactory factory =    
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
               Schema xsd =    factory.newSchema(schemaLocation);
               Validator validator =    xsd.newValidator();
               validator.validate(new DOMSource((Element)    omElem));
            return    true;
        }
           catch (Exception e) {
               return false;
           }

Below is a snippet of the stack trace:


java.lang.UnsupportedOperationException: TODO
     
 at
org.apache.axiom.om.impl.dom.DocumentImpl.getDoctype(DocumentImpl.java:225)
      at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.setupEntityMap(Unknown
Source)
      at
org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown
Source)
      at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown
Source)
      at javax.xml.validation.Validator.validate(Unknown Source)

Note that this works fine in Tomcat 5.5 but chokes in Websphere 6.1 so I 
suspect there is a class loading issue somewhere.  What could be the problem??

Thanks,
T


 

       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.

Reply via email to