You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Pepo, Gloria y duna en ETB" <an...@etb.net.co> on 2005/03/01 20:55:37 UTC

XmlObject.validate() gets stucked..

Hello!

I´m building an XKMS Interface for a CA.

I've compiled the XKMS SCHEMA http://www.w3.org/TR/xkms2/Schemas/xkms.xsd.

the code to read an instance is:

  
   XmlObject xobj = XmlObject.Factory.parse(request,validateOptions);
   if (xobj instanceof ValidateRequestDocument) 
   {
        xmlBeansDocument = (ValidateRequestDocument) xobj;
        validateOptions = new XmlOptions();
        errorList = new ArrayList();
        validateOptions.setErrorListener(errorList); 
        if (!xmlBeansDocument.validate(validateOptions)){  // 
             System.out.println("Not a valid validateRequest document. XMLBeans said");
             for (int j = 0; j < errorList.size(); j++) {
                  XmlError error = (XmlError) errorList.get(j);
                  System.err.println("[" + (j+1) + "] Message: " + error.getMessage() + "\n");
                  System.err.println("[" + (j+1) + "]Location of invalid XML: " + error.getCursorLocation().xmlText() + "\n");
             }
         throw new XKMSInvalidRequestFormatException(request, "Not a valid validateRequest document");
        } 
   } else {
    System.out.println("Not a validateRequest document");
    throw new XKMSInvalidRequestFormatException(request, "Not a validateRequest document");
   }


The code works but...

For some instances, to program wil get stuck in xmlBeansDocument.validate().

No error messages, just stuck!

The instances Im using are from http://www.w3.org/2001/XKMS/Drafts/test-suite/

The cones that get stuck are:

http://www.w3.org/2001/XKMS/Drafts/test-suite/xkiss/synchronous/validate-request-synchronous-1.xml
....
http://www.w3.org/2001/XKMS/Drafts/test-suite/xkiss/synchronous/validate-result-synchronous-5.xml
 
.

Can anybody help me?

Is there a configuration parameter i´m missing?

thanks

Pepo Garcia