[jboss-cvs] JBossAS SVN: r57889 - branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 27 05:25:45 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-10-27 05:25:43 -0400 (Fri, 27 Oct 2006)
New Revision: 57889

Modified:
   branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
Log:
Fix jaxrpc <service-ref>

Modified: branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java
===================================================================
--- branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java	2006-10-27 07:49:47 UTC (rev 57888)
+++ branches/JEE5_TCK/server/src/main/org/jboss/webservice/metadata/serviceref/ServiceRefMetaData.java	2006-10-27 09:25:43 UTC (rev 57889)
@@ -214,17 +214,22 @@
 
    public static boolean isValidDoctype(Element element)
    {
+      // Verify J2EE-1.4
+      String nsURI = element.getOwnerDocument().getDocumentElement().getNamespaceURI();
+      boolean isValid = "http://java.sun.com/xml/ns/j2ee".equals(nsURI);
+
+      // Verify JBoss-4.0
       DocumentType doctype = element.getOwnerDocument().getDoctype();
-      boolean isValid = false;
-      if (doctype != null)
+      if (isValid == false && doctype != null)
       {
          String publicId = doctype.getPublicId();
          isValid |= "-//JBoss//DTD JBOSS 4.0//EN".equals(publicId);
          isValid |= "-//JBoss//DTD Web Application 2.4//EN".equals(publicId);
          isValid |= "-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
       }
-      String toString = (doctype != null ? "[public=" + doctype.getPublicId() + ",system=" + doctype.getSystemId() + "]" : null);
-      log.debug("Skip <service-ref> for doctype: " + toString);
+      
+      String dtstr = (doctype != null ? "[public=" + doctype.getPublicId() + ",system=" + doctype.getSystemId() + "]" : null);
+      log.debug("Skip <service-ref> for: nsURI=" + nsURI + ",doctype=" + dtstr);
       return isValid;
    }
    




More information about the jboss-cvs-commits mailing list