You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(30) |
Sep
|
Oct
(26) |
Nov
(4) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(41) |
Feb
(3) |
Mar
(2) |
Apr
(67) |
May
|
Jun
(21) |
Jul
(4) |
Aug
(28) |
Sep
(655) |
Oct
(50) |
Nov
(139) |
Dec
(89) |
| 2004 |
Jan
(33) |
Feb
(23) |
Mar
(20) |
Apr
|
May
(5) |
Jun
(16) |
Jul
(20) |
Aug
(9) |
Sep
(11) |
Oct
(17) |
Nov
(2) |
Dec
(2) |
| 2005 |
Jan
(10) |
Feb
|
Mar
(79) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(16) |
Nov
(1) |
Dec
|
| 2006 |
Jan
(14) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(16) |
Dec
|
| 2009 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Romuald S. <rom...@te...> - 2009-01-05 08:05:58
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Comic Sans MS">Hello, <br> I wanted to create a client in java and so I followed example found on WBEM service's website and other website, but I can't found the class WBEMClientFactory. It seems that this class is not use in the exemple downloadable with WBEM service.<br> Where can I find it?<br> Thank you<br> Romuald<br> </font> </body> </html> |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:37
|
Update of /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/java/wbem/javax/wbem/cim Modified Files: Tag: jws1-02-branch CIMClass.java CIMInstance.java CIMObject.java CIMObjectPath.java CIMProperty.java CIMQualifiedElement.java CloneUtil.java UnsignedInt64.java Log Message: Index: CloneUtil.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CloneUtil.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** CloneUtil.java 12 Jul 2004 04:19:04 -0000 1.3 --- CloneUtil.java 9 Nov 2006 19:43:58 -0000 1.3.2.1 *************** *** 22,26 **** * *Contributor(s): Brian Schlosser ! */ package javax.wbem.cim; --- 22,27 ---- * *Contributor(s): Brian Schlosser ! WBEM Solutions, Inc. ! */ package javax.wbem.cim; *************** *** 43,49 **** protected static Vector cloneQualifiers(Vector qualifiers) { Vector clone = new Vector(qualifiers.size()); ! for (Enumeration enum = qualifiers.elements(); ! enum.hasMoreElements();) { ! CIMQualifier qualifier = (CIMQualifier) enum.nextElement(); clone.add(qualifier.clone()); } --- 44,50 ---- protected static Vector cloneQualifiers(Vector qualifiers) { Vector clone = new Vector(qualifiers.size()); ! for (Enumeration quals = qualifiers.elements(); ! quals.hasMoreElements();) { ! CIMQualifier qualifier = (CIMQualifier) quals.nextElement(); clone.add(qualifier.clone()); } *************** *** 56,60 **** protected static Vector cloneProperties(Vector properties, boolean reset) { ! return cloneProperties(properties, true, true, reset); } --- 57,61 ---- protected static Vector cloneProperties(Vector properties, boolean reset) { ! return cloneProperties(properties, false, false, reset); } *************** *** 62,68 **** boolean includeQualifiers, boolean includeClassOrigin, boolean reset) { Vector clone = new Vector(properties.size()); ! for (Enumeration enum = properties.elements(); ! enum.hasMoreElements();) { ! CIMProperty property = (CIMProperty) enum.nextElement(); clone.add(property.clone(includeQualifiers, includeClassOrigin, reset)); } --- 63,70 ---- boolean includeQualifiers, boolean includeClassOrigin, boolean reset) { Vector clone = new Vector(properties.size()); ! for (Enumeration eProps = properties.elements(); ! eProps.hasMoreElements();) { ! ! CIMProperty property = (CIMProperty) eProps.nextElement(); clone.add(property.clone(includeQualifiers, includeClassOrigin, reset)); } *************** *** 73,79 **** boolean includeQualifiers) { Vector clone = new Vector(parameters.size()); ! for (Enumeration enum = parameters.elements(); ! enum.hasMoreElements();) { ! CIMParameter parameter = (CIMParameter) enum.nextElement(); clone.add(parameter.clone(includeQualifiers)); } --- 75,81 ---- boolean includeQualifiers) { Vector clone = new Vector(parameters.size()); ! for (Enumeration eParams = parameters.elements(); ! eParams.hasMoreElements();) { ! CIMParameter parameter = (CIMParameter) eParams.nextElement(); clone.add(parameter.clone(includeQualifiers)); } *************** *** 85,91 **** boolean includeClassOrigin) { Vector clone = new Vector(methods.size()); ! for (Enumeration enum = methods.elements(); ! enum.hasMoreElements();) { ! CIMMethod method = (CIMMethod) enum.nextElement(); clone.add(method.clone(includeQualifiers, includeClassOrigin)); } --- 87,93 ---- boolean includeClassOrigin) { Vector clone = new Vector(methods.size()); ! for (Enumeration eMethods = methods.elements(); ! eMethods.hasMoreElements();) { ! CIMMethod method = (CIMMethod) eMethods.nextElement(); clone.add(method.clone(includeQualifiers, includeClassOrigin)); } Index: CIMQualifiedElement.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMQualifiedElement.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** CIMQualifiedElement.java 12 Jul 2004 04:19:04 -0000 1.4 --- CIMQualifiedElement.java 9 Nov 2006 19:43:58 -0000 1.4.2.1 *************** *** 24,28 **** * *Contributor(s): Brian Schlosser ! */ package javax.wbem.cim; --- 24,29 ---- * *Contributor(s): Brian Schlosser ! * WBEM Solutions, Inc. ! */ package javax.wbem.cim; *************** *** 140,146 **** } ! for (Enumeration enum = qualifiers.elements(); ! enum.hasMoreElements();) { ! CIMQualifier qualifier = (CIMQualifier) enum.nextElement(); if (qualifier.getName().equalsIgnoreCase(name)) { return qualifier; --- 141,147 ---- } ! for (Enumeration enumQualifiers = qualifiers.elements(); ! enumQualifiers.hasMoreElements();) { ! CIMQualifier qualifier = (CIMQualifier) enumQualifiers.nextElement(); if (qualifier.getName().equalsIgnoreCase(name)) { return qualifier; Index: CIMProperty.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMProperty.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** CIMProperty.java 12 Jul 2004 04:19:04 -0000 1.11 --- CIMProperty.java 9 Nov 2006 19:43:58 -0000 1.11.2.1 *************** *** 256,261 **** super.setQualifiers(qualifiers); ! for (Enumeration enum = qualifiers.elements(); enum.hasMoreElements(); ) { ! CIMQualifier qualifier = (CIMQualifier) enum.nextElement(); if (qualifier.getName().equalsIgnoreCase("key")) { --- 256,261 ---- super.setQualifiers(qualifiers); ! for (Enumeration quals = qualifiers.elements(); quals.hasMoreElements(); ) { ! CIMQualifier qualifier = (CIMQualifier) quals.nextElement(); if (qualifier.getName().equalsIgnoreCase("key")) { Index: CIMClass.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMClass.java,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** CIMClass.java 15 Aug 2004 05:55:33 -0000 1.10 --- CIMClass.java 9 Nov 2006 19:43:57 -0000 1.10.2.1 *************** *** 248,254 **** return getMethod(name); } ! for (Enumeration enum = allmethods.elements(); ! enum.hasMoreElements(); ) { ! CIMMethod method = (CIMMethod) enum.nextElement(); if(method.getName().equalsIgnoreCase(name) && method.getOriginClass().equalsIgnoreCase(originClass)) { --- 248,255 ---- return getMethod(name); } ! for (Enumeration methods = allmethods.elements(); ! methods.hasMoreElements(); ) { ! ! CIMMethod method = (CIMMethod) methods.nextElement(); if(method.getName().equalsIgnoreCase(name) && method.getOriginClass().equalsIgnoreCase(originClass)) { *************** *** 416,422 **** } - if (qualifiers != null) { - ci.setQualifiers(CloneUtil.cloneQualifiers(qualifiers)); - } return ci; } --- 417,420 ---- *************** *** 442,448 **** if (properties != null) { Vector ov = new Vector(); ! for (Enumeration enum = properties.elements(); ! enum.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) enum.nextElement(); if (pe.getOriginClass().equalsIgnoreCase(name)) { ov.add(pe); --- 440,446 ---- if (properties != null) { Vector ov = new Vector(); ! for (Enumeration eProps = properties.elements(); ! eProps.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) eProps.nextElement(); if (pe.getOriginClass().equalsIgnoreCase(name)) { ov.add(pe); *************** *** 454,460 **** if (methods != null) { Vector ov = new Vector(); ! for (Enumeration enum = methods.elements(); ! enum.hasMoreElements();) { ! CIMMethod me = (CIMMethod) enum.nextElement(); if (me.getOriginClass().equalsIgnoreCase(name)) { ov.add(me); --- 452,458 ---- if (methods != null) { Vector ov = new Vector(); ! for (Enumeration eMethods = methods.elements(); ! eMethods.hasMoreElements();) { ! CIMMethod me = (CIMMethod) eMethods.nextElement(); if (me.getOriginClass().equalsIgnoreCase(name)) { ov.add(me); Index: CIMObjectPath.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMObjectPath.java,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** CIMObjectPath.java 30 Aug 2004 22:45:03 -0000 1.20 --- CIMObjectPath.java 9 Nov 2006 19:43:58 -0000 1.20.2.1 *************** *** 217,222 **** public void setKeys(Vector v) { keys = v; ! for (Enumeration enum = v.elements(); enum.hasMoreElements(); ) { ! CIMProperty key = (CIMProperty) enum.nextElement(); key.setKey(true); } --- 217,222 ---- public void setKeys(Vector v) { keys = v; ! for (Enumeration keys = v.elements(); keys.hasMoreElements(); ) { ! CIMProperty key = (CIMProperty) keys.nextElement(); key.setKey(true); } Index: CIMInstance.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMInstance.java,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** CIMInstance.java 12 Jul 2004 04:19:04 -0000 1.20 --- CIMInstance.java 9 Nov 2006 19:43:58 -0000 1.20.2.1 *************** *** 64,68 **** /** ! * Basic CIMInstance constructor. Initializes empty properties, qualifiers * and class name. * --- 64,68 ---- /** ! * Basic CIMInstance constructor. Initializes empty properties, * and class name. * *************** *** 76,81 **** /** * This method returns the CIMObjectPath that represents this CIMObject. - * If the key qualifiers are not available, a default CIMObjectPath is - * returned with only the object name set. * * @return the CIMObjectPath that represents this CIMObject --- 76,79 ---- *************** *** 212,231 **** } - private String toString(CIMValue cv) { - String s = "null"; - Object o = cv.getValue(); - if (o != null) { - if (o instanceof CIMInstance) { - // Will not allow instances as keys - throw new IllegalArgumentException(o.toString()); - } - s = o.toString(); - if (cv.getType().getType() == CIMDataType.STRING) { - s = '\"' + s + '\"'; - } - } - return s; - } - /** * @deprecated use getKeys() instead --- 210,213 ---- *************** *** 251,262 **** ci.className = className; - ci.qualifiers = qualifiers; ci.setObjectPath(getObjectPath()); if (allproperties != null) { Vector ov = new Vector(); ! for (Enumeration enum = allproperties.elements(); ! enum.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) enum.nextElement(); if (!pe.isPropagated()) { ov.add(pe); --- 233,243 ---- ci.className = className; ci.setObjectPath(getObjectPath()); if (allproperties != null) { Vector ov = new Vector(); ! for (Enumeration props = allproperties.elements(); ! props.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) props.nextElement(); if (!pe.isPropagated()) { ov.add(pe); *************** *** 297,308 **** ci.className = className; - ci.qualifiers = qualifiers; ci.setObjectPath(getObjectPath()); if (allproperties != null) { Vector ov = new Vector(); ! for (Enumeration enum = allproperties.elements(); ! enum.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) enum.nextElement(); if (classSet.contains(pe.getOriginClass().toLowerCase())) { ov.add(pe); --- 278,288 ---- ci.className = className; ci.setObjectPath(getObjectPath()); if (allproperties != null) { Vector ov = new Vector(); ! for (Enumeration eProps = allproperties.elements(); ! eProps.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) eProps.nextElement(); if (classSet.contains(pe.getOriginClass().toLowerCase())) { ov.add(pe); *************** *** 349,356 **** ci.setProperties(propList); - if (includeQualifier) { - ci.setQualifiers(CloneUtil.cloneQualifiers(qualifiers)); - } - return ci; } --- 329,332 ---- *************** *** 368,374 **** ci.alias = alias; ci.setObjectPath(getObjectPath()); - if(qualifiers != null) { - ci.qualifiers = CloneUtil.cloneQualifiers(qualifiers); - } if(allproperties != null) { --- 344,347 ---- Index: UnsignedInt64.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/UnsignedInt64.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** UnsignedInt64.java 12 Jul 2004 04:19:05 -0000 1.5 --- UnsignedInt64.java 9 Nov 2006 19:43:58 -0000 1.5.2.1 *************** *** 24,27 **** --- 24,28 ---- * *Contributor(s): Brian Schlosser + * WBEM Solutions, Inc. */ *************** *** 145,149 **** */ public int compareTo(Object val) { ! return ((BigInteger)value).compareTo(((UnsignedInt64)val).value); } } --- 146,151 ---- */ public int compareTo(Object val) { ! ! return ((BigInteger)value).compareTo((BigInteger)((UnsignedInt64)val).value); } } Index: CIMObject.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cim/Attic/CIMObject.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** CIMObject.java 15 Aug 2004 05:55:33 -0000 1.8 --- CIMObject.java 9 Nov 2006 19:43:58 -0000 1.8.2.1 *************** *** 105,111 **** } v = new Vector(); ! for (Enumeration enum = properties.elements(); ! enum.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) enum.nextElement(); if ((pe.isKey()) && (pe.getOverridingProperty() == null)) { v.add(pe.clone(false, true)); --- 105,111 ---- } v = new Vector(); ! for (Enumeration eProps = properties.elements(); ! eProps.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) eProps.nextElement(); if ((pe.isKey()) && (pe.getOverridingProperty() == null)) { v.add(pe.clone(false, true)); *************** *** 135,141 **** if(properties != null) { ! for (Enumeration enum = properties.elements(); ! enum.hasMoreElements();) { ! addProperty((CIMProperty) enum.nextElement()); } } --- 135,141 ---- if(properties != null) { ! for (Enumeration eProps = properties.elements(); ! eProps.hasMoreElements();) { ! addProperty((CIMProperty) eProps.nextElement()); } } *************** *** 184,189 **** */ public void updatePropertyValues(Vector properties) throws CIMException { ! for (Enumeration enum = properties.elements(); enum.hasMoreElements();) { ! CIMProperty property = (CIMProperty) enum.nextElement(); updatePropertyValue(property); } --- 184,189 ---- */ public void updatePropertyValues(Vector properties) throws CIMException { ! for (Enumeration eProps = properties.elements(); eProps.hasMoreElements();) { ! CIMProperty property = (CIMProperty) eProps.nextElement(); updatePropertyValue(property); } *************** *** 283,289 **** if (allproperties != null && allproperties.size() > 0) { propList = new Vector(); ! for (Enumeration enum = allproperties.elements(); ! enum.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) enum.nextElement(); propList.add(pe.clone(includeQualifier, includeClassOrigin)); --- 283,289 ---- if (allproperties != null && allproperties.size() > 0) { propList = new Vector(); ! for (Enumeration eProps = allproperties.elements(); ! eProps.hasMoreElements();) { ! CIMProperty pe = (CIMProperty) eProps.nextElement(); propList.add(pe.clone(includeQualifier, includeClassOrigin)); |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:36
|
Update of /cvsroot/wbemservices/open/java/wbem/javax/wbem/cimxml In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/java/wbem/javax/wbem/cimxml Modified Files: Tag: jws1-02-branch CIMXml.java CIMXmlImpl.java CIMXmlUtil.java Response.java XMLParser.java XmlInstance.java Added Files: Tag: jws1-02-branch NodeTreeWalker.java Log Message: Index: XMLParser.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cimxml/Attic/XMLParser.java,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -C2 -d -r1.25.2.1 -r1.25.2.2 *** XMLParser.java 29 Nov 2005 07:00:53 -0000 1.25.2.1 --- XMLParser.java 9 Nov 2006 19:43:58 -0000 1.25.2.2 *************** *** 55,63 **** import javax.xml.parsers.DocumentBuilder; - import org.apache.crimson.tree.TreeWalker; - import org.apache.crimson.tree.ElementNode2; - import org.xml.sax.InputSource; import org.w3c.dom.Node; import org.w3c.dom.NamedNodeMap; --- 55,61 ---- import javax.xml.parsers.DocumentBuilder; import org.xml.sax.InputSource; + import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NamedNodeMap; *************** *** 82,87 **** Vector m = new Vector(); ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { --- 80,85 ---- Vector m = new Vector(); ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { *************** *** 96,100 **** } } ! node = walker.getNextElement(null); } else if (nodename.equals(CIMXml.QUALIFIER)) { if (node.getParentNode().getNodeName().equals( --- 94,98 ---- } } ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.QUALIFIER)) { if (node.getParentNode().getNodeName().equals( *************** *** 146,151 **** String nodename; ! TreeWalker walker = new TreeWalker(node); ! node = walker.getCurrent(); if (node.getNodeName().equals(CIMXml.VALUE_NAMEDINSTANCE) || node.getNodeName().equals(CIMXml.VALUE_OBJECTWITHPATH)) { --- 144,149 ---- String nodename; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! node = walker.getCurrentNode(); if (node.getNodeName().equals(CIMXml.VALUE_NAMEDINSTANCE) || node.getNodeName().equals(CIMXml.VALUE_OBJECTWITHPATH)) { *************** *** 154,165 **** while (node != null && !node.getNodeName().equals(CIMXml.INSTANCE)) { ! node = walker.getNextElement(null); } ! for (node = walker.getCurrent(); node != null;) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.INSTANCE)) { ! ((ElementNode2)node).normalize(); ! ci.setClassName(((ElementNode2)node).getAttribute( CIMXml.CLASSNAME)); node = node.getFirstChild(); --- 152,163 ---- while (node != null && !node.getNodeName().equals(CIMXml.INSTANCE)) { ! node = walker.nextNode(); } ! for (node = walker.getCurrentNode(); node != null;) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.INSTANCE)) { ! ((Element)node).normalize(); ! ci.setClassName(((Element)node).getAttribute( CIMXml.CLASSNAME)); node = node.getFirstChild(); *************** *** 197,209 **** } } - if (q.size() > 0) { - ci.setQualifiers(q); - } if (p.size() > 0) { ci.setProperties(p); } if (path != null) { - // CIMObjectPath cop = (CIMObjectPath) path.clone(); - // cop.setKeys(keys); ci.setObjectPath(path); } --- 195,202 ---- *************** *** 215,221 **** Vector q = new Vector(); Vector p = new Vector(); ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNext()) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.METHOD)) { --- 208,214 ---- Vector q = new Vector(); Vector p = new Vector(); ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.METHOD)) { *************** *** 264,269 **** String nameSpace = ""; CIMObjectPath cop = new CIMObjectPath(); ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; /* node = walker.getNext() */) { --- 257,262 ---- String nameSpace = ""; CIMObjectPath cop = new CIMObjectPath(); ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; /* node = walker.getNext() */) { *************** *** 293,304 **** } else if (nodename.equals(CIMXml.NAMESPACE)) { //There may be multiple NAMESPACE tags so we build it up. ! nameSpace += "/" + ((ElementNode2)node).getAttribute(XmlInstance.NAME); cop.setNameSpace(nameSpace); node = node.getNextSibling(); } else if (nodename.equals(CIMXml.CLASSNAME)) { ! cop.setObjectName(((ElementNode2)node).getAttribute( XmlInstance.NAME)); } else if (nodename.equals(CIMXml.INSTANCENAME)) { ! className = ((ElementNode2)node).getAttribute( CIMXml.CLASSNAME); cop.setObjectName(className); --- 286,297 ---- } else if (nodename.equals(CIMXml.NAMESPACE)) { //There may be multiple NAMESPACE tags so we build it up. ! nameSpace += "/" + ((Element)node).getAttribute(XmlInstance.NAME); cop.setNameSpace(nameSpace); node = node.getNextSibling(); } else if (nodename.equals(CIMXml.CLASSNAME)) { ! cop.setObjectName(((Element)node).getAttribute( XmlInstance.NAME)); } else if (nodename.equals(CIMXml.INSTANCENAME)) { ! className = ((Element)node).getAttribute( CIMXml.CLASSNAME); cop.setObjectName(className); *************** *** 321,325 **** } ! node = walker.getNext(); } if (className.equals(XmlInstance.CNAME)) { --- 314,318 ---- } ! node = walker.nextNode(); } if (className.equals(XmlInstance.CNAME)) { *************** *** 332,340 **** CIMParameter cp = new CIMParameter(); Vector q = new Vector(); ! TreeWalker walker = new TreeWalker(node); String refclassname = null; ! for (node = walker.getCurrent(); node != null; ! node = walker.getNext()) { String nodename = node.getNodeName(); if (nodename.startsWith(CIMXml.PARAMETER)) { --- 325,333 ---- CIMParameter cp = new CIMParameter(); Vector q = new Vector(); ! NodeTreeWalker walker = new NodeTreeWalker(node); String refclassname = null; ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { String nodename = node.getNodeName(); if (nodename.startsWith(CIMXml.PARAMETER)) { *************** *** 370,378 **** } cp.setType(new CIMDataType( ! refclassname != null ? refclassname : "", ! refSize)); } } else if (nodename.equals(CIMXml.QUALIFIER)) { ! for (node = walker.getCurrent(); node != null; node = walker.getNextElement(nodename)) { --- 363,370 ---- } cp.setType(new CIMDataType( ! CIMDataType.REFERENCE_ARRAY, refSize)); } } else if (nodename.equals(CIMXml.QUALIFIER)) { ! for (node = walker.getCurrentNode(); node != null; node = walker.getNextElement(nodename)) { *************** *** 393,398 **** boolean isValueNode = false; Object obj = null; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null;) { String nodename = node.getNodeName(); if (nodename.startsWith(CIMXml.PROPERTY)) { --- 385,390 ---- boolean isValueNode = false; Object obj = null; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null;) { String nodename = node.getNodeName(); if (nodename.startsWith(CIMXml.PROPERTY)) { *************** *** 439,446 **** cp.setType(new CIMDataType(reference)); } ! node = walker.getNextElement(null); } else if (nodename.equals(CIMXml.QUALIFIER)) { try { ! String q = ((ElementNode2)node).getAttribute( XmlInstance.NAME); if (q.equals(XmlInstance.EMBEDDEDOBJECT)) { --- 431,438 ---- cp.setType(new CIMDataType(reference)); } ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.QUALIFIER)) { try { ! String q = ((Element)node).getAttribute( XmlInstance.NAME); if (q.equals(XmlInstance.EMBEDDEDOBJECT)) { *************** *** 454,461 **** } else if (nodename.equals(CIMXml.KEYBINDING)) { if (cp.getName().length() == 0) { ! cp.setName(((ElementNode2)node).getAttribute( XmlInstance.NAME)); } ! node = walker.getNextElement(null); } else if (nodename.equals(CIMXml.KEYVALUE)) { /* --- 446,453 ---- } else if (nodename.equals(CIMXml.KEYBINDING)) { if (cp.getName().length() == 0) { ! cp.setName(((Element)node).getAttribute( XmlInstance.NAME)); } ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.KEYVALUE)) { /* *************** *** 477,481 **** * need to look it up anyway. */ ! cimtype = ((ElementNode2)node).getAttribute( XmlInstance.TYPE); if (!cimtype.equals("")) { --- 469,473 ---- * need to look it up anyway. */ ! cimtype = ((Element)node).getAttribute( XmlInstance.TYPE); if (!cimtype.equals("")) { *************** *** 544,549 **** } ! TreeWalker walker = new TreeWalker(d); ! for (Node node = walker.getCurrent(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { --- 536,541 ---- } ! NodeTreeWalker walker = new NodeTreeWalker(d); ! for (Node node = walker.getCurrentNode(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { *************** *** 554,558 **** node = node.getNextSibling(); } else { ! node = walker.getNextElement(null); } } --- 546,550 ---- node = node.getNextSibling(); } else { ! node = walker.nextNode(); } } *************** *** 577,582 **** CIMQualifier cq = new CIMQualifier(); String type = null; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.QUALIFIER)) { --- 569,574 ---- CIMQualifier cq = new CIMQualifier(); String type = null; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.QUALIFIER)) { *************** *** 614,623 **** } } ! node = walker.getNextElement(null); } else if (nodename.startsWith(CIMXml.VALUE)) { cq.setValue(getCIMValue(node, type)); break; } else { ! node = walker.getNextElement(null); } } --- 606,615 ---- } } ! node = walker.nextNode(); } else if (nodename.startsWith(CIMXml.VALUE)) { cq.setValue(getCIMValue(node, type)); break; } else { ! node = walker.nextNode(); } } *************** *** 630,635 **** boolean isarray = false; int qSize = CIMDataType.SIZE_UNLIMITED; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.QUALIFIER_DECLARATION)) { --- 622,627 ---- boolean isarray = false; int qSize = CIMDataType.SIZE_UNLIMITED; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.QUALIFIER_DECLARATION)) { *************** *** 685,689 **** Debug.trace1("Got exception", e); } ! node = walker.getNextElement(null); } else if (nodename.startsWith(CIMXml.SCOPE)) { NamedNodeMap attrs = node.getAttributes(); --- 677,681 ---- Debug.trace1("Got exception", e); } ! node = walker.nextNode(); } else if (nodename.startsWith(CIMXml.SCOPE)) { NamedNodeMap attrs = node.getAttributes(); *************** *** 726,735 **** } } ! node = walker.getNextElement(null); } else if (nodename.startsWith(CIMXml.VALUE)) { cqt.setDefaultValue(getCIMValue(node, cimtype)); break; } else { ! node = walker.getNextElement(null); } } --- 718,727 ---- } } ! node = walker.nextNode(); } else if (nodename.startsWith(CIMXml.VALUE)) { cqt.setDefaultValue(getCIMValue(node, cimtype)); break; } else { ! node = walker.nextNode(); } } *************** *** 739,749 **** static CIMValue getCIMValue(Node node, String type) { Object o = null; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.KEYVALUE)) { o = valueObject(node, ! ((ElementNode2)node).getAttribute( XmlInstance.VALUETYPE)); break; --- 731,741 ---- static CIMValue getCIMValue(Node node, String type) { Object o = null; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null;) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.KEYVALUE)) { o = valueObject(node, ! ((Element)node).getAttribute( XmlInstance.VALUETYPE)); break; *************** *** 760,777 **** o = v; break; - } else if (nodename.equals(CIMXml.VALUE_REFARRAY)) { - Vector v = new Vector(); - for (node = walker.getNextElement(CIMXml.VALUE_REFERENCE); - node != null; ) { - v.addElement(getCIMObjectPath(getFirstChildElement(node))); - node = walker.getNextElement(CIMXml.VALUE_REFERENCE); - } - o = v; - break; } else if (nodename.equals(CIMXml.VALUE_REFERENCE)) { o = getCIMObjectPath(getFirstChildElement(node)); break; } else { ! node = walker.getNext(); } } --- 752,760 ---- o = v; break; } else if (nodename.equals(CIMXml.VALUE_REFERENCE)) { o = getCIMObjectPath(getFirstChildElement(node)); break; } else { ! node = walker.nextNode(); } } *************** *** 847,851 **** static boolean getBooleanValue(Node node) { ! TreeWalker walker = new TreeWalker(node); node = walker.getNextElement(CIMXml.VALUE); return getTextNode(node).equalsIgnoreCase(XmlInstance.TRUE); --- 830,834 ---- static boolean getBooleanValue(Node node) { ! NodeTreeWalker walker = new NodeTreeWalker(node); node = walker.getNextElement(CIMXml.VALUE); return getTextNode(node).equalsIgnoreCase(XmlInstance.TRUE); *************** *** 874,881 **** private static String getTextNode(Node node) { ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNext()) { if (node != null && (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE)) { --- 857,864 ---- private static String getTextNode(Node node) { ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { if (node != null && (node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE)) { Index: XmlInstance.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cimxml/Attic/XmlInstance.java,v retrieving revision 1.28.2.1 retrieving revision 1.28.2.2 diff -C2 -d -r1.28.2.1 -r1.28.2.2 *** XmlInstance.java 29 Nov 2005 07:00:53 -0000 1.28.2.1 --- XmlInstance.java 9 Nov 2006 19:43:58 -0000 1.28.2.2 *************** *** 27,30 **** --- 27,31 ---- package javax.wbem.cimxml; + import java.io.File; import java.io.IOException; import java.io.StringReader; *************** *** 50,55 **** import javax.wbem.cim.CIMScope; import javax.wbem.cim.CIMValue; ! import org.apache.crimson.tree.XmlDocument; import org.xml.sax.InputSource; import org.xml.sax.SAXException; --- 51,68 ---- import javax.wbem.cim.CIMScope; import javax.wbem.cim.CIMValue; + import javax.wbem.client.adapter.http.DtdResolver; + import javax.xml.parsers.DocumentBuilder; + import javax.xml.parsers.DocumentBuilderFactory; + import javax.xml.parsers.ParserConfigurationException; + import javax.xml.transform.OutputKeys; + import javax.xml.transform.Transformer; + import javax.xml.transform.TransformerConfigurationException; + import javax.xml.transform.TransformerException; + import javax.xml.transform.TransformerFactory; + import javax.xml.transform.dom.DOMSource; + import javax.xml.transform.stream.StreamResult; ! import org.w3c.dom.Document; ! import org.w3c.dom.DocumentType; import org.xml.sax.InputSource; import org.xml.sax.SAXException; *************** *** 99,104 **** --- 112,125 ---- final static String FALSE = "false"; final static String LOOPBACK_ADDRESS = "127.0.0.1"; + DtdResolver resolver = null; + private final static String SYSTEMID = + "http://www.dmtf.org/cim/mapping/xml/v2.0"; + private final static String PUBLICID = "-//DMTF//DTD CIM 2.0//EN"; private final static String NEWINDICATION = "NewIndication"; private boolean validate = false; + boolean sendDoctype = + (System.getProperty("setdoctype") != null + ? "true".equalsIgnoreCase(System.getProperty("setdoctype")) + : false); /** *************** *** 134,148 **** } ! XmlDocument pcdata2Xml(String pcdata) ! throws SAXException, IOException { ! String data = pcdata(pcdata); InputSource input = new InputSource(new StringReader(pcdata)); ! return XmlDocument.createXmlDocument(input, validate); } ! String xml2Pcdata(XmlDocument doc) throws IOException { ! StringWriter sw = new StringWriter(); ! doc.write(sw); ! return sw.toString(); } --- 155,201 ---- } ! Document pcdata2Xml(String pcdata) ! throws SAXException, IOException, ParserConfigurationException { ! InputSource input = new InputSource(new StringReader(pcdata)); ! DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); ! dbf.setNamespaceAware(true); ! dbf.setValidating(validate); ! if (resolver == null) { ! resolver = new DtdResolver(); ! resolver.registerCatalogEntry(PUBLICID, ! "javax/wbem/client/adapter/http/cim20.dtd", ! getClass().getClassLoader()); ! } ! DocumentBuilder builder = dbf.newDocumentBuilder(); ! builder.setEntityResolver(resolver); ! return builder.parse(input); } ! String xml2Pcdata(Document doc) throws IOException { ! // Use a Transformer for output ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer; ! try { ! transformer = tFactory.newTransformer(); ! DocumentType docType = doc.getDoctype(); ! if (docType != null) { ! String systemId =docType.getSystemId(); ! if (systemId != null) { ! String systemValue = (new File(systemId)).getName(); ! transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, systemValue); ! } ! } ! DOMSource source = new DOMSource(doc); ! StringWriter sw = new StringWriter(); ! StreamResult result = new StreamResult(sw); ! transformer.transform(source, result); ! return sw.toString(); ! } catch (TransformerConfigurationException e) { ! e.printStackTrace(); ! } catch (TransformerException e) { ! e.printStackTrace(); ! } ! return null; } *************** *** 381,387 **** */ protected String root(String body) { setAttr(CIMVERSION, CIMVERSIONSTRING); setAttr(DTDVERSION, DTDVERSIONSTRING); ! return stag(CIMXml.CIM) + body + etag(); } --- 434,444 ---- */ protected String root(String body) { + String xmlHeader = ""; + if (sendDoctype) { + xmlHeader = "<!DOCTYPE CIM PUBLIC '" + PUBLICID + "' '" + SYSTEMID + "'>\n"; + } setAttr(CIMVERSION, CIMVERSIONSTRING); setAttr(DTDVERSION, DTDVERSIONSTRING); ! return xmlHeader + stag(CIMXml.CIM) + body + etag(); } *************** *** 412,451 **** } - /** - * This is the original call to get the value of a CIMValue. - * The original call will return the String Value in XML or - * "" if the value is null. - * @param cv - * @return - */ protected String value(CIMValue cv) { ! return value(cv, true); ! } ! ! /** ! * This call will return the value of a CV. If returnEmpty is true ! * then if cv is null the return will be "", if returnEmpty is false the ! * call will return stag(CIMXml.VALUE) + etag(); ! * @param cv ! * @param b ! * @return ! */ ! protected String value(CIMValue cv, boolean pReturnEmpty) { ! if ((cv == null) || (cv.getValue() == null)) { ! if (pReturnEmpty) { ! return ""; ! } ! return stag(CIMXml.VALUE) + etag(); } if ((cv.getType() != null) && (cv.getType().isArrayType())) { if(CIMDataType.REFERENCE_ARRAY == cv.getType().getType()) { ! return valueRefArray(cv); ! } ! return valueArray(cv); ! } ! return stag(CIMXml.VALUE) + pcdata(cv) + etag(); } - private String value(Vector values) { CIMValue cv; --- 469,487 ---- } protected String value(CIMValue cv) { ! if ((cv == null) || (cv.getValue() == null)) { ! return ""; } if ((cv.getType() != null) && (cv.getType().isArrayType())) { if(CIMDataType.REFERENCE_ARRAY == cv.getType().getType()) { ! return valueRefArray(cv); ! } else { ! return valueArray(cv); ! } ! } else { ! return stag(CIMXml.VALUE) + pcdata(cv) + etag(); ! } } private String value(Vector values) { CIMValue cv; *************** *** 626,639 **** return sb.toString(); } - - /* - * - * <!ELEMENT VALUE.REFARRAY (VALUE.REFERENCE*)> - */ - /* TODO: Determine if needed - private String valueRefArray(CIMObjectPath cop) { - return stag(CIMXml.VALUE_REFARRAY) + valueReference(cop) + etag(); - } - */ /* --- 662,665 ---- *************** *** 1104,1109 **** String qualifier(CIMInstance ci) { ! return getIncludeQualifiers() ? ! qualifier(ci.getQualifiers()) : ""; } --- 1130,1134 ---- String qualifier(CIMInstance ci) { ! return ""; } *************** *** 1604,1608 **** return appendValue(p.getValue(), p.getType()); } ! private String appendValue(CIMValue cv, CIMDataType type) { if (cv == null || cv.getValue() == null) { --- 1629,1633 ---- return appendValue(p.getValue(), p.getType()); } ! private String appendValue(CIMValue cv, CIMDataType type) { if (cv == null || cv.getValue() == null) { *************** *** 1621,1625 **** return b.toString(); } - protected String paramValue(CIMArgument[] params) { --- 1646,1649 ---- Index: CIMXmlImpl.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cimxml/Attic/CIMXmlImpl.java,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** CIMXmlImpl.java 27 Sep 2004 04:16:03 -0000 1.30 --- CIMXmlImpl.java 9 Nov 2006 19:43:58 -0000 1.30.2.1 *************** *** 83,90 **** import javax.wbem.client.CIMSetPropertyOp; import javax.wbem.client.CIMSetQualifierTypeOp; ! import org.apache.crimson.tree.ElementNode; ! import org.apache.crimson.tree.TreeWalker; ! import org.apache.crimson.tree.XmlDocument; import org.w3c.dom.Node; import org.w3c.dom.NodeList; --- 83,90 ---- import javax.wbem.client.CIMSetPropertyOp; import javax.wbem.client.CIMSetQualifierTypeOp; + import javax.xml.parsers.ParserConfigurationException; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; *************** *** 129,133 **** } ! public XmlDocument getXmlRequest(CIMOperation op) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); --- 129,133 ---- } ! public Document getXmlRequest(CIMOperation op) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); *************** *** 138,142 **** } ! public XmlDocument getXmlRequest(CIMOperation[] ops) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); --- 138,142 ---- } ! public Document getXmlRequest(CIMOperation[] ops) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); *************** *** 151,155 **** } ! public XmlDocument getXmlRequest(CIMExport op) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); --- 151,155 ---- } ! public Document getXmlRequest(CIMExport op) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); *************** *** 160,164 **** } ! public XmlDocument getXmlRequest(CIMExport[] ops) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); --- 160,164 ---- } ! public Document getXmlRequest(CIMExport[] ops) throws CIMException, MalformedURLException { XmlInstance xm = new XmlInstance(); *************** *** 174,184 **** public CIMElement getCIMElement(String str) ! throws SAXException, IOException { XmlInstance xm = new XmlInstance(); ! XmlDocument xml = xm.pcdata2Xml(str); CIMElement ce = new CIMElement(); ! TreeWalker walker = new TreeWalker(xml); ! for (Node node = walker.getCurrent(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { --- 174,184 ---- public CIMElement getCIMElement(String str) ! throws SAXException, IOException, ParserConfigurationException { XmlInstance xm = new XmlInstance(); ! Document xml = xm.pcdata2Xml(str); CIMElement ce = new CIMElement(); ! NodeTreeWalker walker = new NodeTreeWalker(xml); ! for (Node node = walker.getCurrentNode(); node != null; ) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.CLASS)) { *************** *** 220,224 **** break; } else { ! node = walker.getNextElement(null); } } --- 220,224 ---- break; } else { ! node = walker.nextNode(); } } *************** *** 377,394 **** } ! public Vector getCIMResponse(XmlDocument response) throws IOException, CIMException { return Response.getCIMResponse(response); } ! public XmlDocument getXMLResponse(XmlResponse rsp, ! XmlDocument request, PasswordAuthentication auth) ! throws IOException, SAXException { return Response.getXMLResponse(rsp, request, auth); } public void getXMLResponse(XmlResponse rsp, ! XmlDocument request, PasswordAuthentication auth, DataOutputStream out) --- 377,394 ---- } ! public Vector getCIMResponse(Document response) throws IOException, CIMException { return Response.getCIMResponse(response); } ! public Document getXMLResponse(XmlResponse rsp, ! Document request, PasswordAuthentication auth) ! throws IOException, SAXException, ParserConfigurationException { return Response.getXMLResponse(rsp, request, auth); } public void getXMLResponse(XmlResponse rsp, ! Document request, PasswordAuthentication auth, DataOutputStream out) *************** *** 453,630 **** } ! public String createInstanceResult(CIMObjectPath ci, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.createInstanceResult(ci, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } public String getClassResult(CIMClass cc, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.getClassResult(cc, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String getInstanceResult(CIMInstance ci, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.getInstanceResult(ci, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } public String getPropertyResult(CIMValue cv, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.getPropertyResult(cv, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } public String getQualifierResult(CIMQualifierType qt, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.getQualifierResult(qt, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String enumerateClassesResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateClassesResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String enumerateClassNamesResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateClassNamesResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String enumerateInstancesResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateInstancesResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String enumerateInstanceNamesResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateInstanceNamesResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String enumerateQualifiersResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateQualifiersResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String associatorsResult(Enumeration enum, CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.associatorsResult(enum, ns, includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String associatorNamesResult(Enumeration enum, CIMNameSpace ns, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! return Response.associatorNamesResult(enum, ns, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } ! public String referencesResult(Enumeration enum, CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.referencesResult(enum, ns, includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String referenceNamesResult(Enumeration enum, CIMNameSpace ns, ! boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.referenceNamesResult(enum, ns, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } ! public String enumerateNamespaceResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.enumerateNamespaceResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } ! public String execQueryResult(Enumeration enum, ! boolean includeQualifiers, ! boolean includeClassOrigin, ! String [] propertyList, ! boolean showImplied) { ! return Response.execQueryResult(enum, ! includeQualifiers, ! includeClassOrigin, ! propertyList, ! showImplied); } --- 453,583 ---- } ! public String createInstanceResult(CIMObjectPath ci, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.createInstanceResult(ci, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } public String getClassResult(CIMClass cc, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.getClassResult(cc, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } ! public String getInstanceResult(CIMInstance ci, boolean includeQualifiers, ! boolean includeClassOrigin, String [] propertyList, ! boolean showImplied) { ! ! return Response.getInstanceResult(ci, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } public String getPropertyResult(CIMValue cv, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.getPropertyResult(cv, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } public String getQualifierResult(CIMQualifierType qt, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.getQualifierResult(qt, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } ! public String enumerateClassesResult(Enumeration enumClasses, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateClassesResult(enumClasses, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } ! public String enumerateClassNamesResult(Enumeration enumClassNames, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateClassNamesResult(enumClassNames, ! includeQualifiers, includeClassOrigin, propertyList, ! showImplied); } ! public String enumerateInstancesResult(Enumeration enumInstances, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateInstancesResult(enumInstances, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String enumerateInstanceNamesResult(Enumeration enumInstanceNames, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateInstanceNamesResult(enumInstanceNames, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String enumerateQualifiersResult(Enumeration enumQualifiers, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateQualifiersResult(enumQualifiers, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String associatorsResult(Enumeration enumAssoc, CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.associatorsResult(enumAssoc, ns, includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String associatorNamesResult(Enumeration enumAssocNames, ! CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! return Response.associatorNamesResult(enumAssocNames, ns, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String referencesResult(Enumeration enumRefs, CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.referencesResult(enumRefs, ns, includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String referenceNamesResult(Enumeration enumRefNames, ! CIMNameSpace ns, boolean includeQualifiers, boolean includeClassOrigin, String [] propertyList, boolean showImplied) { ! return Response.referenceNamesResult(enumRefNames, ns, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String enumerateNamespaceResult(Enumeration enumNamespace, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.enumerateNamespaceResult(enumNamespace, ! includeQualifiers, includeClassOrigin, propertyList, showImplied); } ! public String execQueryResult(Enumeration enumQuery, ! boolean includeQualifiers, boolean includeClassOrigin, ! String [] propertyList, boolean showImplied) { ! ! return Response.execQueryResult(enumQuery, includeQualifiers, ! includeClassOrigin, propertyList, showImplied); } *************** *** 638,651 **** private static void xmlAppendBooleanParamValue(StringBuffer xml, ! XmlInstance xm, ! String paramName, ! boolean value) { xml.append(xm.iParamValue(paramName, value)); } private static void xmlAppendStringsParamValue(StringBuffer xml, ! XmlInstance xm, ! String paramName, ! String[] value) { if (value != null) { xml.append(xm.iParamValue(paramName, value)); --- 591,601 ---- private static void xmlAppendBooleanParamValue(StringBuffer xml, ! XmlInstance xm, String paramName, boolean value) { ! xml.append(xm.iParamValue(paramName, value)); } private static void xmlAppendStringsParamValue(StringBuffer xml, ! XmlInstance xm, String paramName, String[] value) { if (value != null) { xml.append(xm.iParamValue(paramName, value)); *************** *** 654,659 **** private static StringBuffer xmlAppendObjectPath(CIMNameSpace currNs, ! CIMObjectPath name, ! XmlInstance xm) { StringBuffer xml = getXmlStringBuffer(currNs, name, xm); --- 604,608 ---- private static StringBuffer xmlAppendObjectPath(CIMNameSpace currNs, ! CIMObjectPath name, XmlInstance xm) { StringBuffer xml = getXmlStringBuffer(currNs, name, xm); *************** *** 663,668 **** private static StringBuffer getXmlStringBuffer(CIMNameSpace currNs, ! CIMObjectPath name, ! XmlInstance xm) { CIMObjectPath absPath = fixAbsObjectPath(currNs, name); --- 612,616 ---- private static StringBuffer getXmlStringBuffer(CIMNameSpace currNs, ! CIMObjectPath name, XmlInstance xm) { CIMObjectPath absPath = fixAbsObjectPath(currNs, name); *************** *** 670,674 **** } ! private XmlDocument xmlMsg2xmlDoc(XmlInstance xm, String xml) throws CIMException { StringBuffer newXml = new StringBuffer(xm.root( --- 618,622 ---- } ! private Document xmlMsg2xmlDoc(XmlInstance xm, String xml) throws CIMException { StringBuffer newXml = new StringBuffer(xm.root( *************** *** 680,683 **** --- 628,633 ---- } catch (SAXException e) { throw new CIMException(XmlInstance.XMLERROR, e); + } catch (ParserConfigurationException e) { + throw new CIMException(XmlInstance.XMLERROR, e); } } *************** *** 694,699 **** } ! private static String xmlRequest(String method, String xml, ! XmlInstance xm) { return xm.call(method, xml); } --- 644,649 ---- } ! private static String xmlRequest(String method, String xml, ! XmlInstance xm) { return xm.call(method, xml); } *************** *** 894,898 **** xm.setShowImplied(true); xml.append(xm.iParamValue(obj.getCIMQualifierType())); ! return xmlRequest("CreateQualifier", xml.toString(), xm); } } --- 844,848 ---- xm.setShowImplied(true); xml.append(xm.iParamValue(obj.getCIMQualifierType())); ! return xmlRequest("SetQualifier", xml.toString(), xm); } } *************** *** 1229,1242 **** } ! public Map getXmlRequestHeaders(XmlDocument msg) throws CIMException { HashMap headers = new HashMap(); ! TreeWalker walker = new TreeWalker(msg); Node node; String nodename = null; ! for (node = walker.getCurrent(); node != null; ! node = walker.getNextElement(null)) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.CIM)) { --- 1179,1192 ---- } ! public Map getXmlRequestHeaders(Document msg) throws CIMException { HashMap headers = new HashMap(); ! NodeTreeWalker walker = new NodeTreeWalker(msg); Node node; String nodename = null; ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.CIM)) { *************** *** 1244,1248 **** } else if (nodename.equals(CIMXml.MESSAGE)) { headers.put("CIMProtocolVersion", ! ((ElementNode)node).getAttribute( XmlInstance.PROTOCOLVERSION)); } else if (nodename.equals(CIMXml.MULTIREQ)) { --- 1194,1198 ---- } else if (nodename.equals(CIMXml.MESSAGE)) { headers.put("CIMProtocolVersion", ! ((Element)node).getAttribute( XmlInstance.PROTOCOLVERSION)); } else if (nodename.equals(CIMXml.MULTIREQ)) { *************** *** 1256,1260 **** headers.put(CIMOPERATION, METHODCALL); headers.put(CIMMETHOD, ! ((ElementNode)node).getAttribute(XmlInstance.NAME)); } else if (nodename.equals(CIMXml.MULTIEXPREQ)) { // multiple export request --- 1206,1210 ---- headers.put(CIMOPERATION, METHODCALL); headers.put(CIMMETHOD, ! ((Element)node).getAttribute(XmlInstance.NAME)); } else if (nodename.equals(CIMXml.MULTIEXPREQ)) { // multiple export request *************** *** 1266,1270 **** headers.put(CIMEXPORT, METHODREQUEST); headers.put(CIMEXPORTMETHOD, ! ((ElementNode)node).getAttribute(XmlInstance.NAME)); break; } else if (nodename.startsWith("LOCAL")) { --- 1216,1220 ---- headers.put(CIMEXPORT, METHODREQUEST); headers.put(CIMEXPORTMETHOD, ! ((Element)node).getAttribute(XmlInstance.NAME)); break; } else if (nodename.startsWith("LOCAL")) { *************** *** 1282,1289 **** boolean isFirstKey = true; boolean isSingleton = false; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNextElement(null)) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.NAMESPACEPATH)|| --- 1232,1239 ---- boolean isFirstKey = true; boolean isSingleton = false; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.NAMESPACEPATH)|| *************** *** 1296,1314 **** } else if (nodename.equals(CIMXml.NAMESPACE)) { op = (op.length() > 0 ? op + "/" : op); ! op += ((ElementNode)node).getAttribute(XmlInstance.NAME); } else if (nodename.equals(CIMXml.CLASSNAME)) { ! op += ":" + ((ElementNode)node).getAttribute(XmlInstance.NAME); } else if (nodename.equals(CIMXml.INSTANCENAME)) { ! op += ":" + ((ElementNode)node).getAttribute(CIMXml.CLASSNAME); } else if (nodename.equals(CIMXml.KEYBINDING)) { isSingleton = false; op += (isFirstKey ? "." : ","); isFirstKey = false; ! op += ((ElementNode)node).getAttribute(XmlInstance.NAME); p = getCIMProperty(node); } else if (nodename.equals(CIMXml.KEYVALUE)) { isSingleton = false; op += "="; ! String type = ((ElementNode)node).getAttribute( XmlInstance.VALUETYPE); String value = p.getValue().getValue().toString(); --- 1246,1264 ---- } else if (nodename.equals(CIMXml.NAMESPACE)) { op = (op.length() > 0 ? op + "/" : op); ! op += ((Element)node).getAttribute(XmlInstance.NAME); } else if (nodename.equals(CIMXml.CLASSNAME)) { ! op += ":" + ((Element)node).getAttribute(XmlInstance.NAME); } else if (nodename.equals(CIMXml.INSTANCENAME)) { ! op += ":" + ((Element)node).getAttribute(CIMXml.CLASSNAME); } else if (nodename.equals(CIMXml.KEYBINDING)) { isSingleton = false; op += (isFirstKey ? "." : ","); isFirstKey = false; ! op += ((Element)node).getAttribute(XmlInstance.NAME); p = getCIMProperty(node); } else if (nodename.equals(CIMXml.KEYVALUE)) { isSingleton = false; op += "="; ! String type = ((Element)node).getAttribute( XmlInstance.VALUETYPE); String value = p.getValue().getValue().toString(); *************** *** 1324,1328 **** } else if (nodename.equals(CIMXml.VALUE_REFERENCE)) { isSingleton = false; ! op += "=" + objectPath(walker.getNextElement(null)); } } --- 1274,1278 ---- } else if (nodename.equals(CIMXml.VALUE_REFERENCE)) { isSingleton = false; ! op += "=" + objectPath(walker.nextNode()); } } --- NEW FILE: NodeTreeWalker.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *Sun Microsystems, Inc. * *Portions created by: Sun Microsystems, Inc. *are Copyright (c) 2001 Sun Microsystems, Inc. * *All Rights Reserved. * *Contributor(s): WBEM Solutions, Inc. * * */ package javax.wbem.cimxml; import org.w3c.dom.Node; /** * This is a helper class that walks the tree using only Node operations. * This is to maintain compatibility with older and newer XML libraries * without all of the classpath hassles (such as having to explicitly request * Xerces on a Sun JVM, and having to use the endorsed mechanism, etc). * This class is complete as far as any wbemservices needs, but may not * contain every method available in the various JAXP versions of TreeWalker */ public class NodeTreeWalker { Node curNode = null; Node topNode = null; /** * @param initialNode */ public NodeTreeWalker(Node initialNode) { topNode = curNode = initialNode; } /** * @return */ public Node getCurrentNode() { return curNode; } /** * */ public Node nextNode() { Node theNode = curNode; if (theNode != null) { curNode = theNode.getFirstChild(); while (curNode == null && theNode != null && topNode != theNode) { curNode = theNode.getNextSibling(); if (curNode == null) { theNode = theNode.getParentNode(); } } } return curNode; } /** * @return */ public Node nextSibling() { if (curNode != topNode && curNode != null) { curNode = curNode.getNextSibling(); } else { curNode = null; } return curNode; } /** * @param name */ public Node getNextElement(String name) { Node nextNode = nextNode(); if (name == null) { return nextNode; } while (curNode != null && !nextNode.getNodeName().equals(name)) { nextNode = nextNode(); } return curNode; } /** * @return */ public Node removeCurrent() { if (curNode != null) { Node parent = curNode.getParentNode(); Node nextNode = curNode.getNextSibling(); parent.removeChild(curNode); curNode = nextNode; } return curNode; } } Index: Response.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/cimxml/Attic/Response.java,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C2 -d -r1.21 -r1.21.2.1 *** Response.java 12 Jul 2004 04:19:05 -0000 1.21 --- Response.java 9 Nov 2006 19:43:58 -0000 1.21.2.1 *************** *** 49,56 **** import javax.wbem.cim.CIMQualifierType; import javax.wbem.cim.CIMValue; ! import org.apache.crimson.tree.ElementNode; ! import org.apache.crimson.tree.TreeWalker; ! import org.apache.crimson.tree.XmlDocument; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; --- 49,56 ---- import javax.wbem.cim.CIMQualifierType; import javax.wbem.cim.CIMValue; + import javax.xml.parsers.ParserConfigurationException; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; *************** *** 63,71 **** class Response { ! static Vector getCIMResponse(XmlDocument response) throws IOException, CIMException { Vector responses = new Vector(); ! TreeWalker walker = new TreeWalker(response); ! for (Node node = walker.getCurrent(); node != null; ) { String nodename = node.getNodeName(); if (nodename.endsWith(CIMXml.SIMPLERSP)) { --- 63,71 ---- class Response { ! static Vector getCIMResponse(Document response) throws IOException, CIMException { Vector responses = new Vector(); ! NodeTreeWalker walker = new NodeTreeWalker(response); ! for (Node node = walker.getCurrentNode(); node != null; ) { String nodename = node.getNodeName(); if (nodename.endsWith(CIMXml.SIMPLERSP)) { *************** *** 73,77 **** node = walker.getNextElement(nodename); } else { ! node = walker.getNext(); } } --- 73,77 ---- node = walker.getNextElement(nodename); } else { ! node = walker.nextNode(); } } *************** *** 88,93 **** String cimtype = null; boolean isinvokemethod = false; ! TreeWalker walker = new TreeWalker(response); ! for (Node node = walker.getCurrent(); node != null; ) { String nodename = node.getNodeName(); if (nodename.endsWith(CIMXml.METHODRESPONSE)) { --- 88,93 ---- String cimtype = null; boolean isinvokemethod = false; ! NodeTreeWalker walker = new NodeTreeWalker(response); ! for (Node node = walker.getCurrentNode(); node != null; ) { String nodename = node.getNodeName(); if (nodename.endsWith(CIMXml.METHODRESPONSE)) { *************** *** 95,113 **** isinvokemethod = true; } ! method = ((ElementNode)node).getAttribute(XmlInstance.NAME); ! node = walker.getNextElement(null); //WSI Bug#126: The following 3 lines set the cimtype } else if (nodename.equals(CIMXml.RETURNVALUE)) { ! cimtype = ((ElementNode)node).getAttribute(XmlInstance.PARAMTYPE); ! node = walker.getNextElement(null); } else if (nodename.equals(CIMXml.ERROR)) { ! int code = Integer.parseInt(((ElementNode)node).getAttribute( XmlInstance.CODE)); ! String desc = ((ElementNode)node).getAttribute(XmlInstance.DESCRIPTION); CIMException e = new CIMException(); e = new CIMException(e.getXmlCode(code)); e.setDescription(desc); v.addElement(e); ! node = walker.getNext(); } else if (nodename.equals(CIMXml.CLASS)) { v.addElement(XMLParser.getCIMClass(node)); --- 95,113 ---- isinvokemethod = true; } ! method = ((Element)node).getAttribute(XmlInstance.NAME); ! node = walker.nextNode(); //WSI Bug#126: The following 3 lines set the cimtype } else if (nodename.equals(CIMXml.RETURNVALUE)) { ! cimtype = ((Element)node).getAttribute(XmlInstance.PARAMTYPE); ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.ERROR)) { ! int code = Integer.parseInt(((Element)node).getAttribute( XmlInstance.CODE)); ! String desc = ((Element)node).getAttribute(XmlInstance.DESCRIPTION); CIMException e = new CIMException(); e = new CIMException(e.getXmlCode(code)); e.setDescription(desc); v.addElement(e); ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.CLASS)) { v.addElement(XMLParser.getCIMClass(node)); *************** *** 126,130 **** } else if (nodename.equals(CIMXml.VALUE)) { v.addElement(XMLParser.getCIMValue(node, cimtype)); ! node = walker.getNextElement(null); } else if (nodename.equals(CIMXml.VALUE_OBJECTWITHPATH)) { NodeList nl = node.getChildNodes(); --- 126,130 ---- } else if (nodename.equals(CIMXml.VALUE)) { v.addElement(XMLParser.getCIMValue(node, cimtype)); ! node = walker.nextNode(); } else if (nodename.equals(CIMXml.VALUE_OBJECTWITHPATH)) { NodeList nl = node.getChildNodes(); *************** *** 153,157 **** node = walker.getNextElement(nodename); } else { ! node = walker.getNextElement(null); } } --- 153,157 ---- node = walker.getNextElement(nodename); } else { ! node = walker.nextNode(); } } *************** *** 167,173 **** } ! boolean isMultiRsp(XmlDocument response) { ! TreeWalker walker = new TreeWalker(response); ! for (Node node = walker.getCurrent(); node != null; ) { if (node.getNodeName().equals(CIMXml.MULTIRSP)) { return true; --- 167,173 ---- } ! boolean isMultiRsp(Document response) { ! NodeTreeWalker walker = new NodeTreeWalker(response); ! for (Node node = walker.getCurrentNode(); node != null; ) { if (node.getNodeName().equals(CIMXml.MULTIRSP)) { return true; *************** *** 177,184 **** } ! static XmlDocument getXMLResponse(XmlResponse rsp, ! XmlDocument request, PasswordAuthentication auth) ! throws IOException, SAXException { ByteArrayOutputStream buf = new ByteArrayOutputStream(); --- 177,184 ---- } ! static Document getXMLResponse(XmlResponse rsp, ! Document request, PasswordAuthentication auth) ! throws IOException, SAXException, ParserConfigurationException { ByteArrayOutputStream buf = new ByteArrayOutputStream(); *************** *** 189,193 **** static void getXMLResponse(XmlResponse rsp, ! XmlDocument request, PasswordAuthentication auth, DataOutputStream out) --- 189,193 ---- static void getXMLResponse(XmlResponse rsp, ! Document request, PasswordAuthentication auth, DataOutputStream out) *************** *** 201,205 ****... [truncated message content] |
Update of /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/java/wbem/javax/wbem/client/adapter/http Modified Files: Tag: jws1-02-branch CIMClientXML.java HttpEventRequestHandler.java XmlRpcClient.java Added Files: Tag: jws1-02-branch DtdResolver.java Log Message: Index: XmlRpcClient.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/Attic/XmlRpcClient.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** XmlRpcClient.java 12 Jul 2004 04:19:09 -0000 1.4 --- XmlRpcClient.java 9 Nov 2006 19:43:59 -0000 1.4.2.1 *************** *** 23,28 **** *All Rights Reserved. * ! *Contributor(s): _______________________________________ ! */ package javax.wbem.client.adapter.http; --- 23,28 ---- *All Rights Reserved. * ! *Contributor(s): WBEM Solutions, Inc. ! */ package javax.wbem.client.adapter.http; *************** *** 32,37 **** import org.xml.sax.EntityResolver; - import org.apache.crimson.tree.SimpleElementFactory; - /** --- 32,35 ---- *************** *** 44,55 **** * @version 1.9 */ ! class XmlRpcClient ! { ! private URL url; ! ! private boolean checkTypes = true; ! private SimpleElementFactory factory; ! private boolean trustDocuments; ! private EntityResolver resolver; /** --- 42,50 ---- * @version 1.9 */ ! class XmlRpcClient { ! ! private URL url; ! private boolean checkTypes = true; ! private EntityResolver resolver; /** *************** *** 115,134 **** { return checkTypes; } - /** - * The request document that's built from the request can be customized, - * so that the generic DOM functionality can be augmented with behaviour - * specific to each element type. This method lets you describe the - * basic customizations to be performed, and optionally enable documents - * themselves to specify further customizations. - * - * @param factory used to acquire customized element nodes - * @param trustDocuments if true, the document can add its own - * mappings from element names to Java element node classes - */ - protected void customizeDocument(SimpleElementFactory factory, - boolean trustDocuments) { - this.factory = factory; - this.trustDocuments = trustDocuments; - } /** --- 110,113 ---- --- NEW FILE: DtdResolver.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *WBEM Solutions, Inc. * *Portions created by: Sun Microsystems, Inc. *are Copyright (c) 2001 Sun Microsystems, Inc. * *All Rights Reserved. * *Contributor(s): * * */ package javax.wbem.client.adapter.http; import java.io.IOException; import java.io.InputStream; import java.util.Hashtable; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; public class DtdResolver implements EntityResolver { Hashtable idHash = new Hashtable(); /* (non-Javadoc) * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String) */ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { InputSource in = null; DtdClReference ref = (DtdClReference)idHash.get(publicId); if (ref != null) { String filename = ref.getDtdFilename(); ClassLoader cl = ref.getClassLoader(); InputStream is = cl.getResourceAsStream(filename); if (is != null) { in = new InputSource(is); } } return in; } /** * Allows you to specify a classloader and DTD filename to be loaded * when the given publicID is encountered in an XML document. * @param publicid * @param dtdName * @param loader */ public void registerCatalogEntry(String publicID, String dtdName, ClassLoader loader) { DtdClReference ref = new DtdClReference(); ref.setDtdFilename(dtdName); ref.setClassLoader(loader); idHash.put(publicID, ref); } private class DtdClReference { public String dtdFilename = null; public ClassLoader classLoader = null; /** * @return Returns the dtdFilename. */ public String getDtdFilename() { return dtdFilename; } /** * @param dtdFilename The dtdFilename to set. */ public void setDtdFilename(String dtdFilename) { this.dtdFilename = dtdFilename; } /** * @return Returns the classLoader. */ public ClassLoader getClassLoader() { return classLoader; } /** * @param classLoader The classLoader to set. */ public void setClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; } } } Index: HttpEventRequestHandler.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/Attic/HttpEventRequestHandler.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** HttpEventRequestHandler.java 12 Jul 2004 04:19:09 -0000 1.4 --- HttpEventRequestHandler.java 9 Nov 2006 19:43:59 -0000 1.4.2.1 *************** *** 23,50 **** *All Rights Reserved. * ! *Contributor(s): _______________________________________ ! */ package javax.wbem.client.adapter.http; - import javax.wbem.client.Debug; - import javax.wbem.client.CIMListener; - import javax.wbem.client.CIMEvent; - import javax.wbem.cimxml.CIMXmlFactory; - import javax.wbem.cimxml.CIMXml; - import java.io.DataOutputStream; import java.io.IOException; - import java.util.List; import java.util.ArrayList; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; - import org.apache.crimson.tree.XmlDocument; - - import javax.wbem.client.adapter.http.transport.InboundRequest; - import javax.wbem.client.adapter.http.transport.HttpServerRequestHandler; - class HttpEventRequestHandler extends HttpServerRequestHandler { --- 23,58 ---- *All Rights Reserved. * ! *Contributor(s): WBEM Solutions, Inc. ! */ package javax.wbem.client.adapter.http; import java.io.DataOutputStream; + import java.io.File; import java.io.IOException; import java.util.ArrayList; + import java.util.List; + + import javax.wbem.cimxml.CIMXml; + import javax.wbem.cimxml.CIMXmlFactory; + import javax.wbem.client.CIMEvent; + import javax.wbem.client.CIMListener; + import javax.wbem.client.Debug; + import javax.wbem.client.adapter.http.transport.HttpServerRequestHandler; + import javax.wbem.client.adapter.http.transport.InboundRequest; + import javax.xml.parsers.ParserConfigurationException; + import javax.xml.transform.OutputKeys; + import javax.xml.transform.Transformer; + import javax.xml.transform.TransformerConfigurationException; + import javax.xml.transform.TransformerException; + import javax.xml.transform.TransformerFactory; + import javax.xml.transform.dom.DOMSource; + import javax.xml.transform.stream.StreamResult; + import org.w3c.dom.Document; + import org.w3c.dom.DocumentType; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; class HttpEventRequestHandler extends HttpServerRequestHandler { *************** *** 66,70 **** public void handleRequest(InboundRequest request) { ! XmlDocument xmlDoc; try { --- 74,78 ---- public void handleRequest(InboundRequest request) { ! Document xmlDoc; try { *************** *** 78,82 **** } ! // delievr indication // clientListener.indicationOccured( // new CIMEvent(xmlInst.getCIMInstance(xmlDoc))); --- 86,90 ---- } ! // deliver indication // clientListener.indicationOccured( // new CIMEvent(xmlInst.getCIMInstance(xmlDoc))); *************** *** 85,100 **** events.notify(); } - // send back response xmlDoc = xmlInst.getXMLResponse(null, xmlDoc, null); ! xmlDoc.write(out); } catch (SAXException e) { DataOutputStream out = new DataOutputStream(request.getResponseOutputStream()); - // XXX don't print stack trace, use debug class below - //e.printStackTrace(); Exception x = e.getException(); String message = "Parse Error with Request:\n"; ! if (x == null) { x = e; } if (e instanceof SAXParseException) { --- 93,129 ---- events.notify(); } // send back response xmlDoc = xmlInst.getXMLResponse(null, xmlDoc, null); ! // Use a Transformer for output ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer; ! try { ! transformer = tFactory.newTransformer(); ! DocumentType docType = xmlDoc.getDoctype(); ! if (docType != null) { ! String systemId =docType.getSystemId(); ! if (systemId != null) { ! String systemValue = ! (new File(systemId)).getName(); ! transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, ! systemValue); ! } ! } ! ! DOMSource source = new DOMSource(xmlDoc); ! StreamResult result = new StreamResult(out); ! transformer.transform(source, result); ! } catch (TransformerConfigurationException e) { ! Debug.trace3("HttpEventRequestHandler", e); ! } catch (TransformerException e) { ! Debug.trace3("HttpEventRequestHandler", e); ! } } catch (SAXException e) { DataOutputStream out = new DataOutputStream(request.getResponseOutputStream()); Exception x = e.getException(); String message = "Parse Error with Request:\n"; ! if (x == null) { ! x = e; } if (e instanceof SAXParseException) { *************** *** 107,116 **** do500Error(out, "XML Parsing error: <b>" + message + "</b>"); - // Don't print to stdout, send to debug output - //System.out.println(message); Debug.trace3(message, e); } catch (IOException e) { ! e.printStackTrace(); ! } } --- 136,145 ---- do500Error(out, "XML Parsing error: <b>" + message + "</b>"); Debug.trace3(message, e); } catch (IOException e) { ! Debug.trace3("HttpEventRequestHandler", e); ! } catch (ParserConfigurationException e) { ! Debug.trace3("HttpEventRequestHandler", e); ! } } Index: CIMClientXML.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/Attic/CIMClientXML.java,v retrieving revision 1.29 retrieving revision 1.29.2.1 diff -C2 -d -r1.29 -r1.29.2.1 *** CIMClientXML.java 27 Sep 2004 04:16:04 -0000 1.29 --- CIMClientXML.java 9 Nov 2006 19:43:59 -0000 1.29.2.1 *************** *** 29,39 **** package javax.wbem.client.adapter.http; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; - import java.io.OutputStreamWriter; import java.io.PrintStream; import java.io.Reader; - import java.io.Writer; import java.net.Authenticator; import java.net.HttpURLConnection; --- 29,38 ---- package javax.wbem.client.adapter.http; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.io.Reader; import java.net.Authenticator; import java.net.HttpURLConnection; *************** *** 107,114 **** import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; - import org.apache.crimson.parser.Resolver; - import org.apache.crimson.tree.XmlDocument; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; --- 106,119 ---- import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; + import javax.xml.transform.OutputKeys; + import javax.xml.transform.Transformer; + import javax.xml.transform.TransformerConfigurationException; + import javax.xml.transform.TransformerException; + import javax.xml.transform.TransformerFactory; + import javax.xml.transform.dom.DOMSource; + import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; + import org.w3c.dom.DocumentType; import org.xml.sax.InputSource; import org.xml.sax.SAXException; *************** *** 143,156 **** private boolean useChunking = false; ! Resolver resolver = new Resolver(); ! private final static String SYSTEMID = ! "http://www.dmtf.org/cim/mapping/xml/v2.0"; private final static String PUBLICID = "-//DMTF//DTD CIM 2.0//EN"; - //private final static String ns = - // "http://www.dmtf.org/cim/mapping/http/v1.0"; private String prefix = ""; private static final String HANDLERCLASS = "CIM_IndicationHandlerCIMXML"; private static final String LISTENERCLASS = "CIM_ListenerDestinationCIMXML"; - private boolean sendDoctype = false; private CIMXml xmlImpl; private HttpEventListener listener = null; --- 148,158 ---- private boolean useChunking = false; ! DtdResolver resolver = new DtdResolver(); ! // private final static String SYSTEMID = ! // "http://www.dmtf.org/cim/mapping/xml/v2.0"; private final static String PUBLICID = "-//DMTF//DTD CIM 2.0//EN"; private String prefix = ""; private static final String HANDLERCLASS = "CIM_IndicationHandlerCIMXML"; private static final String LISTENERCLASS = "CIM_ListenerDestinationCIMXML"; private CIMXml xmlImpl; private HttpEventListener listener = null; *************** *** 200,212 **** ? "true".equalsIgnoreCase(System.getProperty("checktypes")) : false); ! sendDoctype = (System.getProperty("setdoctype") != null ! ? "true".equalsIgnoreCase(System.getProperty("setdoctype")) ! : sendDoctype); ! resolver.registerCatalogEntry(PUBLICID, "javax/wbem/client/cim20.dtd", ! getClass().getClassLoader()); ! customizeResolver(resolver); xmlImpl = CIMXmlFactory.getCIMXmlImpl(); } private static class HttpAuthenticator extends Authenticator { static HttpAuthenticator instance = new HttpAuthenticator(); --- 202,216 ---- ? "true".equalsIgnoreCase(System.getProperty("checktypes")) : false); ! setupResolver(resolver); xmlImpl = CIMXmlFactory.getCIMXmlImpl(); } + public void setupResolver(DtdResolver resolver) { + resolver.registerCatalogEntry(PUBLICID, + "javax/wbem/client/adapter/http/cim20.dtd", + getClass().getClassLoader()); + customizeResolver(resolver); + } + private static class HttpAuthenticator extends Authenticator { static HttpAuthenticator instance = new HttpAuthenticator(); *************** *** 262,266 **** } ! XmlDocument call(XmlDocument request) throws CIMException, IOException { URL url = getUrl(); Document d = null; --- 266,270 ---- } ! Document call(Document request) throws CIMException, IOException { URL url = getUrl(); Document d = null; *************** *** 273,277 **** HttpAuthenticator.instance.setClient(this); ! Writer out = null; String host = url.getHost(); int port = url.getPort(); --- 277,281 ---- HttpAuthenticator.instance.setClient(this); ! PrintStream out = null; String host = url.getHost(); int port = url.getPort(); *************** *** 286,295 **** } outRequest = conn.newRequest(url.getPath()); ! out = new OutputStreamWriter( ! outRequest.getRequestOutputStream(), "UTF8"); setRequestHeaders(outRequest, xmlImpl.getXmlRequestHeaders(request)); outRequest.endWriteHeader(); ! request.write(out); out.flush(); out.close(); --- 290,299 ---- } outRequest = conn.newRequest(url.getPath()); ! out = new PrintStream( ! outRequest.getRequestOutputStream(), false, "UTF8"); setRequestHeaders(outRequest, xmlImpl.getXmlRequestHeaders(request)); outRequest.endWriteHeader(); ! writeDocumentToOutputStream(request, out); out.flush(); out.close(); *************** *** 321,325 **** if (resolver == null) { ! resolver = new Resolver(); } builder.setEntityResolver(resolver); --- 325,330 ---- if (resolver == null) { ! resolver = new DtdResolver(); ! setupResolver(resolver); } builder.setEntityResolver(resolver); *************** *** 327,332 **** try { InputStream contentInput = outRequest.getResponseInputStream(); ! in = Resolver.createInputSource(null, contentInput, ! getCheckTypes(), url.getProtocol()); if (debug == 1 || debug == 3) { dumpRequest(request, outRequest); --- 332,337 ---- try { InputStream contentInput = outRequest.getResponseInputStream(); ! contentInput.available(); ! in = new InputSource(contentInput); if (debug == 1 || debug == 3) { dumpRequest(request, outRequest); *************** *** 387,395 **** } if (debug >= 2) { ! dumpResponse((XmlDocument) d, outRequest); } ! return (XmlDocument) d; } private void setRequestHeaders(OutboundRequest outRequest, Map headers) { prefix = ""; --- 392,424 ---- } if (debug >= 2) { ! dumpResponse(d, outRequest); } ! return d; } + private void writeDocumentToOutputStream(Document request, PrintStream out) { + // Use a Transformer for output + TransformerFactory tFactory = TransformerFactory.newInstance(); + Transformer transformer; + try { + transformer = tFactory.newTransformer(); + DocumentType docType = request.getDoctype(); + if (docType != null) { + String systemId =docType.getSystemId(); + if (systemId != null) { + String systemValue = (new File(systemId)).getName(); + transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, + systemValue); + } + } + DOMSource source = new DOMSource(request); + StreamResult result = new StreamResult(out); + transformer.transform(source, result); + } catch (TransformerConfigurationException e) { + //e.printStackTrace(); + } catch (TransformerException e) { + //e.printStackTrace(); + } + } private void setRequestHeaders(OutboundRequest outRequest, Map headers) { prefix = ""; *************** *** 403,407 **** } ! private void dumpRequest(XmlDocument request, OutboundRequest outRequest) throws IOException { // The following appends XML trace to a file --- 432,436 ---- } ! private void dumpRequest(Document request, OutboundRequest outRequest) throws IOException { // The following appends XML trace to a file *************** *** 414,418 **** outRequest.dumpOutHeader(psout); if (request != null) { ! request.write(psout); } psout.println( --- 443,447 ---- outRequest.dumpOutHeader(psout); if (request != null) { ! writeDocumentToOutputStream(request, psout); } psout.println( *************** *** 429,433 **** outRequest.dumpOutHeader(System.out); if (request != null) { ! request.write(System.out); } System.out.println( --- 458,462 ---- outRequest.dumpOutHeader(System.out); if (request != null) { ! writeDocumentToOutputStream(request, System.out); } System.out.println( *************** *** 437,441 **** } ! private void dumpResponse(XmlDocument response, OutboundRequest outRequest) throws IOException { // The following appends XML trace to a file --- 466,470 ---- } ! private void dumpResponse(Document response, OutboundRequest outRequest) throws IOException { // The following appends XML trace to a file *************** *** 449,453 **** psout.println("\n"); if (response != null) { ! response.write(psout); } psout.println( --- 478,482 ---- psout.println("\n"); if (response != null) { ! writeDocumentToOutputStream(response, psout); } psout.println( *************** *** 465,469 **** System.out.println("\n"); if (response != null) { ! response.write(System.out); } System.out.println( --- 494,498 ---- System.out.println("\n"); if (response != null) { ! writeDocumentToOutputStream(response, System.out); } System.out.println( *************** *** 473,477 **** } ! private Vector getResponse(XmlDocument request) throws MalformedURLException, CIMException, IOException { if (request == null) { --- 502,506 ---- } ! private Vector getResponse(Document request) throws MalformedURLException, CIMException, IOException { if (request == null) { *************** *** 479,487 **** } ! if (sendDoctype) { ! request.setDoctype(PUBLICID, SYSTEMID, null); ! } ! ! XmlDocument response = call(request); return xmlImpl.getCIMResponse(response); --- 508,512 ---- } ! Document response = call(request); return xmlImpl.getCIMResponse(response); *************** *** 503,507 **** * @throws IOException */ ! private Vector getCIFirstResponse(String method, XmlDocument request) throws MalformedURLException, CIMException, IOException { Vector multi = getResponse(request); --- 528,532 ---- * @throws IOException */ ! private Vector getCIFirstResponse(String method, Document request) throws MalformedURLException, CIMException, IOException { Vector multi = getResponse(request); *************** *** 519,523 **** } ! private Vector getFirstResponse(String method, XmlDocument request) throws MalformedURLException, CIMException, IOException { Vector multi = getResponse(request); --- 544,548 ---- } ! private Vector getFirstResponse(String method, Document request) throws MalformedURLException, CIMException, IOException { Vector multi = getResponse(request); *************** *** 541,545 **** } ! private Vector getMultiResponse(XmlDocument request) throws MalformedURLException, CIMException, IOException { Vector v = new Vector(); --- 566,570 ---- } ! private Vector getMultiResponse(Document request) throws MalformedURLException, CIMException, IOException { Vector v = new Vector(); *************** *** 809,813 **** propertyList); cimop.setNameSpace(currNs); ! XmlDocument doc = xmlImpl.getXmlRequest(cimop); return getFirstResponse("EnumerateInstances", doc); } catch (CIMException e) { --- 834,838 ---- propertyList); cimop.setNameSpace(currNs); ! Document doc = xmlImpl.getXmlRequest(cimop); return getFirstResponse("EnumerateInstances", doc); } catch (CIMException e) { *************** *** 930,934 **** Vector rsp = getFirstResponse("GetInstance", xmlImpl.getXmlRequest(cimop)); ! return (CIMInstance) (rsp.firstElement()); } catch (CIMException e) { throw e; --- 955,970 ---- Vector rsp = getFirstResponse("GetInstance", xmlImpl.getXmlRequest(cimop)); ! CIMInstance inst = (CIMInstance) (rsp.firstElement()); ! //Since the getInstance method only returns the instance and not the ! //name we have to fix the REFS ! Enumeration e = inst.getProperties().elements(); ! while (e.hasMoreElements()) { ! CIMProperty p = (CIMProperty) e.nextElement(); ! if (p != null && p.isReference() && p.getValue() != null) { ! fixCIMOjbectPath((CIMObjectPath)p.getValue().getValue()); ! } ! } ! return inst; ! } catch (CIMException e) { throw e; *************** *** 1022,1026 **** new CIMCreateQualifierTypeOp(name, qt); cimop.setNameSpace(currNs); ! getFirstResponse("CreateQualifier", xmlImpl.getXmlRequest(cimop)); } catch (CIMException e) { throw e; --- 1058,1062 ---- new CIMCreateQualifierTypeOp(name, qt); cimop.setNameSpace(currNs); ! getFirstResponse("SetQualifier", xmlImpl.getXmlRequest(cimop)); } catch (CIMException e) { throw e; *************** *** 1071,1075 **** throw e; } catch (Exception e) { - e.printStackTrace(); throw new CIMException("XMLERROR", "createInstance", e); } --- 1107,1110 ---- *************** *** 1496,1500 **** if (o instanceof CIMArgument) { CIMArgument argument = (CIMArgument)o; ! if (argument.getType().isReferenceType()) { if (argument.getType().isArrayType()) { Vector args = (Vector)argument.getValue().getValue(); --- 1531,1536 ---- if (o instanceof CIMArgument) { CIMArgument argument = (CIMArgument)o; ! if ((argument.getType() != null) ! && (argument.getType().isReferenceType())) { if (argument.getType().isArrayType()) { Vector args = (Vector)argument.getValue().getValue(); |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:36
|
Update of /cvsroot/wbemservices/open In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874 Modified Files: Tag: jws1-02-branch README Log Message: Index: README =================================================================== RCS file: /cvsroot/wbemservices/open/README,v retrieving revision 1.93 retrieving revision 1.93.2.1 diff -C2 -d -r1.93 -r1.93.2.1 *** README 6 Oct 2004 02:55:06 -0000 1.93 --- README 9 Nov 2006 19:43:57 -0000 1.93.2.1 *************** *** 1,4 **** --- 1,9 ---- Last updated 10/05/04 + VERSION 1.0.2 + ------------- + - SSL support is working. See doc/ssl.html + - You can only use JDK 1.5.x to build Java WBEM Services. + - "[Fatal Error] :-1:-1: Premature end of file." errors with Java 1.5 seem to be quite non-fatal. VERSION 1.0.1 ------------- |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:36
|
Update of /cvsroot/wbemservices/open/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/doc Modified Files: Tag: jws1-02-branch Instructions.html Win32AntBuild.html Added Files: Tag: jws1-02-branch ssl.html Log Message: Index: Instructions.html =================================================================== RCS file: /cvsroot/wbemservices/open/doc/Instructions.html,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** Instructions.html 1 Oct 2003 02:55:32 -0000 1.19 --- Instructions.html 9 Nov 2006 19:43:57 -0000 1.19.2.1 *************** *** 32,36 **** to install and run the WBEM Services executables on Unix</A></LI> <LI><A HREF="Win32HowToRun.html">How ! to install and run the WBEM Services executables on Win32</A></LI> </UL> <H2>To run the WBEM Services tools and utilities</H2> --- 32,38 ---- to install and run the WBEM Services executables on Unix</A></LI> <LI><A HREF="Win32HowToRun.html">How ! to install and run the WBEM Services executables on Win32</A></LI> ! <LI><A HREF="ssl.html">How ! to run WBEM Services will SSL and a trust all certificate manager</A></LI> </UL> <H2>To run the WBEM Services tools and utilities</H2> *************** *** 142,144 **** Services website</A>.</P> </BODY> ! </HTML> \ No newline at end of file --- 144,146 ---- Services website</A>.</P> </BODY> ! </HTML> Index: Win32AntBuild.html =================================================================== RCS file: /cvsroot/wbemservices/open/doc/Win32AntBuild.html,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** Win32AntBuild.html 1 Oct 2003 16:31:42 -0000 1.11 --- Win32AntBuild.html 9 Nov 2006 19:43:57 -0000 1.11.2.1 *************** *** 25,29 **** <LI>Install <A HREF="http://java.sun.com/j2se/">Java2 SDK and JRE</A> (Standard or Enterprise Edition) onto your system, ! version 1.4.1 (NOTE: Do not use 1.4.1_03 or higher or 1.4.2)</LI> <LI>Install the <A HREF="http://jakarta.apache.org/builds/jakarta-ant/release/v1.4/bin">ANT</A> binaries onto your system, version 1.4; e.g <code>c:\jakarta-ant-1.4</code>. --- 25,29 ---- <LI>Install <A HREF="http://java.sun.com/j2se/">Java2 SDK and JRE</A> (Standard or Enterprise Edition) onto your system, ! version 1.5.x</LI> <LI>Install the <A HREF="http://jakarta.apache.org/builds/jakarta-ant/release/v1.4/bin">ANT</A> binaries onto your system, version 1.4; e.g <code>c:\jakarta-ant-1.4</code>. *************** *** 41,45 **** do the following: <UL> ! <LI>At the command line, set the JAVA_HOME variable; e.g <code>set JAVA_HOME=c:\j2sdk1.4.0</code></LI> <LI>If ANT is not installed in <code>c:\jakarta-ant-1.4</code>, then set the ANT_HOME variable; e.g <code>set ANT_HOME=c:\files\jakarta-ant-1.4</code></LI> --- 41,45 ---- do the following: <UL> ! <LI>At the command line, set the JAVA_HOME variable; e.g <code>set JAVA_HOME=c:\jdk1.5.0_07</code>(or wherever you installed it.)</LI> <LI>If ANT is not installed in <code>c:\jakarta-ant-1.4</code>, then set the ANT_HOME variable; e.g <code>set ANT_HOME=c:\files\jakarta-ant-1.4</code></LI> *************** *** 51,53 **** </P> </BODY> ! </HTML> \ No newline at end of file --- 51,53 ---- </P> </BODY> ! </HTML> --- NEW FILE: ssl.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> <TITLE>Instructions for turning on SSL with a trust all certificate manager</TITLE> <STYLE> <!-- code, pre { background-color: #EEEEEE } --> </STYLE> </HEAD> <BODY LANG="en-US"> <H1>Instructions for turning on SSL with a trust all certificate manager</H1> <P>Last updated 11/8/06</P> <H2>Introduction</H2> <P> <UL> SSL support appears to be working. This document will help you set it up with a trust all certificate manager </UL> <H2>Requirements</H2> <P> <UL> Java 1.5 (which includes keytool) </UL> <H2>Instructions</H2> <UL> <LI>Assume WBEMServices is in c:\files\open\dist\wbemservices</LI> <LI>Generate a keystore in c:\files\open\dist\wbemservices\dist\cimom\bin using a command like the following example with the password and filename values changed. These values will be used in the next step:</LI> <br><code>keytool -genkey -alias servercert -keyalg RSA -keysize 1024 -dname "CN=damien.rose.hp.com,OU=SWD,O=HP,L=Roseville,S=California,C=US" -keypass keytest -keystore DamiensServerstore.jks -storepass teststorepass</code><br><br> <LI> Modify WBEMServices_XXXX.properties setting the values for the SSL properties that you defined in step 1 like so. <code><br><br># Password to the keys in the keystore file<br> SSLKeyStoreKeyPass=keytest<br> # location of the keystore file (in bin dir currently, but could be anywhere)<br> javax.net.ssl.keyStore=DamiensServerstore.jks<br> # password to the keystore file<br> javax.net.ssl.keyStorePassword=teststorepass<br> # location of the truststore file<br> javax.net.ssl.trustStore=<br> # password to the truststore<br> javax.net.ssl.trustStorePassword=<br><br> #ssl port<br> CimomListenPort=5989<br> #will cause the keystore to be used with a trust all certificate manager. This will allow any client to connect without certificate verification.<br> SSLAuthentication=encrypt<br></code></LI> </UL> </P> <H2>More information:</H2> If CimomListenPort and SSLAuthentication are commented out(default), the class WBEMServices_CIMXMLObjectManagerClientProtocolAdapter in /interop is used to turn SSL on and off, as well as change the port using a cimClient. Setting the values in the property file for SSLAuthentication and CimomListenPort, these will override the values in the WBEMServices_CIMXMLObjectManagerClientProtocolAdapter instance.<br> <br> <code>CimomListenPort</code>: can be any port you wish, but should probably be 5988 for non-ssl and 5989 for SSL.<br> <code>SSLAuthentication</code>: Can be set to <code>true, false, or encrypt.</code><br> <P</P> </BODY> </HTML> |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:33
|
Update of /cvsroot/wbemservices/open/initwb In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/initwb Modified Files: Tag: jws1-02-branch WBEMServices_Unix.properties WBEMServices_Win32.properties Log Message: Index: WBEMServices_Unix.properties =================================================================== RCS file: /cvsroot/wbemservices/open/initwb/WBEMServices_Unix.properties,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** WBEMServices_Unix.properties 16 Sep 2003 19:18:44 -0000 1.5 --- WBEMServices_Unix.properties 9 Nov 2006 19:43:57 -0000 1.5.2.1 *************** *** 6,7 **** --- 6,31 ---- DebugDevice=stdout + # Password to the keys in the keystore file + SSLKeyStoreKeyPass=keytest + # location of the keystore file (in bin dir currently) + javax.net.ssl.keyStore=DamiensServerstore.jks + # password to the keystore file + javax.net.ssl.keyStorePassword=teststorepass + # location of the truststore file + javax.net.ssl.trustStore= + # password to the truststore + javax.net.ssl.trustStorePassword= + + + # Whether we should authenticate clients with SSL (true|false|encrypt) + # true - will use the listed keystore and truststore for SSL. + # false - will FORCE no encryption at all + # encrypt - will use the keystore for SSL without certificates + # NOTE- Encryption and port can be manipulated from + # WBEMServices_CIMXMLObjectManagerClientProtocolAdapter + #SSLAuthentication=false + + # FORCE a port + #CimomListenPort=5988 + + Index: WBEMServices_Win32.properties =================================================================== RCS file: /cvsroot/wbemservices/open/initwb/WBEMServices_Win32.properties,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** WBEMServices_Win32.properties 16 Sep 2003 19:18:44 -0000 1.3 --- WBEMServices_Win32.properties 9 Nov 2006 19:43:57 -0000 1.3.2.1 *************** *** 6,8 **** # To save debug output to file, change DebugDevice DebugDevice=stdout ! --- 6,35 ---- # To save debug output to file, change DebugDevice DebugDevice=stdout ! ! ! # Password to the keys in the keystore file ! SSLKeyStoreKeyPass=keytest ! # location of the keystore file (in bin dir currently) ! javax.net.ssl.keyStore=DamiensServerstore.jks ! # password to the keystore file ! javax.net.ssl.keyStorePassword=teststorepass ! # location of the truststore file ! javax.net.ssl.trustStore= ! # password to the truststore ! javax.net.ssl.trustStorePassword= ! ! ! # Whether we should authenticate clients with SSL (true|false|encrypt) ! # true - will use the listed keystore and truststore for SSL. ! # false - will FORCE no encryption at all ! # encrypt - will use the keystore for SSL without certificates ! # NOTE- Encryption and port can be manipulated from ! # WBEMServices_CIMXMLObjectManagerClientProtocolAdapter ! #SSLAuthentication=false ! ! # FORCE a port ! #CimomListenPort=5988 ! ! ! ! |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:13
|
Update of /cvsroot/wbemservices/open/sdk/apps/org/wbemservices/wbem/apps/common In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/sdk/apps/org/wbemservices/wbem/apps/common Modified Files: Tag: jws1-02-branch NameSpaceDialog.java Util.java Log Message: Index: NameSpaceDialog.java =================================================================== RCS file: /cvsroot/wbemservices/open/sdk/apps/org/wbemservices/wbem/apps/common/NameSpaceDialog.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** NameSpaceDialog.java 15 Jul 2004 13:16:39 -0000 1.5 --- NameSpaceDialog.java 9 Nov 2006 19:44:01 -0000 1.5.2.1 *************** *** 239,243 **** public static Enumeration getAllNameSpaces() { ! Enumeration enum = null; CIMObjectPath op = new CIMObjectPath(); --- 239,243 ---- public static Enumeration getAllNameSpaces() { ! Enumeration enumm = null; CIMObjectPath op = new CIMObjectPath(); *************** *** 247,252 **** op.setObjectName("CIM_Namespace"); try { ! enum = interopClient.enumerateInstanceNames(op); ! if (enum.hasMoreElements()) { foundClassName = CIM_NAMESPACE; } else { --- 247,252 ---- op.setObjectName("CIM_Namespace"); try { ! enumm = interopClient.enumerateInstanceNames(op); ! if (enumm.hasMoreElements()) { foundClassName = CIM_NAMESPACE; } else { *************** *** 269,274 **** CIMClient rootClient = CIMClientObject.changeNameSpace("root"); try { ! enum = rootClient.enumerateInstanceNames(op); ! if (enum.hasMoreElements()) { foundClassName = __NAMESPACE; } else { --- 269,274 ---- CIMClient rootClient = CIMClientObject.changeNameSpace("root"); try { ! enumm = rootClient.enumerateInstanceNames(op); ! if (enumm.hasMoreElements()) { foundClassName = __NAMESPACE; } else { *************** *** 289,295 **** Vector v = new Vector(); // if we have Namespace object paths, get the namespace names. ! if ((enum != null) && (foundClassName != NOT_FOUND)) { ! while (enum.hasMoreElements()) { ! CIMObjectPath opNS = (CIMObjectPath)enum.nextElement(); if (foundClassName == CIM_NAMESPACE) { --- 289,295 ---- Vector v = new Vector(); // if we have Namespace object paths, get the namespace names. ! if ((enumm != null) && (foundClassName != NOT_FOUND)) { ! while (enumm.hasMoreElements()) { ! CIMObjectPath opNS = (CIMObjectPath)enumm.nextElement(); if (foundClassName == CIM_NAMESPACE) { *************** *** 365,369 **** CIMClient newCIMClient = null; boolean ret = false; ! Enumeration enum; try { switch (foundClassName) { --- 365,369 ---- CIMClient newCIMClient = null; boolean ret = false; ! Enumeration enumm; try { switch (foundClassName) { *************** *** 381,388 **** default: newCIMClient = CIMClientObject.createInteropClient(); ! enum = newCIMClient.enumerateInstanceNames( new CIMObjectPath("CIM_NameSpace")); ! while (enum.hasMoreElements()) { ! CIMObjectPath opInst = (CIMObjectPath)enum.nextElement(); Enumeration keyEnum = opInst.getKeys().elements(); while (keyEnum.hasMoreElements()) { --- 381,388 ---- default: newCIMClient = CIMClientObject.createInteropClient(); ! enumm = newCIMClient.enumerateInstanceNames( new CIMObjectPath("CIM_NameSpace")); ! while (enumm.hasMoreElements()) { ! CIMObjectPath opInst = (CIMObjectPath)enumm.nextElement(); Enumeration keyEnum = opInst.getKeys().elements(); while (keyEnum.hasMoreElements()) { Index: Util.java =================================================================== RCS file: /cvsroot/wbemservices/open/sdk/apps/org/wbemservices/wbem/apps/common/Util.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** Util.java 21 Dec 2003 23:14:55 -0000 1.4 --- Util.java 9 Nov 2006 19:44:01 -0000 1.4.2.1 *************** *** 178,186 **** * Sorts an Enumeration of objects using the toString() method of the objects * ! * @param enum The Enumeration of objects to sort * @return Enumeration containing sorted objectsy */ ! public static Enumeration sortEnumeration(Enumeration enum) { ! Vector list = enumToVector(enum); sortVector(list); return list.elements(); --- 178,186 ---- * Sorts an Enumeration of objects using the toString() method of the objects * ! * @param enumm The Enumeration of objects to sort * @return Enumeration containing sorted objectsy */ ! public static Enumeration sortEnumeration(Enumeration enumm) { ! Vector list = enumToVector(enumm); sortVector(list); return list.elements(); |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:11
|
Update of /cvsroot/wbemservices/open/org/wbemservices/wbem/compiler/mofc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/org/wbemservices/wbem/compiler/mofc Modified Files: Tag: jws1-02-branch BeanClassWriter.java BeanInterfaceWriter.java CIM_Mofc.java Log Message: Index: CIM_Mofc.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/compiler/mofc/CIM_Mofc.java,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** CIM_Mofc.java 11 Jun 2004 02:15:26 -0000 1.8 --- CIM_Mofc.java 9 Nov 2006 19:44:00 -0000 1.8.2.1 *************** *** 1,3481 **** ! /* Generated By:JavaCC: Do not edit this line. CIM_Mofc.java */ ! package org.wbemservices.wbem.compiler.mofc; ! ! import java.io.*; ! import java.math.BigInteger; ! import java.util.*; ! import java.text.MessageFormat; ! import java.util.Locale; ! import java.util.MissingResourceException; ! import java.util.ResourceBundle; [...3454 lines suppressed...] ! final private void jj_save(int index, int xla) { ! JJCalls p = jj_2_rtns[index]; ! while (p.gen > jj_gen) { ! if (p.next == null) { p = p.next = new JJCalls(); break; } ! p = p.next; ! } ! p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; ! } ! ! static final class JJCalls { ! int gen; ! Token first; ! int arg; ! JJCalls next; ! } ! ! } --- 1 ---- ! /* Generated By:JavaCC: Do not edit this line. CIM_Mofc.java */ package org.wbemservices.wbem.compiler.mofc; import java.io.*; import java.math.BigInteger; import java.util.*; import java.text.MessageFormat; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; import javax.wbem.cim.*; import javax.wbem.client.*; import org.wbemservices.wbem.compiler.prep.CIM_Prep; public class CIM_Mofc implements CIM_MofcConstants { private static final int MINMODE = 0; public static final int NORMALMODE = 0; public static final int REGMODE = 1; public static final int UNREGMODE = 2; private static final int MAXMODE = 2; private static final String EXRESOURCE = "org.wbemservices.wbem.compiler.mofc.Compiler"; private MofcBackend comp = null; private int parsePhase = 1; private boolean verbose = false; private boolean onlySynCheck = false; private Locale locale = Locale.getDefault(); private static final String NO_SUCH_FILE = "NO_SUCH_FILE"; XmlWriter xmlwriter = new XmlWriter(); boolean isInvoked = false; int mode = NORMALMODE; CIMOMHandle callBack = null; public boolean isVerbose() { return verbose; } // This method can be used by any class which wishes to embed a // MOF parser. The parser calls back on the CIMOMHandle when it wants // to do its CIM create/set operations. It only invokes a subset of the // operations, but we're not creating a new interface for now. // @param argv[] - args as passed to mofcomp // @param callBack The handle the mof parser invokes when it wants to // create/set/delete/get CIM elements // @param mode The mode in which this parser runs. // NORMALMODE - parses normal MOF files // REGMODE - allows files to have #pragma namespace directives to ask // the parser to do sets instead of creates and vice versa. // UNREGMODE - allows files to set delete modes on the fly in addition to // to sets and creates. public static void parseMOF(String[] argv, int mode, CIMOMHandle callBack) throws Exception { parseMOF(argv, true, mode, callBack); } // This method can be used by any class which wishes to embed a // MOF parser. The parser calls back on the CIMOMHandle when it wants // to do its CIM create/set operations. It only invokes a subset of the // operations, but we're not creating a new interface for now. // @param argv[] - args as passed to mofcomp // @param isInvoked - this parameter if true, tells the parser to not exit, // but return on success and throw exceptions on failure. // @param callBack The handle the mof parser invokes when it wants to // create/set/delete/get CIM elements // @param mode The mode in which this parser runs. // NORMALMODE - parses normal MOF files // REGMODE - allows files to have #pragma namespace directives to ask // the parser to do sets instead of creates and vice versa. // UNREGMODE - allows files to set delete modes on the fly in addition to // to sets and creates. static void parseMOF(String[] argv, boolean isInvoked, int mode, CIMOMHandle callBack) throws Exception { CIM_Mofc parser = null; CIM_Prep preProc; String fileName = null; //set I18N Bundle and log name. All instances of the parser will // share these, so they could get overwritten by new instances of // the parser. I18N.setResourceName("org.wbemservices.wbem.compiler.mofc.Compiler"); LogFile.setFileName("mofcomp.log"); //Check Command Line information (before logging) Hashtable clht = CIM_Mofc.checkCommandLine(argv, isInvoked); fileName = (String)clht.get("filename"); fileName = new File(fileName).getAbsolutePath(); if(fileName == null) { System.err.println(I18N.loadString("NO_FILE")); if (!isInvoked) { System.exit(1); } else { throw new CIMException(CIMException.CIM_ERR_NOT_FOUND, fileName); } } FileInputStream fis = null; try { boolean idempotent = clht.get("-idempotent") != null; fis = new FileInputStream(fileName); preProc = new CIM_Prep(fis, fileName); preProc.pre_FileName = fileName; preProc.FileNameTable.put(fileName, fileName); preProc.dos.writeBytes("##FILE \"" + fileName + "\"\n"); preProc.cw.write("##FILE \"" + fileName + "\"\n"); try { preProc.ExpressionList(new File(fileName).getParent(), idempotent); } catch (IOException ioe) { if (!isInvoked) { ioe.printStackTrace(); System.exit(-1); } else { throw new IOException(ioe.toString()); } } if (preProc.isASCII()) { parser = new CIM_Mofc(new InputStreamReader( new ByteArrayInputStream(preProc.bos.toByteArray()), "UTF-8")); } else { parser = new CIM_Mofc(new BufferedReader(new CharArrayReader( preProc.cw.toCharArray()))); } /* parser = new CIM_Mofc(new ByteArrayInputStream(preProc.bos.toByteArray())); */ // initialize all the parser settings if (clht.get("-s") != null) { parser.onlySynCheck = true; } if (clht.get("-v") != null) { parser.verbose = true; } parser.mode = mode; parser.isInvoked = isInvoked; parser.callBack = callBack; parser.comp = new MofcBackend(clht, parser); parser.mofSpecification(); if(parser.onlySynCheck) { if (!isInvoked) { System.out.println(I18N.loadString("SYN_SUCCESS")); System.exit(0); } else { return; } } if (preProc.isASCII()) { parser.ReInit(new InputStreamReader( new ByteArrayInputStream(preProc.bos.toByteArray()), "UTF-8")); } else { parser.ReInit(new BufferedReader(new CharArrayReader( preProc.cw.toCharArray()))); } parser.parsePhase = 2; parser.comp.setParsePhase(2); //If the user set the namespace on the commandline - use it if (clht.get("-n") != null) { parser.comp.switchNamespace((String)clht.get("namespace")); } int i = -1; while (i+1 < argv.length) { i++; if (argv[i].equalsIgnoreCase("-b")) { parser.comp.setFile(parser.xmlwriter.openXmlFile()); parser.comp.setBigFile(parser.xmlwriter.openBigXmlFile()); } } parser.mofSpecification(); i = -1; while (i+1 < argv.length) { i++; if (argv[i].equalsIgnoreCase("-b")) { parser.xmlwriter.writeEndTags(parser.xmlwriter.getFile()); parser.xmlwriter.writeBigEndTags(parser.xmlwriter.getBigFile()); } } System.out.println(I18N.loadString("SUCCESS")); } catch(FileNotFoundException fne) { if (!isInvoked) { System.err.println("ERROR: Can not find file: " + fileName); System.exit(1); } else { throw fne; } } catch(Exception e) { if((parser != null) && (parser.comp != null)) { parser.comp.cleanup(); } if (isInvoked) { throw e; } if(e instanceof CIMException) { System.err.println( parser.toStringCIMException((CIMException)e)); } else { System.err.println(e); } System.exit(1); } finally { // Clean up the input stream. if (fis != null) { fis.close(); } } if((parser.comp != null)) { parser.comp.cleanup(); } if (!isInvoked) { System.exit(0); } } public static void main(String argv[]) throws Exception { parseMOF(argv, false, NORMALMODE, null); Debug.traceOpen("3tmp", "stderr"); } String toStringCIMException(CIMException cimEx) { ResourceBundle bundle = null; String msgString = null; try { bundle = ResourceBundle.getBundle(EXRESOURCE, locale); } catch(MissingResourceException e) { try { bundle = ResourceBundle.getBundle(EXRESOURCE, Locale.ENGLISH); } catch(MissingResourceException ee) { System.err.println("CRITICAL ERROR: Could not load resource bundle " + EXRESOURCE); } } String ID = ""; if (bundle == null) { //Since this is an error msg about not being able to locate //the resource bundle - Do not localize these strings System.err.println("CRITICAL ERROR: Could not load resource bundle " + EXRESOURCE); return null; } else { ID = cimEx.getID(); try { msgString = bundle.getString(ID); } catch (MissingResourceException e) { //Since this is an error msg about not being able to locate //the resource bundle - Do not localize these strings System.err.println("WARNING: Could not load ID " + ID + " resource bundle " + EXRESOURCE); return ID; } } if (msgString != null) { return (ID+":"+MessageFormat.format(msgString, cimEx.getParams())); } else { return null; } } public int getCurrentLine() { int a = jj_input_stream.getEndLine(); return (a - comp.lineNo); } private char parseCharacter(String s) { String t = s.substring(1, s.length()-1); if(t.charAt(0) == '\\') { switch(t.charAt(1)) { case 'n': return('\n'); case 't': return('\t'); case 'b': return('\b'); case 'r': return('\r'); case 'f': return('\f'); case '\\': return('\\'); case '\'': return('\''); case '"': return('"'); default : throw new IllegalArgumentException(s); } } else { return(t.charAt(0)); } } private String parseString(String s) { String t = s.substring(1, s.length()-1); int i = t.length(); StringBuffer b = new StringBuffer(); for(int j=0; j < i; j++) { if(t.charAt(j) == '\\') { j++; switch(t.charAt(j)) { case 'n': b.append('\n'); break; case 't': b.append('\t'); break; case 'b': b.append('\b'); break; case 'r': b.append('\r'); break; case 'f': b.append('\f'); break; case '\\': b.append('\\'); break; case '\'': b.append('\''); break; case '"': b.append('"'); break; default : throw new IllegalArgumentException(s); } } else { b.append(t.charAt(j)); } } return b.toString(); } private static Hashtable checkCommandLine(String argv[], boolean isInvoked) throws CIMException { Hashtable ht = new Hashtable(); int igsize = 0; if ((argv.length == 0)) { if (!isInvoked) { System.out.println(I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(0); } else { throw new CIMException(CIMException.CIM_ERR_INVALID_PARAMETER, argv); } } int i = -1; while (i+1 < argv.length) { i++; if (argv[i].equals("-v")) { LogFile.setVerbose(true); ht.put("-v","-v"); continue; } //NOTE: I did not make the second char on this // argument programatic on purpose - There are // going to be some changes to the logging class! if (argv[i].equalsIgnoreCase("-l0")) { LogFile.setLevel(LogFile.CRITICAL); LogFile.start(); continue; } if (argv[i].equals("-l1")) { LogFile.setLevel(LogFile.WARNING); LogFile.start(); continue; } if (argv[i].equals("-l2")) { LogFile.setLevel(LogFile.INFORMATIONAL); LogFile.start(); continue; } if (argv[i].equals("-l3")) { LogFile.setLevel(LogFile.DEBUG); LogFile.start(); continue; } //This is an unpublished parameter if (argv[i].equals("-lDev")) { LogFile.setLevel(LogFile.DEVELOPMENT); LogFile.start(); continue; } if (argv[i].equals("-C")) { // overwrite existing classes. ht.put("-C","-C"); continue; } if (argv[i].equalsIgnoreCase("-I")) { // overwrite existing instances. ht.put("-I","-I"); continue; } if (argv[i].equals("-Q")) { // overwrite existing qualifiers. ht.put("-Q","-Q"); continue; } if (argv[i].equals("-s")) { // do only syntactic checking ht.put("-s","-s"); continue; } //Namespace support if (argv[i].equals("-n")) { i++; ht.put("-n","-n"); if(i >= argv.length) { System.err.println( I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } ht.put("namespace",argv[i]); continue; } // <PJA> 25-march-2003 if (argv[i].equals("-clean")) // delete namespace { ht.put("-clean", "-clean"); continue; } //MOF2BEAN support if (argv[i].equalsIgnoreCase("-j")) { i++; ht.put("-j","-j"); if(i >= argv.length) { System.err.println( I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } try { // verify that the specified file exists FileReader beanArg = new FileReader(argv[i]); // get the PACKAGE, IMPORTS, and EXCEPTIONS values // from the Bean config file BeanArgReader beanArgReader = new BeanArgReader(beanArg); ht.put("beanPackage", beanArgReader.getPackage()); ht.put("beanImports", beanArgReader.getImports()); ht.put("beanExceptions", beanArgReader.getExceptions()); } catch(FileNotFoundException fnfe) { Vector vError = new Vector(1); vError.addElement(argv[i]); System.err.println(I18N.loadStringFormat( "ERR_BEAN_ARG_NOT_FOUND", vError)); System.exit(1); } continue; } if (argv[i].equalsIgnoreCase("-x")) { ht.put("-x","-x"); continue; } if (argv[i].equalsIgnoreCase("-b")) { // internal build option generates bigmof.xml file ht.put("-b","-b"); continue; } if (argv[i].equals("-version")) { if (!isInvoked) { System.out.println(Version.productName + " " + Version.major + "." + Version.minor + "." + Version.revision + " " + Version.buildID); System.exit(0); } else { // cant ask for version if invoked throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "version"); } } if (argv[i].equals("-h")) { if (!isInvoked) { System.out.println( I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(0); } else { // cant ask for help if invoked throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "h"); } } if (argv[i].equals("-c")) { if (isInvoked) { // cant specify a remote CIM server if invoked, // the callBack should take care of that throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "-c"); } i++; if(i >= argv.length) { System.err.println( I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } ht.put("cimhost",argv[i]); continue; } if (argv[i].equals("-u")) { if (isInvoked) { // cant specify a user if invoked, // the callBack should take care of that throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "-u"); } i++; if(i >= argv.length) { System.err.println(I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } ht.put("username",argv[i]); continue; } if (argv[i].equals("-p")) { if (isInvoked) { // cant specify a password if invoked, // the callBack should take care of that throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "-p"); } i++; if(i >= argv.length) { System.err.println(I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } ht.put("password",argv[i]); continue; } if (argv[i].equals("-o")) { i++; if(i >= argv.length) { if (!isInvoked) { System.err.println( I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } else { throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, "-o"); } } ht.put("logdir",argv[i]); ht.put("standalone","true"); continue; } ht.put("filename",argv[i]); // increment the ignored parameter igsize++; } if(igsize > 1) { if (!isInvoked) { System.err.println(I18N.loadString("MOFC_COMMAND_LINE_ARGS")); System.exit(1); } else { throw new CIMException( CIMException.CIM_ERR_INVALID_PARAMETER, argv); } } return ht; } /* // ------------------------------------------------------------------------ // MOF Specification: This production parses the specification. Each of // the subproductions populate the appropriate element associated with it // in an instance (comp) of MofcompBackend. For e.g. if the subproduction // is for className, then it populates comp.curClassEl's name. Finally // when the entire class has been parsed successfully, the class can be // added using the information accumulated in curClassEl. // ------------------------------------------------------------------------ */ final public void mofSpecification() throws ParseException, CIMException { try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRECOMP_LINE: case PRECOMP_FILE: case PRAGMA: case CLASS: case INSTANCE: case QUALIFIER: case OPEN_SQU_BRA: mofProductions(); break; default: jj_la1[0] = jj_gen; ; } jj_consume_token(0); } catch (ParseException e) { LogFile.add(LogFile.CRITICAL, "ERR_PARSE", new Object[] { comp.fileName, new Integer(getCurrentLine()) }); System.err.println( I18N.loadStringFormat("ERROR_LINE", comp.fileName, new Integer(getCurrentLine()))); {if (true) throw e;} } } final public void mofProductions() throws ParseException, CIMException { label_1: while (true) { mofProduction(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRECOMP_LINE: case PRECOMP_FILE: case PRAGMA: case CLASS: case INSTANCE: case QUALIFIER: case OPEN_SQU_BRA: ; break; default: jj_la1[1] = jj_gen; break label_1; } } } final public void mofProduction() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRAGMA: compilerDirective(); break; case PRECOMP_LINE: case PRECOMP_FILE: precompilerDirective(); break; case CLASS: case INSTANCE: case OPEN_SQU_BRA: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_SQU_BRA: qualifierList(); break; default: jj_la1[2] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case CLASS: classDeclaration(); break; case INSTANCE: instanceDeclaration(); break; default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; case QUALIFIER: qualifierTypeDeclaration(); break; default: jj_la1[4] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } /* // ------------------------------------------------------------------------ // PreCompiler Directive // ------------------------------------------------------------------------ */ final public void precompilerDirective() throws ParseException { Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PRECOMP_LINE: jj_consume_token(PRECOMP_LINE); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case POS_DECIMAL_VALUE: t = jj_consume_token(POS_DECIMAL_VALUE); break; case ZERO: t = jj_consume_token(ZERO); break; default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } comp.lineNo = t.endLine-Integer.parseInt(t.image); break; case PRECOMP_FILE: jj_consume_token(PRECOMP_FILE); t = jj_consume_token(STRING_VALUE); //Removed the parse from this line comp.fileName = t.image; comp.lineNo = t.endLine; break; default: jj_la1[6] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } /* // ------------------------------------------------------------------------ // CompilerDirectives // ------------------------------------------------------------------------ */ final public void compilerDirective() throws ParseException, CIMException { jj_consume_token(PRAGMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NAMESPACE: namespacePragma(); break; case SOURCE: sourcePragma(); break; case LOCALE: localePragma(); break; case NONLOCALE: nonlocalePragma(); break; case INSTANCELOCALE: instancelocalePragma(); break; default: jj_la1[7] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void namespacePragma() throws ParseException, CIMException { Token t; jj_consume_token(NAMESPACE); jj_consume_token(OPEN_BRA); // CHANGED t = jj_consume_token(STRING_VALUE); jj_consume_token(CLOSE_BRA); comp.switchNamespace(parseString(t.image)); } final public void sourcePragma() throws ParseException { jj_consume_token(SOURCE); jj_consume_token(OPEN_BRA); multiStringValue(); jj_consume_token(CLOSE_BRA); } final public void localePragma() throws ParseException { jj_consume_token(LOCALE); jj_consume_token(OPEN_BRA); multiStringValue(); jj_consume_token(CLOSE_BRA); } final public void nonlocalePragma() throws ParseException { jj_consume_token(NONLOCALE); jj_consume_token(OPEN_BRA); multiStringValue(); jj_consume_token(CLOSE_BRA); } final public void instancelocalePragma() throws ParseException { jj_consume_token(INSTANCELOCALE); jj_consume_token(OPEN_BRA); multiStringValue(); jj_consume_token(CLOSE_BRA); } final public String nameToken() throws ParseException { Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: t = jj_consume_token(IDENTIFIER); break; case SCHEMA: t = jj_consume_token(SCHEMA); break; case ASSOCIATION: t = jj_consume_token(ASSOCIATION); break; case INDICATION: t = jj_consume_token(INDICATION); break; case REFERENCE: t = jj_consume_token(REFERENCE); break; case LOCALE: t = jj_consume_token(LOCALE); break; case SOURCE: t = jj_consume_token(SOURCE); break; default: jj_la1[8] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return t.image;} throw new Error("Missing return statement in function"); } /* // ------------------------------------------------------------------------ // Qualifier Type Declaration // (set qualifierTypes) // (Unit) // ------------------------------------------------------------------------ */ final public void qualifierTypeDeclaration() throws ParseException, CIMException { qualifierTypeHead(); qualifierTypeBody(); qualifierTypeTail(); } final public void qualifierTypeHead() throws ParseException { jj_consume_token(QUALIFIER); comp.curLevel= "QUALIFIER"; } final public void qualifierTypeBody() throws ParseException, CIMException { qualifierTypeName(); qualifierTypeDataType(); qualifierTypeArray_Init(); qualifierTypeScope(); qualifierTypeFlavor(); } final public void qualifierTypeTail() throws ParseException, CIMException { jj_consume_token(SEMICOLON); comp.addQualifierType(); //comp.curLevel=""; comp.erroneousUnit=false; comp.erroneousPart=false; } final public void qualifierTypeName() throws ParseException { String s; s = nameToken(); comp.curQualifierTypeEl.setName(s); } final public void qualifierTypeDataType() throws ParseException { jj_consume_token(COLON); dataType(); } final public void qualifierTypeArray_Init() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_SQU_BRA: qualifierTypeArray_ArrayInit(); break; default: jj_la1[9] = jj_gen; qualifierTypeSimpleInit(); } } final public void qualifierTypeArray_ArrayInit() throws ParseException, CIMException { array(); int simpleType = comp.curType.getType(); // Create a new array data type. comp.curType = new CIMDataType(CIMDataType.findArrayType(simpleType), comp.size); comp.curQualifierTypeEl.setType(comp.curType); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQUAL: jj_consume_token(EQUAL); arrayInitializer(); if (!comp.erroneousPart) { if(!comp.curValues.isEmpty()) { CIMValue cv = new CIMValue(comp.curValues.vVector); comp.curQualifierTypeEl.setDefaultValue(cv); } } comp.curValues = new MofcCIMValue(); break; default: jj_la1[10] = jj_gen; ; } } final public void qualifierTypeSimpleInit() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQUAL: jj_consume_token(EQUAL); simpleInitializer(); comp.curQualifierTypeEl.setType(comp.curType); // simpleInitializer populated comp.curValues if (!comp.erroneousPart) { if(!comp.curValues.isEmpty()) { Object o = comp.curValues.vVector.firstElement(); comp.curQualifierTypeEl.setDefaultValue(new CIMValue(o)); } } comp.curValues = new MofcCIMValue(); break; default: jj_la1[11] = jj_gen; comp.curQualifierTypeEl.setType(comp.curType); } } final public void qualifierTypeScope() throws ParseException { jj_consume_token(COMMA); jj_consume_token(SCOPE); jj_consume_token(OPEN_BRA); ScopeMetaElementList(); jj_consume_token(CLOSE_BRA); } final public void ScopeMetaElementList() throws ParseException { CIMScope s; s = ScopeMetaElement(); comp.assignQualifierTypeScope(s); label_2: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[12] = jj_gen; break label_2; } jj_consume_token(COMMA); s = ScopeMetaElement(); comp.assignQualifierTypeScope(s); } } final public CIMScope ScopeMetaElement() throws ParseException { Token t; int scope; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SCHEMA: t = jj_consume_token(SCHEMA); scope = CIMScope.SCHEMA; break; case CLASS: t = jj_consume_token(CLASS); scope = CIMScope.CLASS; break; case ASSOCIATION: t = jj_consume_token(ASSOCIATION); scope = CIMScope.ASSOCIATION; break; case INDICATION: t = jj_consume_token(INDICATION); scope = CIMScope.INDICATION; break; case PROPERTY: t = jj_consume_token(PROPERTY); scope = CIMScope.PROPERTY; break; case REFERENCE: t = jj_consume_token(REFERENCE); scope = CIMScope.REFERENCE; break; case METHOD: t = jj_consume_token(METHOD); scope = CIMScope.METHOD; break; case PARAMETER: t = jj_consume_token(PARAMETER); scope = CIMScope.PARAMETER; break; case ANY: t = jj_consume_token(ANY); scope = CIMScope.ANY; break; default: jj_la1[13] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return new CIMScope(scope);} throw new Error("Missing return statement in function"); } final public void qualifierTypeFlavor() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: jj_consume_token(COMMA); jj_consume_token(FLAVOR); jj_consume_token(OPEN_BRA); qualifierTypeFlavorList(); jj_consume_token(CLOSE_BRA); break; default: jj_la1[14] = jj_gen; } } final public void qualifierTypeFlavorList() throws ParseException { CIMFlavor s; s = flavor(); comp.assignQualifierTypeFlavor(s); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[15] = jj_gen; break label_3; } jj_consume_token(COMMA); s = flavor(); comp.assignQualifierTypeFlavor(s); } } final public CIMFlavor flavor() throws ParseException { int flavor; Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENABLEOVERRIDE: t = jj_consume_token(ENABLEOVERRIDE); flavor = CIMFlavor.ENABLEOVERRIDE; break; case DISABLEOVERRIDE: t = jj_consume_token(DISABLEOVERRIDE); flavor = CIMFlavor.DISABLEOVERRIDE; break; case RESTRICTED: t = jj_consume_token(RESTRICTED); flavor = CIMFlavor.RESTRICTED; break; case TOSUBCLASS: t = jj_consume_token(TOSUBCLASS); flavor = CIMFlavor.TOSUBCLASS; break; case TRANSLATABLE: t = jj_consume_token(TRANSLATABLE); flavor = CIMFlavor.TRANSLATE; break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return new CIMFlavor(flavor);} throw new Error("Missing return statement in function"); } /* // ------------------------------------------------------------------------ // Qualifier List // (set comp.qualifiers) // (Part) // ------------------------------------------------------------------------ */ final public void qualifierList() throws ParseException, CIMException { qualifierListHead(); qualifierListBody(); qualifierListTail(); } final public void qualifierListHead() throws ParseException { jj_consume_token(OPEN_SQU_BRA); comp.curLevel= "QUALIFIERLIST"; comp.erroneousQualifierList=false; comp.qualifiers = new Vector(); } final public void qualifierListBody() throws ParseException, CIMException { qualifier(); comp.addQualifier(); label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[17] = jj_gen; break label_4; } jj_consume_token(COMMA); qualifier(); comp.addQualifier(); } } final public void qualifierListTail() throws ParseException, CIMException { jj_consume_token(CLOSE_SQU_BRA); comp.checkQualifierList(); //comp.curLevel=""; } final public void qualifier() throws ParseException, CIMException { qualifierName(); qualifierParameter(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: qualifierFlavor(); break; default: jj_la1[18] = jj_gen; ; } } final public void qualifierName() throws ParseException { String s; s = nameToken(); comp.assignQualifierNameType(s); } final public void qualifierParameter() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_BRA: jj_consume_token(OPEN_BRA); simpleInitializer(); jj_consume_token(CLOSE_BRA); comp.assignQualifierParameter(false); break; case OPEN_CUR_BRA: arrayInitializer(); //comp.checkArraySize(comp.curQualifierEl.getName()); comp.assignQualifierParameter(true); break; default: jj_la1[19] = jj_gen; comp.curValues = new MofcCIMValue(); comp.assignQualifierParameter(false); } } final public void qualifierFlavor() throws ParseException { jj_consume_token(COLON); qualifierFlavorList(); } final public void qualifierFlavorList() throws ParseException { CIMFlavor s; label_5: while (true) { s = flavor(); comp.assignQualifierFlavor(s); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ENABLEOVERRIDE: case DISABLEOVERRIDE: case TOSUBCLASS: case RESTRICTED: case TRANSLATABLE: ; break; default: jj_la1[20] = jj_gen; break label_5; } } } /* // ------------------------------------------------------------------------ // Class Declaration // (set classes, classAliases) // (Unit) // ------------------------------------------------------------------------ */ final public void classDeclaration() throws ParseException, CIMException { classHead(); classBody(); classTail(); } final public void classHead() throws ParseException, CIMException { jj_consume_token(CLASS); className(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AS: classAlias(); break; default: jj_la1[21] = jj_gen; ; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COLON: classSuperClassName(); break; default: jj_la1[22] = jj_gen; ; } comp.curLevel= "CLASS"; if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.qualifiers = new Vector(); comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curClassEl.getName()); } else comp.assignClassQualifiers(); } final public void classBody() throws ParseException, CIMException { jj_consume_token(OPEN_CUR_BRA); classFeatureList(); jj_consume_token(CLOSE_CUR_BRA); } final public void classTail() throws ParseException, CIMException { jj_consume_token(SEMICOLON); comp.addClass(); //comp.curLevel=""; comp.erroneousUnit=false; comp.erroneousPart=false; } final public void className() throws ParseException, CIMException { Token t; t = jj_consume_token(IDENTIFIER); comp.assignClassName(t.image); } final public void classAlias() throws ParseException { Token t; jj_consume_token(AS); t = jj_consume_token(ALIAS_IDENTIFIER); comp.assignClassAlias(t.image); } final public void classSuperClassName() throws ParseException { Token t; jj_consume_token(COLON); t = jj_consume_token(IDENTIFIER); comp.assignSuperclassName(t.image); } final public void classFeatureList() throws ParseException, CIMException { label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: case DT_REAL32: case DT_REAL64: case DT_CHAR16: case DT_STR: case DT_BOOL: case DT_DATETIME: case IDENTIFIER: case OPEN_SQU_BRA: ; break; default: jj_la1[23] = jj_gen; break label_6; } classFeature(); } } final public void classFeature() throws ParseException, CIMException { if (jj_2_1(2147483647)) { propertyDeclaration(); } else if (jj_2_2(2147483647)) { methodDeclaration(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case OPEN_SQU_BRA: referenceDeclaration(); break; default: jj_la1[24] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } /* // ------------------------------------------------------------------------ // Property Declaration // (set properties) // (Part) // ------------------------------------------------------------------------ */ final public void propertyDeclaration() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: case DT_REAL32: case DT_REAL64: case DT_CHAR16: case DT_STR: case DT_BOOL: case DT_DATETIME: propertyHead(); propertyBody(); propertyTail(); break; case OPEN_SQU_BRA: qualifierList(); propertyHead(); propertyBody(); propertyTail(); break; default: jj_la1[25] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void propertyHead() throws ParseException, CIMException { dataType(); propertyName(); comp.curLevel= "PROPERTY"; if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.qualifiers = new Vector(); comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curPropRefEl.getName()); } else comp.assignPropertyQualifiers(); } final public void propertyBody() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_SQU_BRA: propertyArray_ArrayInit(); break; default: jj_la1[26] = jj_gen; propertySimpleInit(); } } final public void propertyArray_ArrayInit() throws ParseException, CIMException { array(); int simpleType = comp.curType.getType(); // Create a new array data type. comp.curType = new CIMDataType(CIMDataType.findArrayType(simpleType), comp.size); comp.curPropRefEl.setType(comp.curType); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQUAL: jj_consume_token(EQUAL); arrayInitializer(); if (!comp.erroneousPart) { if(!comp.curValues.isEmpty()) { CIMValue cv = new CIMValue(comp.curValues.vVector); comp.curPropRefEl.setValue(cv); } } comp.curValues = new MofcCIMValue(); break; default: jj_la1[27] = jj_gen; ; } } final public void propertySimpleInit() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQUAL: jj_consume_token(EQUAL); simpleInitializer(); comp.curPropRefEl.setType(comp.curType); if (!comp.erroneousPart) { if(!comp.curValues.isEmpty()) { Object o = comp.curValues.vVector.firstElement(); comp.curPropRefEl.setValue(new CIMValue(o)); } } comp.curValues = new MofcCIMValue(); break; default: jj_la1[28] = jj_gen; //do nothing comp.curPropRefEl.setType(comp.curType); } } final public void propertyTail() throws ParseException { jj_consume_token(SEMICOLON); comp.addProperty(); //comp.curLevel=""; comp.erroneousPart=false; } final public void propertyName() throws ParseException, CIMException { String s; s = nameToken(); comp.assignFeatureName(s); } /* // ------------------------------------------------------------------------ // Reference Declaration // (set properties) // (Part) // ------------------------------------------------------------------------ */ final public void referenceDeclaration() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: referenceHead(); referenceBody(); referenceTail(); break; case OPEN_SQU_BRA: qualifierList(); referenceHead(); referenceBody(); referenceTail(); break; default: jj_la1[29] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void referenceHead() throws ParseException, CIMException { referenceObject(); referenceName(); comp.curLevel = "REFERENCE"; if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.qualifiers = new Vector(); comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curPropRefEl.getName()); } else comp.assignReferenceQualifiers(); } final public void referenceBody() throws ParseException, CIMException { referenceInitializer(); } final public void referenceTail() throws ParseException { jj_consume_token(SEMICOLON); comp.addReference(); //comp.curLevel=""; comp.erroneousPart=false; } final public void referenceName() throws ParseException, CIMException { String s; s = nameToken(); comp.assignFeatureName(s); } final public void referenceObject() throws ParseException { objectRef(); comp.assignRefClassName(comp.curType); } final public void referenceInitializer() throws ParseException, CIMException { Token t; String s; CIMValue cv; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ALIAS_IDENTIFIER: t = jj_consume_token(ALIAS_IDENTIFIER); comp.curValues.addElement(comp.getInstanceName(t.image)); cv = new CIMValue(comp.curValues.firstElement()); comp.curPropRefEl.setValue(cv); comp.curValues = new MofcCIMValue(); break; case STRING_VALUE: s = objectPath(); comp.curValues.addElement(new String(s)); cv = new CIMValue(comp.curValues.firstElement()); comp.curPropRefEl.setValue(cv); comp.curValues = new MofcCIMValue(); break; default: jj_la1[30] = jj_gen; } } /* // ------------------------------------------------------------------------ // Method Declaration // (set methods) // (Part) // ------------------------------------------------------------------------ */ final public void methodDeclaration() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: case DT_REAL32: case DT_REAL64: case DT_CHAR16: case DT_STR: case DT_BOOL: case DT_DATETIME: methodHead(); methodBody(); methodTail(); break; case OPEN_SQU_BRA: qualifierList(); methodHead(); methodBody(); methodTail(); break; default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void methodHead() throws ParseException, CIMException { dataType(); methodName(); comp.curLevel = "METHOD"; comp.curMethodEl.setType(comp.curType); if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.qualifiers = new Vector(); comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curMethodEl.getName()); } else comp.assignMethodQualifiers(); } final public void methodBody() throws ParseException, CIMException { if (jj_2_3(2)) { jj_consume_token(OPEN_BRA); methodParameterList(); jj_consume_token(CLOSE_BRA); comp.assignMethodParameters(); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_BRA: jj_consume_token(OPEN_BRA); jj_consume_token(CLOSE_BRA); break; default: jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } final public void methodTail() throws ParseException { jj_consume_token(SEMICOLON); comp.addMethod(); //comp.curLevel=""; comp.erroneousPart=false; } final public void methodName() throws ParseException, CIMException { String s; s = nameToken(); comp.assignFeatureName(s); } final public void methodParameterList() throws ParseException, CIMException { parameter(); comp.addParameter(); label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[33] = jj_gen; break label_7; } jj_consume_token(COMMA); parameter(); comp.addParameter(); } } /* // ------------------------------------------------------------------------ // MethodParameter Declaration // (set parameters) // (Part) // ------------------------------------------------------------------------ */ final public void parameter() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: case DT_REAL32: case DT_REAL64: case DT_CHAR16: case DT_STR: case DT_BOOL: case DT_DATETIME: case IDENTIFIER: parameterHead(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_SQU_BRA: parameterBody(); break; default: jj_la1[34] = jj_gen; ; } parameterTail(); break; case OPEN_SQU_BRA: qualifierList(); parameterHead(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case OPEN_SQU_BRA: parameterBody(); break; default: jj_la1[35] = jj_gen; ; } parameterTail(); break; default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void parameterHead() throws ParseException, CIMException { parameterDataType(); parameterName(); comp.curLevel= "PARAMETER"; if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.qualifiers = new Vector(); comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curParameterEl.getName()); } else comp.assignParameterQualifiers(); } final public void parameterBody() throws ParseException, CIMException { array(); int simpleType = comp.curType.getType(); if(comp.size == CIMDataType.SIZE_UNLIMITED && simpleType == CIMDataType.REFERENCE) { comp.curType = new CIMDataType( comp.curType.getRefClassName(), comp.size); } else { comp.curType = new CIMDataType(CIMDataType.findArrayType(simpleType), comp.size); } comp.curParameterEl.setType(comp.curType); } final public void parameterTail() throws ParseException { } final public void parameterDataType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: case DT_REAL32: case DT_REAL64: case DT_CHAR16: case DT_STR: case DT_BOOL: case DT_DATETIME: dataType(); comp.curParameterEl.setType(comp.curType); break; case IDENTIFIER: objectRef(); comp.curParameterEl.setType(comp.curType); break; default: jj_la1[37] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void parameterName() throws ParseException, CIMException { String s; s = nameToken(); comp.assignParameterName(s); } /* // ------------------------------------------------------------------------ // Instance Declaration // (set instances) // (Unit) // ------------------------------------------------------------------------ */ final public void instanceDeclaration() throws ParseException, CIMException { instanceHead(); instanceBody(); instanceTail(); } final public void instanceHead() throws ParseException, CIMException { jj_consume_token(INSTANCE); jj_consume_token(OF); instanceClassName(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AS: instanceAlias(); break; default: jj_la1[38] = jj_gen; ; } comp.curLevel= "INSTANCE"; if (comp.erroneousQualifierList) { comp.erroneousUnit=true; comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curInstanceEl.getObjectPath().toString()); } else comp.assignInstanceQualifiers(); } final public void instanceBody() throws ParseException, CIMException { jj_consume_token(OPEN_CUR_BRA); instancePropertyList(); jj_consume_token(CLOSE_CUR_BRA); } final public void instanceTail() throws ParseException, CIMException { jj_consume_token(SEMICOLON); comp.addInstance(); //comp.curLevel=""; comp.erroneousUnit=false; comp.erroneousPart=false; } final public void instanceClassName() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); comp.assignInstanceClass(t.image); } final public void instanceAlias() throws ParseException { Token t; jj_consume_token(AS); t = jj_consume_token(ALIAS_IDENTIFIER); comp.assignInstanceAlias(t.image); } final public void instancePropertyList() throws ParseException, CIMException { label_8: while (true) { instanceProperty(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: case OPEN_SQU_BRA: ; break; default: jj_la1[39] = jj_gen; break label_8; } } } final public void instanceProperty() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IDENTIFIER: instancePropertyBody(); break; case OPEN_SQU_BRA: qualifierList(); instancePropertyBody(); break; default: jj_la1[40] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void instancePropertyBody() throws ParseException, CIMException { Token t; t = jj_consume_token(IDENTIFIER); comp.curLevel= "INSTANCEPROPERTY"; comp.curIPropertyEl.setName(t.image); if(!comp.erroneousUnit) { if (comp.erroneousQualifierList) { comp.reportError("ERR_SEM", "ERR_QUALIFIER_LIST_STR", 1, comp.curPropRefEl.getName()); } else comp.assignInstancePropertyQualifiers(); } jj_consume_token(EQUAL); initializer(); comp.addInstanceProperty(); comp.erroneousPart=false; jj_consume_token(SEMICOLON); } /* // ------------------------------------------------------------------------ // Data Type Declaration // (set size , curType) // (Part) // ------------------------------------------------------------------------ */ final public void objectRef() throws ParseException { Token t; t = jj_consume_token(IDENTIFIER); jj_consume_token(REF); comp.curType=new CIMDataType(t.image); comp.size=CIMDataType.SIZE_SINGLE; } final public String objectPath() throws ParseException { String s; s = multiStringValue(); {if (true) return s;} throw new Error("Missing return statement in function"); } final public void array() throws ParseException { Token t; jj_consume_token(OPEN_SQU_BRA); comp.size=CIMDataType.SIZE_UNLIMITED; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case POS_DECIMAL_VALUE: t = jj_consume_token(POS_DECIMAL_VALUE); comp.size=Integer.parseInt(t.image); break; default: jj_la1[41] = jj_gen; ; } jj_consume_token(CLOSE_SQU_BRA); } final public void dataType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: case DT_SINT8: case DT_UINT16: case DT_SINT16: case DT_UINT32: case DT_SINT32: case DT_UINT64: case DT_SINT64: intDataType(); break; case DT_REAL32: case DT_REAL64: realDataType(); break; case DT_CHAR16: jj_consume_token(DT_CHAR16); comp.size=CIMDataType.SIZE_SINGLE; comp.curType= new CIMDataType(CIMDataType.CHAR16); break; case DT_STR: jj_consume_token(DT_STR); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.STRING); break; case DT_BOOL: jj_consume_token(DT_BOOL); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.BOOLEAN); break; case DT_DATETIME: jj_consume_token(DT_DATETIME); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.DATETIME); break; default: jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void intDataType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_UINT8: jj_consume_token(DT_UINT8); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.UINT8); break; case DT_SINT8: jj_consume_token(DT_SINT8); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.SINT8); break; case DT_UINT16: jj_consume_token(DT_UINT16); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.UINT16); break; case DT_SINT16: jj_consume_token(DT_SINT16); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.SINT16); break; case DT_UINT32: jj_consume_token(DT_UINT32); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.UINT32); break; case DT_SINT32: jj_consume_token(DT_SINT32); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.SINT32); break; case DT_UINT64: jj_consume_token(DT_UINT64); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.UINT64); break; case DT_SINT64: jj_consume_token(DT_SINT64); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.SINT64); break; default: jj_la1[43] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } final public void realDataType() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DT_REAL32: jj_consume_token(DT_REAL32); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.REAL32); break; case DT_REAL64: jj_consume_token(DT_REAL64); comp.size=CIMDataType.SIZE_SINGLE; comp.curType=new CIMDataType(CIMDataType.REAL64); break; default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } /* // ------------------------------------------------------------------------ // Default + Initialzer Declaration // (set curValues, curValueType) // (Part) // ------------------------------------------------------------------------ */ final public void initializer() throws ParseException, CIMException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRUE_VALUE: case FALSE_VALUE: case NULL_VALUE: case BINARY_VALUE: case OCTAL_VALUE: case POS_DECIMAL_VALUE: case NEG_DECIMAL_VALUE: case ZERO: case HEX_VALUE: case REAL_VALUE: case STRING_VALUE: case CHAR_VALUE: case ALIAS_IDENTIFIER: simpleInitializer(); if (!comp.erroneousPart) { Object o = comp.curValues.vVector.firstElement(); comp.curIPropertyEl.setValue(new CIMValue(o)); } com... [truncated message content] |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:10
|
Update of /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/transport In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/java/wbem/javax/wbem/client/adapter/http/transport Modified Files: Tag: jws1-02-branch HttpServerEndpoint.java HttpServerRequestHandler.java Added Files: Tag: jws1-02-branch HttpSslServerSocketFactory.java Log Message: Index: HttpServerEndpoint.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/transport/Attic/HttpServerEndpoint.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** HttpServerEndpoint.java 12 Jul 2004 04:19:10 -0000 1.7 --- HttpServerEndpoint.java 9 Nov 2006 19:43:59 -0000 1.7.2.1 *************** *** 57,60 **** --- 57,63 ---- } + protected Listener m_listener; + protected HttpSslServerSocketFactory m_sslSockFactory = null; + /** local host name to fill in to corresponding HttpEndpoints */ private final String h; *************** *** 68,72 **** */ public HttpServerEndpoint(String host, int port) { ! this(host, port, false); } --- 71,75 ---- */ public HttpServerEndpoint(String host, int port) { ! this(host, port, null); } *************** *** 74,92 **** * Constructs a new instance. */ ! public HttpServerEndpoint(String host, int port, boolean ssl) { ! useSSL = ssl; ! if (useSSL) { ! Debug.trace3("HttpServerEndpoint: using SSL"); ! } ! if (host == null) { ! throw new NullPointerException(); ! } ! if (port < 0 || port > 0xFFFF) { ! throw new IllegalArgumentException( ! "port number out of range: " + port); ! } ! h = host; ! p = port; } /** --- 77,120 ---- * Constructs a new instance. */ ! public HttpServerEndpoint(String host, int port, HttpSslServerSocketFactory sslSockFactory) { ! if(null == sslSockFactory){ ! useSSL = false; ! }else{ ! m_sslSockFactory = sslSockFactory; ! useSSL = true; ! } ! if ((m_sslSockFactory != null) && m_sslSockFactory.isSslEnabled()) { ! Debug.trace3("HttpServerEndpoint: using SSL"); ! } ! if (host == null) { ! throw new NullPointerException(); ! } ! if (port < 0 || port > 0xFFFF) { ! throw new IllegalArgumentException( ! "port number out of range: " + port); ! } ! h = host; ! p = port; } + + + // /** + // * Constructs a new instance. + // */ + // public HttpServerEndpoint(String host, int port, boolean ssl) { + // useSSL = ssl; + // if (useSSL) { + // Debug.trace3("HttpServerEndpoint: using SSL"); + // } + // if (host == null) { + // throw new NullPointerException(); + // } + // if (port < 0 || port > 0xFFFF) { + // throw new IllegalArgumentException( + // "port number out of range: " + port); + // } + // h = host; + // p = port; + // } /** *************** *** 120,124 **** ServerSocket ssock; // if useSSL is true, use secure sockets ! if (useSSL) { ServerSocketFactory ssf = SSLServerSocketFactory.getDefault(); ssock = ssf.createServerSocket(p); --- 148,155 ---- ServerSocket ssock; // if useSSL is true, use secure sockets ! if ((m_sslSockFactory != null) && m_sslSockFactory.isSslEnabled()) { ! ssock = m_sslSockFactory.getSSLServerSocket(p); ! } ! else if (useSSL) { ServerSocketFactory ssf = SSLServerSocketFactory.getDefault(); ssock = ssf.createServerSocket(p); *************** *** 127,134 **** } ! Listener listener = new Listener(handler, ssock); ! systemThreadPool.execute(listener, "HttpServerEndpoint Accept (port " + p + ")"); ! return listener; } --- 158,165 ---- } ! m_listener = new Listener(handler, ssock); ! systemThreadPool.execute(m_listener, "HttpServerEndpoint Accept (port " + p + ")"); ! return m_listener; } *************** *** 308,310 **** --- 339,347 ---- } } + /** + * Shuts down all the listeners to this ServerEndPoint + */ + public void shutdown() { + m_listener.close(); + } } Index: HttpServerRequestHandler.java =================================================================== RCS file: /cvsroot/wbemservices/open/java/wbem/javax/wbem/client/adapter/http/transport/Attic/HttpServerRequestHandler.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** HttpServerRequestHandler.java 12 Jul 2004 04:19:10 -0000 1.4 --- HttpServerRequestHandler.java 9 Nov 2006 19:43:59 -0000 1.4.2.1 *************** *** 38,43 **** import org.w3c.dom.Document; - import org.apache.crimson.tree.XmlDocument; - import javax.xml.parsers.*; --- 38,41 ---- *************** *** 97,101 **** } ! protected XmlDocument getXmlDocument(InboundRequest request) throws IOException, SAXException { DocumentBuilder builder = null; --- 95,99 ---- } ! protected Document getXmlDocument(InboundRequest request) throws IOException, SAXException { DocumentBuilder builder = null; *************** *** 104,107 **** --- 102,106 ---- try { builder = dbf.newDocumentBuilder(); + // TODO: Set a resolver?? } catch (Exception e) { } *************** *** 113,117 **** in.setByteStream(request.getRequestInputStream()); Document d = builder.parse(in); ! return (XmlDocument)d; } --- 112,116 ---- in.setByteStream(request.getRequestInputStream()); Document d = builder.parse(in); ! return d; } --- NEW FILE: HttpSslServerSocketFactory.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *WBEM Solutions, Inc. * *Portions created by: Sun Microsystems, Inc. *are Copyright (c) 2001 Sun Microsystems, Inc. * *All Rights Reserved. * *Contributor(s): *Hewlett Packard Co. * */ package javax.wbem.client.adapter.http.transport; import javax.wbem.cim.CIMInstance; import javax.wbem.cim.CIMValue; import javax.wbem.client.Debug; import javax.net.ssl.*; import java.security.KeyStore; import java.security.SecureRandom; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.net.InetAddress; /** * @author cj2 */ public class HttpSslServerSocketFactory { private final static String SSLENABLE = "SSLEnable"; private final static String SSLAUTHENTICATION = "SSLAuthentication"; private final static String SSLKEYSTOREFILE = "SSLKeyStoreFile"; private final static String SSLKEYSTOREPASS = "SSLKeyStorePass"; private final static String SSLKEYSTOREKEYPASS = "SSLKeyStoreKeyPass"; private final static String SSLTRUSTSTOREFILE = "SSLTrustStoreFile"; private final static String SSLTRUSTSTOREPASS = "SSLTrustStorePass"; private final static String KEY_MGMT_ALGORITHM = "sunx509"; private final static String KEYSTORE_TYPE = "JKS"; private final static String SOCKET_PROTOCOL = "TLS"; private final static String DamienString = "testingCompile"; private boolean sslEnable = true; private boolean sslAuthentication = false; private String keyStoreFile; private String keyStorePassword; private String keyStoreKeyPassword; private String trustStoreFile; private String trustStorePassword; private SSLContext sslContext; private SSLServerSocketFactory sslServSockFactory; private KeyStore keyStore; private KeyManager[] keyManager = null; private KeyStore trustStore; private TrustManager[] trustManager = null; private static HttpSslServerSocketFactory m_this = null; public HttpSslServerSocketFactory() { m_this = this; turnOffSsl(); } public HttpSslServerSocketFactory(CIMInstance inst) { m_this = this; if (inst != null) { try { // initialize settings String sslAuthStr = System.getProperty("SSLAuthentication"); if ((sslAuthStr != null) && sslAuthStr.toLowerCase().equals("true")) { sslAuthentication = true; } keyStoreKeyPassword = System.getProperty("SSLKeyStoreKeyPass"); keyStoreFile = System.getProperty("javax.net.ssl.keyStore"); keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword"); trustStoreFile = System.getProperty("javax.net.ssl.trustStore"); trustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword"); } catch (NullPointerException e) { Debug.trace2("Got exception getting SSL info. defaulting to no SSL", e); turnOffSsl(); } // try and set up the proper SSLContext try { // load up the keystore keyStore = KeyStore.getInstance(KEYSTORE_TYPE); keyStore.load(new FileInputStream(keyStoreFile), keyStorePassword.toCharArray()); KeyManagerFactory kmf = KeyManagerFactory.getInstance(KEY_MGMT_ALGORITHM); kmf.init(keyStore, keyStoreKeyPassword.toCharArray()); keyManager = kmf.getKeyManagers(); // load up the truststore trustStore = KeyStore.getInstance(KEYSTORE_TYPE); if (sslAuthentication) { trustStore.load(new FileInputStream(trustStoreFile), trustStorePassword.toCharArray()); } else { trustStore.load(null, null); } TrustManagerFactory tmf = TrustManagerFactory.getInstance(KEY_MGMT_ALGORITHM); tmf.init(trustStore); trustManager = tmf.getTrustManagers(); // setup SSLContext based on these stores sslContext = SSLContext.getInstance(SOCKET_PROTOCOL); sslContext.init(keyManager, trustManager, new SecureRandom()); sslServSockFactory = sslContext.getServerSocketFactory(); } catch (Exception e) { Debug.trace2("Problem setting up SSLContext. Check your SSL Settings!", e); turnOffSsl(); } } else { turnOffSsl(); } } public static HttpSslServerSocketFactory getInstance() { return m_this; } /** * Turn off SSL! */ private void turnOffSsl() { sslEnable = false; sslAuthentication = false; keyStoreFile = null; keyStorePassword = null; keyStoreKeyPassword = null; trustStoreFile = null; trustStorePassword = null; sslServSockFactory = null; } /** * Returns an SSLServer socket with authentication (if specified) * * @param port * @return */ public SSLServerSocket getSSLServerSocket(int port, InetAddress addr) { if (sslServSockFactory != null) { SSLServerSocket ssock = null; try { //InetAddress addr = InetAddress.getByAddress(new byte [] {10,1,1,10}); ssock = (SSLServerSocket) sslServSockFactory.createServerSocket(port, 64, addr); ssock.setEnabledCipherSuites(getEncryptingCipherSuites(sslContext, true)); ssock.setNeedClientAuth(sslAuthentication); return ssock; } catch (IOException e) { Debug.trace2("Could not create SSL ServerSocket", e); return null; } } else { return null; } } /** * Returns an SSLServer socket with authentication (if specified) * * @param port * @return */ public SSLServerSocket getSSLServerSocket(int port) { if (sslServSockFactory != null) { SSLServerSocket ssock = null; try { ssock = (SSLServerSocket) sslServSockFactory.createServerSocket(port); ssock.setEnabledCipherSuites(getEncryptingCipherSuites(sslContext, true)); ssock.setNeedClientAuth(sslAuthentication); return ssock; } catch (IOException e) { Debug.trace2("Could not create SSL ServerSocket", e); return null; } } else { return null; } } /** * Given the SSLContext and whether we want authentication or not, get a * list of cipher suites (in string format). * Note: we only use cipher suites that encrypt data over the wire * * @param sslc * @param authCipherSuites * @return a string array containing the names of the cipher suites */ private String[] getEncryptingCipherSuites(SSLContext sslc, boolean authCipherSuites) { String[] supportedSuites = sslc.getServerSocketFactory().getSupportedCipherSuites(); ArrayList list = new ArrayList(); String cipherSuite = null; for (int i = 0; i < supportedSuites.length; i++) { cipherSuite = supportedSuites[i]; if (((cipherSuite.indexOf("_anon_") == -1) && authCipherSuites) || ((cipherSuite.indexOf("_anon_") != -1) && !authCipherSuites)) { // remove the non-encrypting suites if (cipherSuite.indexOf("WITH_NULL") == -1) { list.add(supportedSuites[i]); } } } String[] result = new String[list.size()]; for (int i = 0; i < list.size(); i++) { result[i] = (String) list.get(i); } return result; } public boolean isSslEnabled() { return sslEnable; } } |
Update of /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/adapters/client/http In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/org/wbemservices/wbem/cimom/adapters/client/http Modified Files: Tag: jws1-02-branch CIMRequestHandler.java HttpIndicationHandler.java HttpService.java XmlResponder.java Log Message: Index: XmlResponder.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/adapters/client/http/XmlResponder.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** XmlResponder.java 27 Sep 2004 04:16:05 -0000 1.12 --- XmlResponder.java 9 Nov 2006 19:44:00 -0000 1.12.2.1 *************** *** 46,54 **** import javax.wbem.cimxml.CIMXml; import javax.wbem.cimxml.CIMXmlFactory; import javax.wbem.cimxml.XmlResponse; ! import org.apache.crimson.tree.ElementNode; ! import org.apache.crimson.tree.TreeWalker; ! import org.apache.crimson.tree.XmlDocument; import org.w3c.dom.Node; import org.w3c.dom.NodeList; --- 46,55 ---- import javax.wbem.cimxml.CIMXml; import javax.wbem.cimxml.CIMXmlFactory; + import javax.wbem.cimxml.NodeTreeWalker; import javax.wbem.cimxml.XmlResponse; + import javax.xml.parsers.ParserConfigurationException; ! import org.w3c.dom.Document; ! import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; *************** *** 70,80 **** } ! XmlDocument getResponse(XmlDocument request, PasswordAuthentication auth) ! throws IOException, SAXException { return xmlInst.getXMLResponse(this, request, auth); } ! void getResponse(XmlDocument request, PasswordAuthentication auth, DataOutputStream out) --- 71,81 ---- } ! Document getResponse(Document request, PasswordAuthentication auth) ! throws IOException, SAXException, ParserConfigurationException { return xmlInst.getXMLResponse(this, request, auth); } ! void getResponse(Document request, PasswordAuthentication auth, DataOutputStream out) *************** *** 111,131 **** MalformedURLException { String classname = ""; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNextElement(null)) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.IPARAMVALUE) || nodename.equals(CIMXml.PARAMVALUE)) { if ("ClassName".equals( ! ((ElementNode)node).getAttribute("NAME"))) { Node n = getFirstChildElement(node); if (n != null) { ! classname = ((ElementNode)n).getAttribute("NAME"); } } } else if (nodename.equals(CIMXml.INSTANCE) || nodename.equals(CIMXml.INSTANCENAME)) { ! classname = ((ElementNode)node).getAttribute("CLASSNAME"); } } --- 112,132 ---- MalformedURLException { String classname = ""; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.IPARAMVALUE) || nodename.equals(CIMXml.PARAMVALUE)) { if ("ClassName".equals( ! ((Element)node).getAttribute("NAME"))) { Node n = getFirstChildElement(node); if (n != null) { ! classname = ((Element)n).getAttribute("NAME"); } } } else if (nodename.equals(CIMXml.INSTANCE) || nodename.equals(CIMXml.INSTANCENAME)) { ! classname = ((Element)node).getAttribute("CLASSNAME"); } } *************** *** 184,191 **** throws IOException, CIMException { String nodename = null; ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNext()) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.LOCALNAMESPACEPATH)) { --- 185,192 ---- throws IOException, CIMException { String nodename = null; ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { nodename = node.getNodeName(); if (nodename.equals(CIMXml.LOCALNAMESPACEPATH)) { *************** *** 199,208 **** protected void setLocalNameSpacePath(Node node) { ! TreeWalker walker = new TreeWalker(node); String ns = ""; ! for (node = walker.getCurrent(); node != null; node = walker.getNextElement(CIMXml.NAMESPACE)) { ! String s = ((ElementNode)node).getAttribute("NAME"); ns = (ns == "" ? s : ns + "/" + s); } --- 200,209 ---- protected void setLocalNameSpacePath(Node node) { ! NodeTreeWalker walker = new NodeTreeWalker(node); String ns = ""; ! for (node = walker.getCurrentNode(); node != null; node = walker.getNextElement(CIMXml.NAMESPACE)) { ! String s = ((Element)node).getAttribute("NAME"); ns = (ns == "" ? s : ns + "/" + s); } *************** *** 216,220 **** void setIParamValue(Node node) throws CIMException { ! String paramname = ((ElementNode)node).getAttribute("NAME"); Node newValueNode = null; if (paramname.equalsIgnoreCase("AssocClass")) { --- 217,221 ---- void setIParamValue(Node node) throws CIMException { ! String paramname = ((Element)node).getAttribute("NAME"); Node newValueNode = null; if (paramname.equalsIgnoreCase("AssocClass")) { *************** *** 244,251 **** this.className = new CIMObjectPath(modifiedClass.getName()); } else if (paramname.equalsIgnoreCase("ModifiedInstance")) { ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNextElement(null)) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.INSTANCENAME)) { --- 245,252 ---- this.className = new CIMObjectPath(modifiedClass.getName()); } else if (paramname.equalsIgnoreCase("ModifiedInstance")) { ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { String nodename = node.getNodeName(); if (nodename.equals(CIMXml.INSTANCENAME)) { *************** *** 272,276 **** Node this_node = node; int i = 0; ! TreeWalker walker = new TreeWalker(node); for (node = walker.getNextElement(CIMXml.VALUE); node != null; --- 273,277 ---- Node this_node = node; int i = 0; ! NodeTreeWalker walker = new NodeTreeWalker(node); for (node = walker.getNextElement(CIMXml.VALUE); node != null; *************** *** 281,285 **** this.propertyList = new String[i]; i = 0; ! walker = new TreeWalker(node); for (node = walker.getNextElement(CIMXml.VALUE); node != null; --- 282,286 ---- this.propertyList = new String[i]; i = 0; ! walker = new NodeTreeWalker(node); for (node = walker.getNextElement(CIMXml.VALUE); node != null; *************** *** 697,702 **** private void setParamValue(Node node) throws CIMException { ! String type = ((ElementNode)node).getAttribute("PARAMTYPE"); ! String name = ((ElementNode)node).getAttribute("NAME"); if (name == null || name.equals("string") || --- 698,703 ---- private void setParamValue(Node node) throws CIMException { ! String type = ((Element)node).getAttribute("PARAMTYPE"); ! String name = ((Element)node).getAttribute("NAME"); if (name == null || name.equals("string") || *************** *** 725,732 **** String nodename = null; vIn.clear(); ! TreeWalker walker = new TreeWalker(node); ! for (node = walker.getCurrent(); node != null; ! node = walker.getNext()) { nodename = node.getNodeName(); // BUGFIX. 03/28/02 --- 726,733 ---- String nodename = null; vIn.clear(); ! NodeTreeWalker walker = new NodeTreeWalker(node); ! for (node = walker.getCurrentNode(); node != null; ! node = walker.nextNode()) { nodename = node.getNodeName(); // BUGFIX. 03/28/02 *************** *** 735,740 **** // INSTANCEPATH element to truly discard the node if (nodename.equals(CIMXml.VALUE_REFERENCE)) { ! node = walker.getNext(); ! node = walker.getNext(); walker.removeCurrent(); } else if (nodename.equals(CIMXml.CLASSNAME)) { --- 736,741 ---- // INSTANCEPATH element to truly discard the node if (nodename.equals(CIMXml.VALUE_REFERENCE)) { ! node = walker.nextNode(); ! node = walker.nextNode(); walker.removeCurrent(); } else if (nodename.equals(CIMXml.CLASSNAME)) { Index: CIMRequestHandler.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/adapters/client/http/CIMRequestHandler.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** CIMRequestHandler.java 14 Mar 2004 15:45:35 -0000 1.5 --- CIMRequestHandler.java 9 Nov 2006 19:44:00 -0000 1.5.2.1 *************** *** 37,41 **** import javax.wbem.client.adapter.http.transport.InboundRequest; ! import org.apache.crimson.tree.XmlDocument; import org.wbemservices.wbem.cimom.CIMOMServer; import org.wbemservices.wbem.cimom.security.UserPasswordProvider; --- 37,41 ---- import javax.wbem.client.adapter.http.transport.InboundRequest; ! import org.w3c.dom.Document; import org.wbemservices.wbem.cimom.CIMOMServer; import org.wbemservices.wbem.cimom.security.UserPasswordProvider; *************** *** 63,67 **** + getRealm() + "\""); try { ! XmlDocument xmlDoc = getXmlDocument(request); } catch (Exception e) {} --- 63,67 ---- + getRealm() + "\""); try { ! Document xmlDoc = getXmlDocument(request); } catch (Exception e) {} *************** *** 82,86 **** public void handleRequest(InboundRequest request) { try { ! XmlDocument xmlDoc = getXmlDocument(request); DataOutputStream out = new DataOutputStream(request.getResponseOutputStream()); --- 82,86 ---- public void handleRequest(InboundRequest request) { try { ! Document xmlDoc = getXmlDocument(request); DataOutputStream out = new DataOutputStream(request.getResponseOutputStream()); *************** *** 90,94 **** DataOutputStream out = new DataOutputStream(request.getResponseOutputStream()); - e.printStackTrace(); Exception x = e.getException(); String message = "Parse Error with Request:\n"; --- 90,93 ---- *************** *** 104,112 **** do500Error(out, "XML Parsing error: <b>" + message + "</b>"); ! System.out.println(message); } catch (IOException e) { ! e.printStackTrace(); } catch (Exception e) { ! e.printStackTrace(); } } --- 103,112 ---- do500Error(out, "XML Parsing error: <b>" + message + "</b>"); ! Debug.trace1("HTTP: CIMRequestHandler.handleRequest: " + message); ! Debug.trace1("HTTP: CIMRequestHandler.handleRequest", e); } catch (IOException e) { ! Debug.trace1("HTTP: CIMRequestHandler.handleRequest", e); } catch (Exception e) { ! Debug.trace1("HTTP: CIMRequestHandler.handleRequest", e); } } *************** *** 120,124 **** } catch (Exception e) { Debug.trace1("Http: error getting password provider", e); - // e.printStackTrace(); throw e; } --- 120,123 ---- *************** *** 203,207 **** } ! private void rpc(XmlDocument request, PasswordAuthentication auth, DataOutputStream out) { try { --- 202,206 ---- } ! private void rpc(Document request, PasswordAuthentication auth, DataOutputStream out) { try { *************** *** 209,216 **** rsp.getResponse(request, auth, out); } catch (IOException e) { ! //e.printStackTrace(); } catch (SAXException e) { ! //e.printStackTrace(); } } ! } \ No newline at end of file --- 208,215 ---- rsp.getResponse(request, auth, out); } catch (IOException e) { ! Debug.trace1("CIMRequstHandler: rpc", e); } catch (SAXException e) { ! Debug.trace1("CIMRequstHandler: rpc", e); } } ! } Index: HttpService.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/adapters/client/http/HttpService.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** HttpService.java 20 Mar 2004 18:07:05 -0000 1.7 --- HttpService.java 9 Nov 2006 19:44:00 -0000 1.7.2.1 *************** *** 41,45 **** --- 41,47 ---- import javax.wbem.client.Debug; import javax.wbem.client.adapter.http.transport.HttpServerEndpoint; + import javax.wbem.client.adapter.http.transport.HttpSslServerSocketFactory; + import org.wbemservices.wbem.bootstrap.StartWBEMServices; import org.wbemservices.wbem.cimom.CIMOMServer; import org.wbemservices.wbem.cimom.DeliveryHandler; *************** *** 75,78 **** --- 77,81 ---- private final String VALIDATED = "CIMValidated"; private final String WQL1 = "WBEMSQL1"; + private final String SSLENABLE = "SSLEnable"; protected String communicationMechanismName = "cim-xml"; private String servername; *************** *** 83,86 **** --- 86,90 ---- private CIMObjectPath commMechOp; boolean useSSL = false; + private static boolean sslEnable; /** *************** *** 186,203 **** } try { CIMValue cv = cpa.getProperty(PORT).getValue(); port = ((UnsignedInt32)cv.getValue()).intValue(); ! } catch (NullPointerException ex) { ! Debug.trace2("Got exception getting the HTTP port number", ex); ! } ! try { ! CIMRequestHandler handler = ! new CIMRequestHandler(cimom, servername); ! serverEndPoint = new HttpServerEndpoint(servername, port, useSSL); ! serverEndPoint.listen(handler); } catch (Exception ex) { ! Debug.trace2("Got exception when starting Http service", ex); ! return -1; } return 0; } --- 190,235 ---- } try { + String forceSSL = System.getProperty(StartWBEMServices.SSLAUTHENTICATION); + if(null != forceSSL){ + if(forceSSL.equalsIgnoreCase("true") || forceSSL.equalsIgnoreCase("encrypt") ){ + cpa.setProperty(SSLENABLE,(new CIMValue(new Boolean(true)))); + } + } + String forcePort = System.getProperty(StartWBEMServices.LISTENPORT); + if(null != forcePort){ + cpa.setProperty(PORT,(new CIMValue(new UnsignedInt32(forcePort)))); + } + CIMValue cv = cpa.getProperty(PORT).getValue(); port = ((UnsignedInt32)cv.getValue()).intValue(); ! cv = cpa.getProperty(SSLENABLE).getValue(); ! sslEnable = ((Boolean) cv.getValue()).booleanValue(); } catch (Exception ex) { ! Debug.trace2("Got exception getting the HTTP port number or sslEnable", ex); } + try { + CIMRequestHandler handler = + new CIMRequestHandler(cimom, servername); + + + if (sslEnable) { + HttpSslServerSocketFactory sslSockFactory = new HttpSslServerSocketFactory(cpa); + serverEndPoint = new HttpServerEndpoint(servername, port, sslSockFactory); + //check and make sure ssl settings were setup correctly + //if so, listen, if not, don't listen at all + if (sslSockFactory.isSslEnabled()) { + serverEndPoint.listen(handler); + } else { + Debug.trace1("Something is wrong with SSL settings. Did you create a keystore?"); + } + } else { + serverEndPoint = new HttpServerEndpoint(servername, port, null); + serverEndPoint.listen(handler); + } + + } catch (Exception ex) { + Debug.trace2("Got exception when starting Http service", ex); + return -1; + } return 0; } Index: HttpIndicationHandler.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/adapters/client/http/HttpIndicationHandler.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** HttpIndicationHandler.java 25 Sep 2003 03:03:15 -0000 1.4 --- HttpIndicationHandler.java 9 Nov 2006 19:44:00 -0000 1.4.2.1 *************** *** 19,23 **** * *Portions created by: Sun Microsystems, Inc. ! *are Copyright © 2002 Sun Microsystems, Inc. * *All Rights Reserved. --- 19,23 ---- * *Portions created by: Sun Microsystems, Inc. ! *are Copyright (c) 2002 Sun Microsystems, Inc. * *All Rights Reserved. *************** *** 28,73 **** package org.wbemservices.wbem.cimom.adapters.client.http; import javax.wbem.cim.CIMException; import javax.wbem.cim.CIMInstance; - import javax.wbem.client.Debug; - import javax.wbem.client.CIMEvent; - import javax.wbem.client.CIMExportIndication; import javax.wbem.cimxml.CIMXml; import javax.wbem.cimxml.CIMXmlFactory; import javax.wbem.client.adapter.http.transport.HttpClientConnection; import javax.wbem.client.adapter.http.transport.HttpClientSocketFactory; - import javax.wbem.client.adapter.http.transport.OutboundRequest; import javax.wbem.client.adapter.http.transport.HttpSocketFactory; ! ! import javax.xml.parsers.*; ! ! import org.wbemservices.wbem.cimom.EventService; ! import org.wbemservices.wbem.cimom.CommonServerSecurityContext; ! ! import org.apache.crimson.tree.XmlDocument; ! ! import java.net.URL; ! import java.net.HttpURLConnection; ! import java.io.Writer; ! import java.io.PrintStream; ! import java.io.FileOutputStream; ! import java.io.OutputStreamWriter; ! import java.io.InputStream; ! import java.io.IOException; ! import java.util.Map; ! import java.util.HashMap; ! import java.util.Iterator; ! import java.util.Random; import org.w3c.dom.Document; ! ! import org.xml.sax.SAXException; import org.xml.sax.InputSource; ! ! /** A simple HTTP server, for serving up jar and class files. */ ! public class HttpIndicationHandler implements ! EventService.IndicationHandler { private final static String ns = --- 28,75 ---- package org.wbemservices.wbem.cimom.adapters.client.http; + import java.io.File; + import java.io.FileOutputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.PrintStream; + import java.net.HttpURLConnection; + import java.net.MalformedURLException; + import java.net.URL; + import java.util.HashMap; + import java.util.Iterator; + import java.util.Map; + import java.util.Random; + import javax.wbem.cim.CIMException; import javax.wbem.cim.CIMInstance; import javax.wbem.cimxml.CIMXml; import javax.wbem.cimxml.CIMXmlFactory; + import javax.wbem.client.CIMEvent; + import javax.wbem.client.CIMExportIndication; import javax.wbem.client.adapter.http.transport.HttpClientConnection; import javax.wbem.client.adapter.http.transport.HttpClientSocketFactory; import javax.wbem.client.adapter.http.transport.HttpSocketFactory; ! import javax.wbem.client.adapter.http.transport.OutboundRequest; ! import javax.wbem.provider.CIMProvider; ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import javax.xml.parsers.ParserConfigurationException; ! import javax.xml.transform.OutputKeys; ! import javax.xml.transform.Transformer; ! import javax.xml.transform.TransformerConfigurationException; ! import javax.xml.transform.TransformerException; ! import javax.xml.transform.TransformerFactory; ! import javax.xml.transform.dom.DOMSource; ! import javax.xml.transform.stream.StreamResult; import org.w3c.dom.Document; ! import org.w3c.dom.DocumentType; ! import org.wbemservices.wbem.cimom.CommonServerSecurityContext; ! import org.wbemservices.wbem.cimom.EventService; import org.xml.sax.InputSource; ! import org.xml.sax.SAXException; /** A simple HTTP server, for serving up jar and class files. */ ! public class HttpIndicationHandler implements EventService.IndicationHandler { private final static String ns = *************** *** 78,81 **** --- 80,84 ---- private boolean debug = false; private String prefix = ""; + private final static String defaultScheme = "http"; // The following enables XML tracing *************** *** 94,115 **** public void deliverEvent(CIMEvent e, CIMInstance handlerInstance) throws CIMException { ! XmlDocument request; URL dest = null; try { request = xmlImpl.getXmlRequest( ! new CIMExportIndication(e.getIndication())); ! dest = new URL((String)handlerInstance. ! getProperty("Destination").getValue().getValue()); ! deliverEventRequest(request, dest); } catch (Exception ex) { - Debug.trace1("Caught exception in HttpIndicationHandler.deliverEvent", ex); throw new CIMException(CIMException.CIM_ERR_FAILED, ex); } } ! private synchronized void deliverEventRequest(XmlDocument request, URL url) throws CIMException, IOException { ! Writer out = null; String host = url.getHost(); int port = url.getPort(); --- 97,158 ---- public void deliverEvent(CIMEvent e, CIMInstance handlerInstance) throws CIMException { ! Document request; URL dest = null; try { request = xmlImpl.getXmlRequest( ! new CIMExportIndication(e.getIndication())); ! String d = (String)handlerInstance.getProperty("Destination").getValue().getValue(); ! try { ! dest = new URL(d); ! } catch (MalformedURLException me) { ! if (d.startsWith("//")) { ! d = defaultScheme + ":" + d; ! } else { ! d = defaultScheme + "://" + d; ! } ! dest = new URL(d); ! } ! // XXX Temporary fix for problem where indications are being lost. ! // A more permanent fix of the underlying problem needs to be found. ! // If an exception is thrown, try one more time to deliver this ! // event ! try { ! deliverEventRequest(request, dest); ! } catch (Exception ex) { ! deliverEventRequest(request, dest); ! } } catch (Exception ex) { throw new CIMException(CIMException.CIM_ERR_FAILED, ex); } } ! private void writeDocumentToOutputStream(Document request, PrintStream out) { ! TransformerFactory tFactory = TransformerFactory.newInstance(); ! Transformer transformer; ! try { ! transformer = tFactory.newTransformer(); ! DocumentType docType = request.getDoctype(); ! if (docType != null) { ! String systemId =docType.getSystemId(); ! if (systemId != null) { ! String systemValue = (new File(systemId)).getName(); ! transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, ! systemValue); ! } ! } ! ! DOMSource source = new DOMSource(request); ! StreamResult result = new StreamResult(out); ! transformer.transform(source, result); ! } catch (TransformerConfigurationException e) { ! e.printStackTrace(); ! } catch (TransformerException e) { ! e.printStackTrace(); ! } ! } ! private synchronized void deliverEventRequest(Document request, URL url) throws CIMException, IOException { ! PrintStream out = null; String host = url.getHost(); int port = url.getPort(); *************** *** 127,141 **** } outRequest = conn.newRequest(url.getPath()); ! out = new OutputStreamWriter( ! outRequest.getRequestOutputStream(), "UTF8"); setRequestHeaders(outRequest, xmlImpl.getXmlRequestHeaders(request)); outRequest.endWriteHeader(); ! request.write(out); out.flush(); out.close(); break; } catch (IOException e) { - Debug.trace2("Caught IOException at HttpIndicationHandler.deliverEventRequest", e); conn.shutdown(true); conn = null; --- 170,183 ---- } outRequest = conn.newRequest(url.getPath()); ! out = new PrintStream( ! outRequest.getRequestOutputStream(), false, "UTF8"); setRequestHeaders(outRequest, xmlImpl.getXmlRequestHeaders(request)); outRequest.endWriteHeader(); ! writeDocumentToOutputStream(request, out); out.flush(); out.close(); break; } catch (IOException e) { conn.shutdown(true); conn = null; *************** *** 152,156 **** } ! XmlDocument resp = getResponse(outRequest); if (debug) { --- 194,198 ---- } ! Document resp = getResponse(outRequest); if (debug) { *************** *** 158,163 **** } } catch (SAXException e) { - Debug.trace2("Caught SAXException at HttpIndicationHandler.deliverEventRequest", e); - if (useMPost) { if (conn != null) { --- 200,203 ---- *************** *** 172,195 **** } } catch (Exception e) { - Debug.trace2("Caught Exception at HttpIndicationHandler.deliverEventRequest", e); throw new CIMException(CIMException.CIM_ERR_FAILED, e); } } ! public void ping(CIMInstance handlerInstance) ! throws CIMException { } ! private void dumpRequest(XmlDocument request, OutboundRequest outRequest) throws IOException { ! // The following appends XML trace to a file ! fout = new FileOutputStream(TRACEFILE, true); ! psout = new PrintStream(fout); ! psout.println(">>>>>>>>>>>>>>>>>>>>>>>" + " START OF REQUEST " + ">>>>>>>>>>>>>>>>>>>>>>>"); outRequest.dumpOutHeader(psout); if (request != null) { ! request.write(psout); } psout.println(">>>>>>>>>>>>>>>>>>>>>>>" + --- 212,234 ---- } } catch (Exception e) { throw new CIMException(CIMException.CIM_ERR_FAILED, e); } } ! public void ping(CIMInstance handlerInstance) throws CIMException { } ! // The following appends XML trace to a file ! private void dumpRequest(Document request, OutboundRequest outRequest) throws IOException { ! ! fout = new FileOutputStream(TRACEFILE, true); ! psout = new PrintStream(fout); ! psout.println(">>>>>>>>>>>>>>>>>>>>>>>" + " START OF REQUEST " + ">>>>>>>>>>>>>>>>>>>>>>>"); outRequest.dumpOutHeader(psout); if (request != null) { ! writeDocumentToOutputStream(request, psout); } psout.println(">>>>>>>>>>>>>>>>>>>>>>>" + *************** *** 204,208 **** outRequest.dumpOutHeader(System.out); if (request != null) { ! request.write(System.out); } System.out.println(">>>>>>>>>>>>>>>>>>>>>>>" + --- 243,247 ---- outRequest.dumpOutHeader(System.out); if (request != null) { ! writeDocumentToOutputStream(request, System.out); } System.out.println(">>>>>>>>>>>>>>>>>>>>>>>" + *************** *** 211,215 **** } ! private void dumpResponse(XmlDocument response, OutboundRequest outRequest) throws IOException { --- 250,254 ---- } ! private void dumpResponse(Document response, OutboundRequest outRequest) throws IOException { *************** *** 223,227 **** psout.println("\n"); if (response != null) { ! response.write(psout); } psout.println("<<<<<<<<<<<<<<<<<<<<<<<" + --- 262,266 ---- psout.println("\n"); if (response != null) { ! writeDocumentToOutputStream(response, psout); } psout.println("<<<<<<<<<<<<<<<<<<<<<<<" + *************** *** 239,243 **** System.out.println("\n"); if (response != null) { ! response.write(System.out); } System.out.println("<<<<<<<<<<<<<<<<<<<<<<<" + --- 278,282 ---- System.out.println("\n"); if (response != null) { ! writeDocumentToOutputStream(response, System.out); } System.out.println("<<<<<<<<<<<<<<<<<<<<<<<" + *************** *** 246,252 **** } ! private XmlDocument getResponse(OutboundRequest outRequest) throws IOException, SAXException, ParserConfigurationException { ! Document d = null; InputStream contentInput = outRequest.getResponseInputStream(); --- 285,291 ---- } ! private Document getResponse(OutboundRequest outRequest) throws IOException, SAXException, ParserConfigurationException { ! Document d = null; InputStream contentInput = outRequest.getResponseInputStream(); *************** *** 255,262 **** dbf.setNamespaceAware(true); DocumentBuilder builder = dbf.newDocumentBuilder(); ! InputSource in = new InputSource(); ! //parser.setDocumentHandler(builder); in.setByteStream(contentInput); d = builder.parse(in); --- 294,302 ---- dbf.setNamespaceAware(true); DocumentBuilder builder = dbf.newDocumentBuilder(); ! InputSource in = new InputSource(); ! //parser.setDocumentHandler(builder); + //TODO: Set a resolver here???? in.setByteStream(contentInput); d = builder.parse(in); *************** *** 266,270 **** } ! return (XmlDocument)d; } finally { contentInput.close(); --- 306,310 ---- } ! return (Document)d; } finally { contentInput.close(); *************** *** 295,297 **** --- 335,353 ---- this.prefix = (prefix.length() == 1 ? "0" + this.prefix : this.prefix); } + + /** Get the Name of the CIM Class that + * + */ + public String getClassName() { + return "CIM_ListenerDestinationCIMXML"; + } + + /** Get the CIM Provider for the + * + * + */ + public CIMProvider getCIMProvider() { + return (CIMProvider)null; + } + } |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:09
|
Update of /cvsroot/wbemservices/open/org/wbemservices/wbem/bootstrap In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/org/wbemservices/wbem/bootstrap Modified Files: Tag: jws1-02-branch StartWBEMServices.java Log Message: Index: StartWBEMServices.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/bootstrap/StartWBEMServices.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** StartWBEMServices.java 3 Mar 2004 13:47:36 -0000 1.6 --- StartWBEMServices.java 9 Nov 2006 19:44:00 -0000 1.6.2.1 *************** *** 71,75 **** /** The system property which specifies the device to output to */ public static final String SYSTEM_DEBUG_DEVICE = "wbem.debug.device"; ! /** sets the various system directory properties if specified in * the WBEMServices.properties file */ --- 71,75 ---- /** The system property which specifies the device to output to */ public static final String SYSTEM_DEBUG_DEVICE = "wbem.debug.device"; ! /** Property determining whether we should force client authentication to SSL */ public static final String SSLAUTHENTICATION = "SSLAuthentication"; /** Property defining password to the keys in the keystore file */ public static final String SSLKEYSTOREKEYPASS = "SSLKeyStoreKeyPass"; /** Property defining password to the keys in the keystore file */ public static final String LISTENPORT = "CimomListenPort"; /** System property defining location of keystore file */ public static final String SYSTEM_SSLKEYSTOREFILE = "javax.net.ssl.keyStore"; /** System property defining password of keystore file */ public static final String SYSTEM_SSLKEYSTOREPASS = "javax.net.ssl.keyStorePassword"; /** System property defining location of truststore file */ public static final String SYSTEM_SSLTRUSTSTOREFILE = "javax.net.ssl.trustStore"; /** System property defining password of truststore file */ public static final String SYSTEM_SSLTRUSTSTOREPASS = "javax.net.ssl.trustStorePassword"; /** sets the various system directory properties if specified in * the WBEMServices.properties file */ *************** *** 175,179 **** classpaths = getClassPaths(props); setDebug(props); ! setDirs(props); } --- 175,179 ---- classpaths = getClassPaths(props); setDebug(props); ! setDirs(props); setSSL(props); } *************** *** 222,226 **** return ret; } ! /** The main method * @param args command line arguments --- 222,226 ---- return ret; } ! /** * Load up SSL settings. Only useful when SSL is enabled in WBEMServices.mof */ private static void setSSL(Properties props) { setSystemProperty(SYSTEM_SSLKEYSTOREFILE, props.getProperty(SYSTEM_SSLKEYSTOREFILE), true); setSystemProperty(SYSTEM_SSLKEYSTOREPASS, props.getProperty(SYSTEM_SSLKEYSTOREPASS), true); setSystemProperty(SYSTEM_SSLTRUSTSTOREFILE, props.getProperty(SYSTEM_SSLTRUSTSTOREFILE), true); setSystemProperty(SYSTEM_SSLTRUSTSTOREPASS, props.getProperty(SYSTEM_SSLTRUSTSTOREPASS), true); setSystemProperty(SSLAUTHENTICATION, props.getProperty(SSLAUTHENTICATION), true); setSystemProperty(SSLKEYSTOREKEYPASS, props.getProperty(SSLKEYSTOREKEYPASS), true); setSystemProperty(LISTENPORT, props.getProperty(LISTENPORT), true); } private static void setSystemProperty(String systemPropertyKey, String value, boolean override) { if (((System.getProperty(systemPropertyKey) != null) && !override) || (value == null)) { return; } else { System.setProperty(systemPropertyKey, value); } } /** The main method * @param args command line arguments |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:06
|
Update of /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/org/wbemservices/wbem/cimom Modified Files: Tag: jws1-02-branch EventService.java IndicationPoller.java Log Message: Index: IndicationPoller.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/IndicationPoller.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** IndicationPoller.java 10 Feb 2004 18:24:24 -0000 1.3 --- IndicationPoller.java 9 Nov 2006 19:44:00 -0000 1.3.2.1 *************** *** 100,106 **** } } ! Enumeration enum = inst1.getProperties().elements(); ! while (enum.hasMoreElements()) { ! CIMProperty cp = (CIMProperty)enum.nextElement(); CIMValue v1 = cp.getValue(); CIMValue v2 = null; --- 100,106 ---- } } ! Enumeration enumm = inst1.getProperties().elements(); ! while (enumm.hasMoreElements()) { ! CIMProperty cp = (CIMProperty)enumm.nextElement(); CIMValue v1 = cp.getValue(); CIMValue v2 = null; Index: EventService.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/cimom/EventService.java,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** EventService.java 10 Feb 2004 18:24:24 -0000 1.11 --- EventService.java 9 Nov 2006 19:44:00 -0000 1.11.2.1 *************** *** 153,159 **** // Clean up all this delivery's associations to the filters ! Enumeration enum = tv.elements(); ! while (enum.hasMoreElements()) { ! CIMObjectPath assoc = (CIMObjectPath)enum.nextElement(); // The delete instance should take care of deactivating the // filters --- 153,159 ---- // Clean up all this delivery's associations to the filters ! Enumeration enumm = tv.elements(); ! while (enumm.hasMoreElements()) { ! CIMObjectPath assoc = (CIMObjectPath)enumm.nextElement(); // The delete instance should take care of deactivating the // filters *************** *** 970,979 **** // Get all the namespaces ! Enumeration enum = ps.enumerateNameSpace("", true).elements(); // for each namespace, find the instances of filter CIMObjectPath assocOp = new CIMObjectPath(FILTERDELIVERYASSOC); ! while (enum.hasMoreElements()) { CIMObjectPath op = new CIMObjectPath("", ! (String)enum.nextElement()); op.setObjectName(CIMFILTERCLASS); assocOp.setNameSpace(op.getNameSpace()); --- 970,979 ---- // Get all the namespaces ! Enumeration enumm = ps.enumerateNameSpace("", true).elements(); // for each namespace, find the instances of filter CIMObjectPath assocOp = new CIMObjectPath(FILTERDELIVERYASSOC); ! while (enumm.hasMoreElements()) { CIMObjectPath op = new CIMObjectPath("", ! (String)enumm.nextElement()); op.setObjectName(CIMFILTERCLASS); assocOp.setNameSpace(op.getNameSpace()); |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:06
|
Update of /cvsroot/wbemservices/open/mof In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/mof Modified Files: Tag: jws1-02-branch WBEMServices.mof Log Message: Index: WBEMServices.mof =================================================================== RCS file: /cvsroot/wbemservices/open/mof/WBEMServices.mof,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** WBEMServices.mof 20 Mar 2004 18:07:05 -0000 1.4 --- WBEMServices.mof 9 Nov 2006 19:43:59 -0000 1.4.2.1 *************** *** 86,89 **** --- 86,92 ---- "The default value is 5988")] uint32 PortNumber; + [Description("This determines whether we should use SSL to encrypt the data. " + "The default value is false")] + boolean SSLEnable; }; *************** *** 160,164 **** Caption = "Sun Java WBEM Protocol Adapter"; Description = "This is the Sun Java WBEM Protocol Adapter."; ! PortNumber = 5988; }; --- 163,168 ---- Caption = "Sun Java WBEM Protocol Adapter"; Description = "This is the Sun Java WBEM Protocol Adapter."; ! PortNumber = 5988; ! SSLEnable = false; }; |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:05
|
Update of /cvsroot/wbemservices/open/sdk/examples/client/qualifier In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/sdk/examples/client/qualifier Modified Files: Tag: jws1-02-branch EnumQualifierType.java Log Message: Index: EnumQualifierType.java =================================================================== RCS file: /cvsroot/wbemservices/open/sdk/examples/client/qualifier/EnumQualifierType.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** EnumQualifierType.java 9 Jan 2004 02:12:11 -0000 1.3 --- EnumQualifierType.java 9 Nov 2006 19:44:01 -0000 1.3.2.1 *************** *** 60,66 **** System.out.println(" in namespace " + ParentNameSpace + " on " + Host); CIMObjectPath qtop = new CIMObjectPath(Host); ! Enumeration enum = cc.enumQualifierTypes(qtop); ! while (enum.hasMoreElements()) { ! CIMQualifierType qt = (CIMQualifierType)enum.nextElement(); System.out.println(qt); } --- 60,66 ---- System.out.println(" in namespace " + ParentNameSpace + " on " + Host); CIMObjectPath qtop = new CIMObjectPath(Host); ! Enumeration enumm = cc.enumQualifierTypes(qtop); ! while (enumm.hasMoreElements()) { ! CIMQualifierType qt = (CIMQualifierType)enumm.nextElement(); System.out.println(qt); } |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:05
|
Update of /cvsroot/wbemservices/open/org/wbemservices/wbem/repository In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/org/wbemservices/wbem/repository Modified Files: Tag: jws1-02-branch PSRlogImpl.java Log Message: Index: PSRlogImpl.java =================================================================== RCS file: /cvsroot/wbemservices/open/org/wbemservices/wbem/repository/PSRlogImpl.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** PSRlogImpl.java 10 Feb 2004 18:24:22 -0000 1.6 --- PSRlogImpl.java 9 Nov 2006 19:44:00 -0000 1.6.2.1 *************** *** 57,61 **** import javax.wbem.client.CIMOMHandle; import javax.wbem.provider.EventProvider; - import javax.wbem.query.NonJoinExp; import javax.wbem.query.QueryExp; import javax.wbem.query.SelectExp; --- 57,60 ---- *************** *** 437,441 **** if ((ns == null) || (ns.length() == 0) || ns.equals(CIMROOT)) { throw new CIMNameSpaceException( ! CIMNameSpaceException.CIM_ERR_ALREADY_EXISTS, namespace); } --- 436,440 ---- if ((ns == null) || (ns.length() == 0) || ns.equals(CIMROOT)) { throw new CIMNameSpaceException( ! CIMException.CIM_ERR_ALREADY_EXISTS, namespace); } *************** *** 450,454 **** if (nsentry != null) { throw new CIMNameSpaceException( ! CIMNameSpaceException.CIM_ERR_ALREADY_EXISTS, namespace); } nsentry = new CIMNameSpaceRlogEntry(ns); --- 449,453 ---- if (nsentry != null) { throw new CIMNameSpaceException( ! CIMException.CIM_ERR_ALREADY_EXISTS, namespace); } nsentry = new CIMNameSpaceRlogEntry(ns); *************** *** 505,509 **** if (qtentry != null) { throw new CIMQualifierTypeException( ! CIMQualifierTypeException.CIM_ERR_ALREADY_EXISTS, qtName); } qtentry = new CIMQualifierTypeRlogEntry(namespace, qtName); --- 504,508 ---- if (qtentry != null) { throw new CIMQualifierTypeException( ! CIMException.CIM_ERR_ALREADY_EXISTS, qtName); } qtentry = new CIMQualifierTypeRlogEntry(namespace, qtName); *************** *** 627,631 **** if (ccentry != null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_ALREADY_EXISTS, cname); } --- 626,630 ---- if (ccentry != null) { throw new CIMClassException( ! CIMException.CIM_ERR_ALREADY_EXISTS, cname); } *************** *** 633,637 **** if (supccentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, supercc); } if (assoc) { --- 632,636 ---- if (supccentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, supercc); } if (assoc) { *************** *** 700,704 **** if (ccentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 699,703 ---- if (ccentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 707,711 **** if (cientry != null) { throw new CIMInstanceException( ! CIMInstanceException.CIM_ERR_ALREADY_EXISTS, iname); } --- 706,710 ---- if (cientry != null) { throw new CIMInstanceException( ! CIMException.CIM_ERR_ALREADY_EXISTS, iname); } *************** *** 891,895 **** if (ccentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 890,894 ---- if (ccentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 1075,1079 **** if (ccentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 1074,1078 ---- if (ccentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 1155,1159 **** if (namespace == null || namespace.length() == 0) { throw new CIMNameSpaceException( ! CIMNameSpaceException.CIM_ERR_INVALID_NAMESPACE, " "); } --- 1154,1158 ---- if (namespace == null || namespace.length() == 0) { throw new CIMNameSpaceException( ! CIMException.CIM_ERR_INVALID_NAMESPACE, " "); } *************** *** 1167,1171 **** } else { throw new CIMNameSpaceException( ! CIMNameSpaceException.CIM_ERR_NOT_FOUND, namespace); } addLogRecord(new DeleteNameSpaceLogObj(namespace)); --- 1166,1170 ---- } else { throw new CIMNameSpaceException( ! CIMException.CIM_ERR_NOT_FOUND, namespace); } addLogRecord(new DeleteNameSpaceLogObj(namespace)); *************** *** 1220,1224 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, className); } --- 1219,1223 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, className); } *************** *** 1233,1237 **** if (superentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, supercc); } --- 1232,1236 ---- if (superentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, supercc); } *************** *** 1245,1254 **** } ! ArrayList enum = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enum.size(); i++) { ! ccentry = (CIMClassRlogEntry)enum.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enum.add(v.get(j)); } nsentry.removeClass(ccentry.getNameKey()); --- 1244,1253 ---- } ! ArrayList enumm = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enumm.size(); i++) { ! ccentry = (CIMClassRlogEntry)enumm.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enumm.add(v.get(j)); } nsentry.removeClass(ccentry.getNameKey()); *************** *** 1274,1283 **** ((CIMAssocClassRlogEntry)entry).validateClassAsociations(); } ! ArrayList enum = new ArrayList(entry.getSubClassCollection()); ! for (int i = 0; i < enum.size(); i++) { ! CIMClassRlogEntry ccentry = (CIMClassRlogEntry)enum.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enum.add(v.get(j)); } // validate associations from referenced classes --- 1273,1282 ---- ((CIMAssocClassRlogEntry)entry).validateClassAsociations(); } ! ArrayList enumm = new ArrayList(entry.getSubClassCollection()); ! for (int i = 0; i < enumm.size(); i++) { ! CIMClassRlogEntry ccentry = (CIMClassRlogEntry)enumm.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enumm.add(v.get(j)); } // validate associations from referenced classes *************** *** 1309,1313 **** if (ci == null) { throw new CIMInstanceException( ! CIMInstanceException.CIM_ERR_NOT_FOUND, nci.getObjectPath()); } --- 1308,1312 ---- if (ci == null) { throw new CIMInstanceException( ! CIMException.CIM_ERR_NOT_FOUND, nci.getObjectPath()); } *************** *** 1351,1355 **** if (ccentry == null) { throw new CIMClassException ! (CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 1350,1354 ---- if (ccentry == null) { throw new CIMClassException ! (CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 1432,1440 **** throws CIMException { ! ArrayList enum = new ArrayList(nameSpacesMap.values()); ! for (int i = 0; i < enum.size(); i++) { CIMNameSpaceRlogEntry ns = ! (CIMNameSpaceRlogEntry)enum.get(i); nslist.add(ns.getName()); } --- 1431,1439 ---- throws CIMException { ! ArrayList enumm = new ArrayList(nameSpacesMap.values()); ! for (int i = 0; i < enumm.size(); i++) { CIMNameSpaceRlogEntry ns = ! (CIMNameSpaceRlogEntry)enumm.get(i); nslist.add(ns.getName()); } *************** *** 1453,1466 **** CIMNameSpaceRlogEntry nsentry = getNameSpaceEntryFromMap(namespace); ! ArrayList enum = new ArrayList(nsentry.getSubNameSpaceCollection()); ! for (int i = 0; i < enum.size(); i++) { CIMNameSpaceRlogEntry subns = ! (CIMNameSpaceRlogEntry)enum.get(i); ArrayList a = new ArrayList(subns.getSubNameSpaceCollection()); if (deep) { for (int j = 0; j < a.size(); j++) { ! enum.add(a.get(j)); } } --- 1452,1465 ---- CIMNameSpaceRlogEntry nsentry = getNameSpaceEntryFromMap(namespace); ! ArrayList enumm = new ArrayList(nsentry.getSubNameSpaceCollection()); ! for (int i = 0; i < enumm.size(); i++) { CIMNameSpaceRlogEntry subns = ! (CIMNameSpaceRlogEntry)enumm.get(i); ArrayList a = new ArrayList(subns.getSubNameSpaceCollection()); if (deep) { for (int j = 0; j < a.size(); j++) { ! enumm.add(a.get(j)); } } *************** *** 1637,1651 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, className); } ! ArrayList enum = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enum.size(); i++) { ! ccentry = (CIMClassRlogEntry)enum.get(i); if (deep) { ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enum.add(v.get(j)); } } --- 1636,1650 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, className); } ! ArrayList enumm = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enumm.size(); i++) { ! ccentry = (CIMClassRlogEntry)enumm.get(i); if (deep) { ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enumm.add(v.get(j)); } } *************** *** 1776,1780 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, className); } --- 1775,1779 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, className); } *************** *** 1784,1796 **** // Get instances associated with the subclasses if (deep) { ! ArrayList enum = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enum.size(); i++) { ! ccentry = (CIMClassRlogEntry)enum.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enum.add(v.get(j)); } ! getInstanceList(namespace, (CIMClassRlogEntry)enum.get(i), needop, instanceList); } --- 1783,1795 ---- // Get instances associated with the subclasses if (deep) { ! ArrayList enumm = new ArrayList(ccentry.getSubClassCollection()); ! for (int i = 0; i < enumm.size(); i++) { ! ccentry = (CIMClassRlogEntry)enumm.get(i); ArrayList v = new ArrayList(ccentry.getSubClassCollection()); for (int j = 0; j < v.size(); j++) { ! enumm.add(v.get(j)); } ! getInstanceList(namespace, (CIMClassRlogEntry)enumm.get(i), needop, instanceList); } *************** *** 1844,1848 **** if (nsentry == null) { throw new CIMNameSpaceException( ! CIMNameSpaceException.CIM_ERR_INVALID_NAMESPACE, namespace); } return nsentry; --- 1843,1847 ---- if (nsentry == null) { throw new CIMNameSpaceException( ! CIMException.CIM_ERR_INVALID_NAMESPACE, namespace); } return nsentry; *************** *** 1874,1878 **** SelectExp q = (SelectExp)parser.querySpecification(); SelectList attrs = q.getSelectList(); - NonJoinExp from = (NonJoinExp)q.getFromClause(); QueryExp where = q.getWhereClause(); Vector v = enumerateInstances(namespace, --- 1873,1876 ---- *************** *** 2118,2122 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 2116,2120 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 2234,2238 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 2232,2236 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 2252,2256 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, cname); } --- 2250,2254 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, cname); } *************** *** 2262,2271 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, cname); } ! ArrayList enum = new ArrayList(ccentry.getSubClassKeys()); ! for (int j = 0; j < enum.size(); j++) { ! list.add(enum.get(j)); } } --- 2260,2269 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, cname); } ! ArrayList enumm = new ArrayList(ccentry.getSubClassKeys()); ! for (int j = 0; j < enumm.size(); j++) { ! list.add(enumm.get(j)); } } *************** *** 2417,2421 **** if (ccentry == null) { throw new CIMClassException( ! CIMClassException.CIM_ERR_NOT_FOUND, cname); } String iname = getInstanceName(nsentry, objectName); --- 2415,2419 ---- if (ccentry == null) { throw new CIMClassException( ! CIMException.CIM_ERR_NOT_FOUND, cname); } String iname = getInstanceName(nsentry, objectName); |
|
From: Damien K. <dam...@us...> - 2006-11-09 19:44:04
|
Update of /cvsroot/wbemservices/open/sdk/apps/org/wbemservices/wbem/apps/cimworkshop In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7874/sdk/apps/org/wbemservices/wbem/apps/cimworkshop Modified Files: Tag: jws1-02-branch CIMMethodsPanel.java Log Message: Index: CIMMethodsPanel.java =================================================================== RCS file: /cvsroot/wbemservices/open/sdk/apps/org/wbemservices/wbem/apps/cimworkshop/CIMMethodsPanel.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** CIMMethodsPanel.java 10 Feb 2004 18:24:22 -0000 1.5 --- CIMMethodsPanel.java 9 Nov 2006 19:44:01 -0000 1.5.2.1 *************** *** 124,128 **** cimClient = cc; Vector methods = new Vector(); ! Enumeration enum; Util.setWaitCursor(this); --- 124,128 ---- cimClient = cc; Vector methods = new Vector(); ! Enumeration enumm; Util.setWaitCursor(this); *************** *** 147,152 **** methods = ((CIMClass)pElement).getMethods(); } ! for (enum = methods.elements(); enum.hasMoreElements(); ) { ! CIMMethod method = (CIMMethod)enum.nextElement(); listModel.addElement(method); } --- 147,152 ---- methods = ((CIMClass)pElement).getMethods(); } ! for (enumm = methods.elements(); enumm.hasMoreElements(); ) { ! CIMMethod method = (CIMMethod)enumm.nextElement(); listModel.addElement(method); } |
|
From: Jim D. <jim...@us...> - 2006-08-17 19:12:59
|
Update of /cvsroot/wbemservices/open/javax/wbem/listener In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5991/open/javax/wbem/listener Modified Files: IndicationListener.java Log Message: Add pIndicationURL to IndicationOccured - this is only needed in the case when you want to share one indicationListener with multiple Indication Listeners. The other option is to have an IndicationListener for each WBEM Listener you create. Index: IndicationListener.java =================================================================== RCS file: /cvsroot/wbemservices/open/javax/wbem/listener/IndicationListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IndicationListener.java 23 Jun 2006 00:22:22 -0000 1.1 --- IndicationListener.java 17 Aug 2006 19:12:54 -0000 1.2 *************** *** 32,37 **** /** ! * This interface is implemented by the code ! * which wants to listen for indications. * * See the WBEMListenerFactory class for an example. --- 32,37 ---- /** ! * This interface is implemented by the code which wants to listen for ! * indications. * * See the WBEMListenerFactory class for an example. *************** *** 45,52 **** /** * Called when an indication has been received by the listener ! * * @param pIndication * the indication received */ ! public void indicationOccured(CIMInstance pIndication); } --- 45,56 ---- /** * Called when an indication has been received by the listener ! * @param pIndicationURL ! * the URL to which the indication was posted. For example if the ! * indication was delivered over the https protocol to the ! * destination listener https://hostname:6111/, pIndicationURL ! * would be set to /foo/ind * @param pIndication * the indication received */ ! public void indicationOccured(String pIndicationURL, CIMInstance pIndication); } |
|
From: Jim D. <jim...@us...> - 2006-07-06 01:19:12
|
Update of /cvsroot/wbemservices/open/javax/wbem/client In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23593 Modified Files: WBEMClient.java Log Message: Comment out batching support until the JSR48 EG completes the proposal Index: WBEMClient.java =================================================================== RCS file: /cvsroot/wbemservices/open/javax/wbem/client/WBEMClient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WBEMClient.java 5 Jul 2006 20:36:43 -0000 1.3 --- WBEMClient.java 6 Jul 2006 00:51:18 -0000 1.4 *************** *** 748,753 **** * @exception WBEMException * CIM_ERR_NOT_SUPPORTED - If batching is not supported. ! */ public BatchResult performBatchOperations(String set) throws WBEMException; /** --- 748,754 ---- * @exception WBEMException * CIM_ERR_NOT_SUPPORTED - If batching is not supported. ! * public BatchResult performBatchOperations(String set) throws WBEMException; + */ /** |
|
From: Brian S. <bsc...@us...> - 2006-06-29 14:42:40
|
Update of /cvsroot/wbemservices/website In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv961 Modified Files: update.sh generate.sh Log Message: Update for SF CVS server changes Index: update.sh =================================================================== RCS file: /cvsroot/wbemservices/website/update.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** update.sh 24 Oct 2005 16:22:54 -0000 1.7 --- update.sh 29 Jun 2006 14:42:37 -0000 1.8 *************** *** 9,13 **** WBEMDIR=/home/groups/w/wb/wbemservices ! export CVSROOT=:pserver:ano...@cv...:/cvsroot/wbemservices # --- 9,13 ---- WBEMDIR=/home/groups/w/wb/wbemservices ! export CVSROOT=:pserver:ano...@wb...:/cvsroot/wbemservices # Index: generate.sh =================================================================== RCS file: /cvsroot/wbemservices/website/generate.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** generate.sh 24 Oct 2005 16:19:25 -0000 1.4 --- generate.sh 29 Jun 2006 14:42:37 -0000 1.5 *************** *** 11,15 **** OUTPUT=$WBEMDIR/htdocs ! export CVSROOT=:pserver:ano...@cv...:/cvsroot/wbemservices cd $SRC --- 11,15 ---- OUTPUT=$WBEMDIR/htdocs ! export CVSROOT=:pserver:ano...@cw...:/cvsroot/wbemservices cd $SRC |
Update of /cvsroot/wbemservices/open/javax/wbem/client In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27538 Removed Files: CIMEnumElementOp.java CIMOperation.java CIMQualifiedPropertiedElementOp.java CIMRepositoryException.java CIMSecurityException.java CIMTransportException.java ClientProperties.java ProviderCIMOMHandle.java RemoteCIMListener.java Version.java Version.orig WbemClient.properties WbemDefaults.properties Log Message: remove old files --- WbemClient.properties DELETED --- --- WbemDefaults.properties DELETED --- --- CIMTransportException.java DELETED --- --- CIMEnumElementOp.java DELETED --- --- ProviderCIMOMHandle.java DELETED --- --- Version.orig DELETED --- --- CIMSecurityException.java DELETED --- --- RemoteCIMListener.java DELETED --- --- CIMOperation.java DELETED --- --- Version.java DELETED --- --- CIMQualifiedPropertiedElementOp.java DELETED --- --- CIMRepositoryException.java DELETED --- --- ClientProperties.java DELETED --- |
Update of /cvsroot/wbemservices/open/javax/wbem/cim In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23026/wbem/cim Removed Files: CIMArgument.java CIMClass.java CIMClassException.java CIMDataType.java CIMDateTime.java CIMElement.java CIMException.java CIMFlavor.java CIMInstance.java CIMInstanceException.java CIMMethod.java CIMMethodException.java CIMNameSpace.java CIMNameSpaceException.java CIMObject.java CIMObjectPath.java CIMParameter.java CIMProperty.java CIMPropertyException.java CIMQualifiedElement.java CIMQualifier.java CIMQualifierType.java CIMQualifierTypeException.java CIMScope.java CIMSemanticException.java CIMValue.java CloneUtil.java MOFFormatter.java StringUtil.java UnsignedInt.java UnsignedInt16.java UnsignedInt32.java UnsignedInt64.java UnsignedInt8.java Log Message: latest JSR48 draft --- CloneUtil.java DELETED --- --- CIMMethodException.java DELETED --- --- CIMSemanticException.java DELETED --- --- CIMParameter.java DELETED --- --- MOFFormatter.java DELETED --- --- CIMScope.java DELETED --- --- CIMObjectPath.java DELETED --- --- CIMInstance.java DELETED --- --- CIMDateTime.java DELETED --- --- CIMQualifierTypeException.java DELETED --- --- CIMQualifier.java DELETED --- --- CIMNameSpace.java DELETED --- --- CIMProperty.java DELETED --- --- CIMInstanceException.java DELETED --- --- StringUtil.java DELETED --- --- CIMException.java DELETED --- --- UnsignedInt8.java DELETED --- --- CIMObject.java DELETED --- --- CIMMethod.java DELETED --- --- CIMNameSpaceException.java DELETED --- --- CIMArgument.java DELETED --- --- UnsignedInt64.java DELETED --- --- CIMClassException.java DELETED --- --- UnsignedInt16.java DELETED --- --- CIMPropertyException.java DELETED --- --- CIMQualifiedElement.java DELETED --- --- UnsignedInt32.java DELETED --- --- UnsignedInt.java DELETED --- --- CIMElement.java DELETED --- --- CIMDataType.java DELETED --- --- CIMQualifierType.java DELETED --- --- CIMValue.java DELETED --- --- CIMFlavor.java DELETED --- --- CIMClass.java DELETED --- |
Update of /cvsroot/wbemservices/open/javax/cim In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23026/cim Added Files: CIMArgument.java CIMClass.java CIMClassProperty.java CIMDataType.java CIMDateTime.java CIMDateTimeAbsolute.java CIMDateTimeInterval.java CIMElement.java CIMFlavor.java CIMInstance.java CIMMethod.java CIMNamedElementInterface.java CIMObjectPath.java CIMParameter.java CIMProperty.java CIMQualifiedElementInterface.java CIMQualifier.java CIMQualifierType.java CIMScope.java CIMTypedElement.java CIMValuedElement.java Messages.java UnsignedInteger.java UnsignedInteger16.java UnsignedInteger32.java UnsignedInteger64.java UnsignedInteger8.java Log Message: latest JSR48 draft --- NEW FILE: CIMDataType.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *Sun Microsystems, Inc. * *Portions created by: Sun Microsystems, Inc. *are Copyright (c) 2001 Sun Microsystems, Inc. * *All Rights Reserved. * *Contributor(s): WBEM Solutions, Inc. */ package javax.cim; import java.io.Serializable; import org.wbemservices.wbem.mof.MOFFormatter; /** * Encapsulates the CIM data types as defined in the CIM Infrastructure * Specification. The CIM only allows a set number of data type. This class * defines the mapping of CIM data types to Java objects.<br><br> * * Note: CIM Allows the size of an array as part of the data type. The * predefined classes are unbounded.<br><br> * * The following table shows the mapping of CIM Data Type to Java. <br><br> <table align=center style="width: 70%; text-align: left;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;"><span style="text-decoration: underline;">CIM Data Type</span><br> </td> <td style="vertical-align: top;"><span style="text-decoration: underline;">Java Representation</span><br> </td> </tr> <tr> <td style="vertical-align: top;">uint8<br> </td> <td style="vertical-align: top;">UnsignedInteger8<br> </td> </tr> <tr> <td style="vertical-align: top;">sint8<br> </td> <td style="vertical-align: top;">Byte<br> </td> </tr> <tr> <td style="vertical-align: top;">uint16<br> </td> <td style="vertical-align: top;">UnsignedInteger16</td> </tr> <tr> <td style="vertical-align: top;">sint16<br> </td> <td style="vertical-align: top;">Short<br> </td> </tr> <tr> <td style="vertical-align: top;">uint32<br> </td> <td style="vertical-align: top;">UnsignedInteger32</td> </tr> <tr> <td style="vertical-align: top;">sint32<br> </td> <td style="vertical-align: top;">Integer<br> </td> </tr> <tr> <td style="vertical-align: top;">uint64<br> </td> <td style="vertical-align: top;">UnsignedInteger64</td> </tr> <tr> <td style="vertical-align: top;">sint64<br> </td> <td style="vertical-align: top;">Long<br> </td> </tr> <tr> <td style="vertical-align: top;">string<br> </td> <td style="vertical-align: top;">String<br> </td> </tr> <tr> <td style="vertical-align: top;">boolean<br> </td> <td style="vertical-align: top;">Boolean<br> </td> </tr> <tr> <td style="vertical-align: top;">real32<br> </td> <td style="vertical-align: top;">Float<br> </td> </tr> <tr> <td style="vertical-align: top;">real64<br> </td> <td style="vertical-align: top;">Double<br> </td> </tr> <tr> <td style="vertical-align: top;">datetime<br> </td> <td style="vertical-align: top;">CIMDataTimeAbsolute<br> CIMDataTimeInterval<br> </td> </tr> <tr> <td style="vertical-align: top;"><classname> ref<br> </td> <td style="vertical-align: top;">CIMObjectPath<br> </td> </tr> <tr> <td style="vertical-align: top;">char16<br> </td> <td style="vertical-align: top;">Character<br> </td> </tr> </tbody> </table> * @since JSR48 1.0.0 */ public class CIMDataType implements Serializable { private static final long serialVersionUID = -4117670221008320188L; // The integer representing the type (from the defines in this class) private final int mType; // true if it is an array; false otherwise private final boolean mIsArray; // only used for array types. Represents the maximum number of elements // an array value can hold. In CIM this is part of the datatype private final int mSize; // Only used for reference types. Represents the class name that this // reference is scoped to. private final String mClassName; /** * Invalid type */ public final static int INVALID = -1; /** * Unsigned 8-bit integer * * @see UnsignedInteger8 */ public final static int UINT8 = 0; /** * Signed 8-bit integer * * @see Byte */ public final static int SINT8 = 1; /** * Unsigned 16-bit integer * * @see UnsignedInteger16 */ public final static int UINT16 = 2; /** * Signed 16-bit integer * * @see Short */ public final static int SINT16 = 3; /** * Unsigned 32-bit integer * * @see UnsignedInteger32 */ public final static int UINT32 = 4; /** * Signed 32-bit integer * * @see Integer */ public final static int SINT32 = 5; /** * Unsigned 64-bit integer * * @see UnsignedInteger64 */ public final static int UINT64 = 6; /** * Signed 64-bit integer * * @see Long */ public final static int SINT64 = 7; /** * UCS-2 string * * @see String */ public final static int STRING = 8; /** * Boolean * * @see Boolean */ public final static int BOOLEAN = 9; /** * IEEE 4-byte floating-point * * @see Float */ public final static int REAL32 = 10; /** * IEEE 8-byte floating-point * * @see Double */ public final static int REAL64 = 11; /** * A string containing the date-time * * @see CIMDateTimeInterval * @see CIMDateTimeAbsolute */ public final static int DATETIME = 12; /** * 16-bit UCS-2 character * * @see Character */ public final static int CHAR16 = 13; /** * Reference type * * @see CIMObjectPath */ public final static int REFERENCE = 14; /** * CIMInstance type * * @see CIMInstance */ public final static int OBJECT = 15; /** * Null type */ public final static int NULL = 16; /** * CIMClass type * * @see CIMClass */ public final static int CLASS = 17; /** * Unsigned 8-bit integer data type * * @see UnsignedInteger8 */ public static final CIMDataType UINT8_T = new CIMDataType(UINT8); /** * Unsigned 16-bit integer data type * * @see UnsignedInteger16 */ public static final CIMDataType UINT16_T = new CIMDataType(UINT16); /** * Unsigned 32-bit integer data type * * @see UnsignedInteger32 */ public static final CIMDataType UINT32_T = new CIMDataType(UINT32); /** * Unsigned 64-bit integer data type * * @see UnsignedInteger64 */ public static final CIMDataType UINT64_T = new CIMDataType(UINT64); /** * Signed 8-bit integer data type * * @see Byte */ public static final CIMDataType SINT8_T = new CIMDataType(SINT8); /** * Signed 16-bit integer data type * * @see Short */ public static final CIMDataType SINT16_T = new CIMDataType(SINT16); /** * Signed 32-bit integer data type * * @see Integer */ public static final CIMDataType SINT32_T = new CIMDataType(SINT32); /** * Signed 64-bit integer data type * * @see Long */ public static final CIMDataType SINT64_T = new CIMDataType(SINT64); /** * UCS-2 string data type * * @see String */ public static final CIMDataType STRING_T = new CIMDataType(STRING); /** * Boolean data type * * @see Boolean */ public static final CIMDataType BOOLEAN_T = new CIMDataType(BOOLEAN); /** * IEEE 4-byte floating-point data type * * @see Float */ public static final CIMDataType REAL32_T = new CIMDataType(REAL32); /** * IEEE 8-byte floating-point data type * * @see Double */ public static final CIMDataType REAL64_T = new CIMDataType(REAL64); /** * A date-time data type * * @see CIMDateTimeInterval * @see CIMDateTimeAbsolute */ public static final CIMDataType DATETIME_T = new CIMDataType(DATETIME); /** * 16-bit UCS-2 character data type * * @see Character */ public static final CIMDataType CHAR16_T = new CIMDataType(CHAR16); /** * CIMClass type * * @see CIMClass Note: For CIMV2, this can only be used when the property * has an EmbeddedObject qualifier. */ public static final CIMDataType CLASS_T = new CIMDataType(CLASS); /** * CIMInstance type data type * * Note: For CIMV2, this can only be used when the property has either an * EmbeddedInstance or EmbeddedObject qualifier. * * @see CIMInstance */ public static final CIMDataType OBJECT_T = new CIMDataType(OBJECT); /** * Invalid data type */ public static final CIMDataType INVALID_T = new CIMDataType(INVALID); /** * Unsigned 8-bit integer unbounded array data type * * @see UnsignedInteger8 */ public static final CIMDataType UINT8_ARRAY_T = new CIMDataType(UINT8, true, 0); /** * Unsigned 16-bit integer unbounded array data type * * @see UnsignedInteger16 */ public static final CIMDataType UINT16_ARRAY_T = new CIMDataType(UINT16, true, 0); /** * Unsigned 32-bit integer unbounded array data type * * @see UnsignedInteger32 */ public static final CIMDataType UINT32_ARRAY_T = new CIMDataType(UINT32, true, 0); /** * Unsigned 64-bit integer unbounded array data type * * @see UnsignedInteger64 */ public static final CIMDataType UINT64_ARRAY_T = new CIMDataType(UINT64, true, 0); /** * Signed 8-bit integer unbounded array data type * * @see Byte */ public static final CIMDataType SINT8_ARRAY_T = new CIMDataType(SINT8, true, 0); /** * Signed 16-bit integer unbounded array data type * * @see Short */ public static final CIMDataType SINT16_ARRAY_T = new CIMDataType(SINT16, true, 0); /** * Signed 32-bit integer unbounded array data type * * @see Integer */ public static final CIMDataType SINT32_ARRAY_T = new CIMDataType(SINT32, true, 0); /** * Signed 64-bit integer unbounded array data type * * @see Long */ public static final CIMDataType SINT64_ARRAY_T = new CIMDataType(SINT64, true, 0); /** * UCS-2 string unbounded array data type * * @see String */ public static final CIMDataType STRING_ARRAY_T = new CIMDataType(STRING, true, 0); /** * Boolean unbounded array data type * * @see Boolean */ public static final CIMDataType BOOLEAN_ARRAY_T = new CIMDataType(BOOLEAN, true, 0); /** * IEEE 4-byte floating-point unbounded array data type * * @see Float */ public static final CIMDataType REAL32_ARRAY_T = new CIMDataType(REAL32, true, 0); /** * IEEE 8-byte floating-point unbounded array data type * * @see Double */ public static final CIMDataType REAL64_ARRAY_T = new CIMDataType(REAL64, true, 0); /** * A date-time unbounded array data type * * @see CIMDateTimeInterval * @see CIMDateTimeAbsolute */ public static final CIMDataType DATETIME_ARRAY_T = new CIMDataType( DATETIME, true, 0); /** * 16-bit UCS-2 character unbounded Array type * * @see Character */ public static final CIMDataType CHAR16_ARRAY_T = new CIMDataType(CHAR16, true, 0); /** * CIMInstance unbounded Array type * * @see CIMInstance */ public static final CIMDataType OBJECT_ARRAY_T = new CIMDataType(OBJECT, true, 0); /** * Get the data type of an object. * * @param o * The object whose data type to return. * * @return The data type of the specified object. * @exception IllegalArgumentException if o is not a valid CIM Type */ public static final CIMDataType getDataType(Object o) { if (o instanceof String) { return CIMDataType.STRING_T; } else if (o instanceof UnsignedInteger8) { return CIMDataType.UINT8_T; } else if (o instanceof Byte) { return CIMDataType.SINT8_T; } else if (o instanceof UnsignedInteger16) { return CIMDataType.UINT16_T; } else if (o instanceof Short) { return CIMDataType.SINT16_T; } else if (o instanceof UnsignedInteger32) { return CIMDataType.UINT32_T; } else if (o instanceof Integer) { return CIMDataType.SINT32_T; } else if (o instanceof UnsignedInteger64) { return CIMDataType.UINT64_T; } else if (o instanceof Long) { return CIMDataType.SINT64_T; } else if (o instanceof Boolean) { return CIMDataType.BOOLEAN_T; } else if (o instanceof Float) { return CIMDataType.REAL32_T; } else if (o instanceof Double) { return CIMDataType.REAL64_T; } else if (o instanceof Character) { return CIMDataType.CHAR16_T; } else if (o instanceof CIMDateTime) { return CIMDataType.DATETIME_T; } else if (o instanceof String[]) { return CIMDataType.STRING_ARRAY_T; } else if (o instanceof Boolean[]) { return CIMDataType.BOOLEAN_ARRAY_T; } else if (o instanceof char[]) { return CIMDataType.CHAR16_ARRAY_T; } else if (o instanceof UnsignedInteger8[]) { return CIMDataType.UINT8_ARRAY_T; } else if (o instanceof Byte[]) { return CIMDataType.SINT8_ARRAY_T; } else if (o instanceof UnsignedInteger16[]) { return CIMDataType.UINT16_ARRAY_T; } else if (o instanceof Short[]) { return CIMDataType.SINT16_ARRAY_T; } else if (o instanceof UnsignedInteger32[]) { return CIMDataType.UINT32_ARRAY_T; } else if (o instanceof Integer[]) { return CIMDataType.SINT32_ARRAY_T; } else if (o instanceof UnsignedInteger64[]) { return CIMDataType.UINT64_ARRAY_T; } else if (o instanceof Long[]) { return CIMDataType.SINT64_ARRAY_T; } else if (o instanceof Float[]) { return CIMDataType.REAL32_ARRAY_T; } else if (o instanceof Double[]) { return CIMDataType.REAL64_ARRAY_T; } else if (o instanceof CIMDateTime[]) { return CIMDataType.DATETIME_ARRAY_T; } else if (o instanceof CIMInstance) { return CIMDataType.OBJECT_T; } else if (o instanceof CIMClass) { return CIMDataType.CLASS_T; } throw new IllegalArgumentException(Messages.getString("CIMDataType.INVALID_DATATYPE")); } // Do not allow creation just using the type... private CIMDataType(int pType) { this(pType, false, 0); } /** * Constructs a CIMDataType array object of the specified type and size. * This should only be used when the size is being limited/defined as part * of the datatype. * * @param pType * The data type as define in the CIM class * @param pSize * The maximum number of elements in the array. * @throws IllegalArgumentException * Thrown if the pSize value specified is not a positive integer. */ public CIMDataType(int pType, int pSize) { this(pType, true, pSize); if (pSize <= 0) { throw new IllegalArgumentException( Messages.getString("CIMDataType.INVALIDSIZE")); } } /** * Constructs a CIMDataType object using the specified type, array setting * and size. This should only be used when the size is being limited/defined * as part of the data type. * * @param pType * The data type as define in the CIM class * @param pIsArray * True if the data type is an array; false otherwise. * @param pSize * If an array value this represents the maximum number of * elements. This is not used for non array data types and this * constructor should not be used - use one of the * getPredefined() methods. * @throws IllegalArgumentException * If the type is not one of the types from this class or if it * is a reference. */ private CIMDataType(int pType, boolean pIsArray, int pSize) { if (pType == REFERENCE || pType > CLASS || pType < INVALID) { throw new IllegalArgumentException(); } mType = pType; mClassName = null; mSize = pSize; mIsArray = pIsArray; } /** * Creates a new CIM REFERENCE data type object with the specified class * reference. * * @param pClassName * The CIM class reference name. */ public CIMDataType(String pClassName) { this(pClassName, false, 0); } /** * Creates a new CIM REFERENCE_ARRAY data type object with the specified * class reference. * * @param pClassName * The CIM class reference name. * @param pSize * The size of the array. 0 indicates the array is unbounded. */ public CIMDataType(String pClassName, int pSize) { //allow zero sized since we need the classname and can not //have predefined ref array types. this(pClassName, true, pSize); } /** * Constructs a CIM REFERENCE or CIM REFERENCE_ARRAY data type object with * the specified class reference. * * @param pClassName * The CIM class reference name. * @param pIsArray * True if the data type is an array; false otherwise * @param pSize * The size of the array when defined. This is used when the size * is defined as part of the declaration. This does not represent * the size of value. * * @throws IllegalArgumentException * if the refClassName is null */ protected CIMDataType(String pClassName, boolean pIsArray, int pSize) { if (pClassName == null || pClassName.length() == 0) { throw new IllegalArgumentException(); } mClassName = pClassName; mIsArray = pIsArray; mSize = pSize; mType = REFERENCE; } /** * Checks if the data type is an array type. * * @return True if the data type is an array type, false otherwise. */ public boolean isArray() { return mIsArray; } /** * Returns the size of the maximum number of elements an array data type * may hold. * * @return The maximum size of the array data type. */ public int getSize() { return mSize; } /** * Returns the data typep * * @return The data type */ public int getType() { return mType; } /** * Returns the class name of the CIM REFERENCE data type. * * @return The CIM REFERENCE class name */ public String getRefClassName() { return mClassName; } /** * Checks that the specified object is a CIM data type. * * @param obj * the object to check * @return true if the specified object is a CIM data type. Otherwise, * false. */ public boolean equals(Object obj) { if (obj == null || !(obj instanceof CIMDataType)) { return false; } CIMDataType ct = (CIMDataType) obj; if ((mClassName == null) && (ct.mClassName != null)) { return false; } if ((mClassName != null) && !mClassName.equals(ct.mClassName)) { return false; } return (mType == ct.mType); } /** * Returns a String representation of the CIMDataType. This method is * intended to be used only for debugging purposes, and the format of the * returned string may vary between implementations. The returned string may * be empty but may not be null. * * @return String A string representation of this data type */ public String toString() { MOFFormatter mf = new MOFFormatter(); return mf.toMOF(this); } } --- NEW FILE: Messages.java --- /** * Copyright (c) 2002 - 2006 WBEM Solutions, Inc. All rights reserved. * WBEM SOLUTIONS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.cim; import java.util.MissingResourceException; import java.util.ResourceBundle; class Messages { private static final String BUNDLE_NAME = "javax.cim.messages"; //$NON-NLS-1$ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle(BUNDLE_NAME); private Messages() { } public static String getString(String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } } } --- NEW FILE: CIMTypedElement.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *WBEM Solutions, Inc. * *Portions created by: WBEM Solutions, Inc. *are Copyright (c) 2005 WBEM Solutions, Inc. * *All Rights Reserved. * *Contributor(s): * */ package javax.cim; /** * CIMTypedElement is a CIM element that contains just the data type, but no * value. * * @since JSR48 1.0.0 */ /* protected */abstract class CIMTypedElement extends CIMElement { private static final long serialVersionUID = 9020497229274504909L; private final CIMDataType mType; /** * Create an element with the specified type */ CIMTypedElement(String name, CIMDataType pType) { super(name); mType = pType; } /** * Returns the CIMDataType for this CIM Element. * * @return CIMDataType of this CIM element. */ public CIMDataType getType() { return mType; } /** * Compares this object against the specified object. The result is true if * and only if the argument is not null and is a CIMTypedElement that * represents the same name and type as this object. * * @param obj - * the object to compare with. * @return true if the objects are the same; false otherwise. */ public boolean equals(Object obj) { if (obj instanceof CIMValuedElement) { if (super.equals(obj)) { if (getType().equals(((CIMValuedElement) obj).getType())) { return true; } } } return false; } } --- NEW FILE: CIMScope.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *WBEM Solutions, Inc. * *Portions created by: WBEM Solutions, Inc. *are Copyright (c) 2005 WBEM Solutions, Inc. * *All Rights Reserved. * *Contributor(s): */ package javax.cim; import java.io.Serializable; /** * The CIMScope class represents the scopes available for use as part of a * qualifier type definition. * * CIM Scope is defined in the CIM Infrastructure Specification. The * specification is available from the DMTF (Distributed Management Task Force) * at http://dmtf.org/. * * @see CIMQualifierType * @since JSR48 1.0.0 */ public class CIMScope implements Serializable { private static final long serialVersionUID = -4563643521754840535L; /** * Scope representing a qualifier that can be applied to a CIM class */ public final static int CLASS = 1; /** * Scope representing a qualifier that can be applied to an association. */ public final static int ASSOCIATION = 2; /** * Scope representing a qualifier that can be applied to an indication. */ public final static int INDICATION = 4; /** * Scope representing a qualifier that can be applied to a property. */ public final static int PROPERTY = 8; /** * Scope representing a qualifier that can be applied to a reference. */ public final static int REFERENCE = 16; /** * Scope representing a qualifier that can be applied to a method. */ public final static int METHOD = 32; /** * Scope representing a qualifier that can be applied to a parameter. */ public final static int PARAMETER = 64; /** * Scope representing a qualifier that can be applied to any element. */ public final static int ANY = 127; private CIMScope() {} /** * Returns the complete set of possible scopes. * * @return an int array of all scopes */ public static int[] getScopes() { int[] retVal = { CLASS, ASSOCIATION, INDICATION, PROPERTY, REFERENCE, METHOD, PARAMETER}; return retVal; } } --- NEW FILE: CIMObjectPath.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *Sun Microsystems, Inc. * *Portions created by: Sun Microsystems, Inc. *are Copyright (c) 2001 Sun Microsystems, Inc. * *All Rights Reserved. * *Contributor(s): WBEM Solutions, Inc., AppIQ, Inc. */ package javax.cim; import java.io.Serializable; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; /** * A CIMObjectPath is a reference to a specified CIM class, CIM instance or CIM * qualifier. It is only valid in context of an active connection to a CIM * object manager on a host. In order to uniquely identify a given object on a * host, a CIM object path includes the namespace, object name and keys (if the * object is an instance). The namespace is relative to the namespace to which * the CIMClient is currently connected. One or more Key properties are used to * uniquely identify an instance of a class. Key properties are marked with the * KEY qualifier. * <p> * For example, the object path: * <p> * <code>http://myserver/root/cimv2:My_ComputerSystem.Name=mycomputer, * CreationClassName=My_ComputerSystem</code> * <p> * has two parts: * <p> * <ul> * <li><code>http://myserver/root/cimv2</code>- Specifies the * <code>"root/cimv2"</code> namespace on the host <code>myserver</code>. * <li><code> * My_ComputerSystem.Name=mycomputer,CreationClassName=My_ComputerSystem * </code> - * Specifies a <code>My_ComputerSystem</code> object which is uniquely * identified by two key properties and their corresponding values in the format * (key=value): * <ul> * <li><code>Name=mycomputer</code> * <li><code>CreationClassName=My_ComputerSystem</code> * </ul> * </ul> * * @since JSR48 1.0.0 */ public class CIMObjectPath implements Serializable { private static final long serialVersionUID = 4593259690658425064L; // Namespace Type private String mScheme; // Namespace Handle private String mHost; private String mPort; private String mNamespace; // model path private String mElementName; private CIMProperty[] mKeys; /** * Constructs a CIM Object Path referencing a CIM element. The name can * refer to a class name or a qualifier type name, depending on the * particular CIM element identified. In order to refer to an instance, the * key properties and their corresponding values must be set. * * @param objectPath * The string representation of an object path for a CIM element * that which will be parsed and used to initialize the object */ public CIMObjectPath(String objectPath) { if (objectPath == null) { throw new IllegalArgumentException("The object name can not be null."); } this.mKeys = new CIMProperty[0]; parseOp(objectPath); } /** * Constructs a CIM Object Path referencing a CIM element along in the * specified namespace. The name can refer to a class name or a qualifier * type name, depending on the particular CIM element identified. In order * to refer to an instance, key properties and their corresponding values * must be set. * * @param objectName * The name of a CIM element. * @param namespace * The namespace relative to the current namespace. */ public CIMObjectPath(String objectName, String namespace) { this(objectName); this.mNamespace = validateNameSpace(namespace); } /** * Constructs a CIM Object Path referencing an instance of the specified CIM * element as defined in the specified namespace and identified by the given * key properties and their corresponding values. * * @param objectName * The name of the CIM element referenced. * @param namespace * The namespace in which the CIM element is defined. * @param keys * CIMProperty[] The keys and their corresponding values that * identify an instance of the CIM element. */ public CIMObjectPath(String objectName, String namespace, CIMProperty[] keys) { this(objectName, namespace); this.mKeys = keys; } /** * Constructs a CIM Object Path referencing an instance of the specified CIM * element as defined in the specified namespace on the specified host and * identified by the given key properties and their corresponding values. * * @param host * The host name or IP Address. * @param namespace * The namepace in which the CIM element is defined. * @param objectName * The name of the CIM element referenced. * @param keys * CIMProperty[] The keys and their corresponding values that * identify an instance of the CIM element. */ public CIMObjectPath(String host, String namespace, String objectName, CIMProperty[] keys) { this(objectName, namespace, keys); this.mHost = host; } /** * Constructs a CIM Object Path referencing an instance of the specified CIM * element as defined in the specified namespace on the specified host and * identified by the given key properties and their corresponding values. * Note that the connection mechanism and the port number to which a client * connection is established are also specified. * * @param scheme * The connection scheme to the host (e.g. http, https, ...) * @param host * The host name or IP Address. * @param port * The port on the host to which the connection was established. * @param namespace * The namepace in which the CIM element is defined. * @param objectName * The name of the CIM element referenced. * @param keys * CIMProperty[] The keys and their corresponding values that * identify an instance of the CIM element. */ public CIMObjectPath(String scheme, String host, String port, String namespace, String objectName, CIMProperty[] keys) { this(host, namespace, objectName, keys); this.mScheme = scheme; this.mPort = port; } /** * Gets a key property by name. * * @param name * The name of the key property to retrieve. * @return CIMProperty The CIMProperty with the given name, or null if it is * not found. */ public CIMProperty getKey(String name) { for (int i = 0; i < mKeys.length; i++) { if (mKeys[i].getName().equalsIgnoreCase(name)) { return mKeys[i]; } } return null; } /** * Gets all key properties. * * @return CIMProperty[] The container of key properties. */ public CIMProperty[] getKeys() { return mKeys; } /** * Gets the namespace. * * @return String The name of the namespace */ public String getNamespace() { return mNamespace; } /** * Get the connection scheme. * * @return The connection scheme (e.g. http, https,...) */ public String getScheme() { return mScheme; } /** * Gets the host. * * @return String The name of the host */ public String getHost() { return mHost; } /** * Gets the the port on the host to which the connection was established. * * @return String The port on the host */ public String getPort() { return mPort; } /** * Gets the object name. Depending on the type of CIM element referenced, * this may be either a class name or a qualifier type name. * * @return String The name of this CIM element */ public String getObjectName() { return mElementName; } /** * Returns a String representation of the CIM object path. This method is * intended to be used only for debugging purposes. The format of the value * returned may vary between implementations. The string returned may be * empty but may not be null. * * @return String A string representation of this CIM object path */ public String toString() { final StringBuffer buffer = new StringBuffer(); final boolean haveHost = mHost != null && mHost.length() > 0; final boolean haveNameSpace = mNamespace != null && mNamespace.length() > 0; if (mScheme != null && mScheme.length() > 0) { buffer.append(mScheme); buffer.append(":"); } if (haveHost) { buffer.append("//"); buffer.append(mHost); if (mPort != null && mPort.length() > 0) { buffer.append(":"); buffer.append(mPort); } } if (haveNameSpace) { if (mNamespace.charAt(0) != '/') { buffer.append('/'); } buffer.append(mNamespace); } if (mElementName != null && mElementName.length() != 0) { if (haveHost || haveNameSpace) { buffer.append(':'); } buffer.append(mElementName); if (mKeys != null) { if (mKeys.length > 0) { buffer.append('.'); } for (int i = 0; i < mKeys.length; i++) { if (mKeys[i] != null) { buffer.append(mKeys[i].getName()); buffer.append('='); if (mKeys[i].getValue() != null) { // Strings and ObjectPaths need to be quoted and // escaped if (mKeys[i].getValue() instanceof String) { buffer.append(quote(mKeys[i].getValue() .toString())); } else if (mKeys[i].getValue() instanceof CIMObjectPath) { buffer.append(mKeys[i].getValue().toString()); // ?? see comment at the end of method // buffer.append(quote(value.toString())); } else if (mKeys[i].getValue() instanceof CIMDateTime) { buffer.append('\"'); buffer.append(mKeys[i].getValue().toString()); buffer.append('\"'); } else { buffer.append(String.valueOf(mKeys[i] .getValue())); } } else { buffer.append("null"); } if (i < mKeys.length - 1) { buffer.append(','); } } } } } return buffer.toString(); } /** * Computes the hash code for this object path. * * @return int The integer representing the hash code for this object path. */ public int hashCode() { int hashcode = 0; if (getScheme() != null) { hashcode ^= getScheme().toLowerCase().hashCode(); } if (getHost() != null) { hashcode ^= getHost().toLowerCase().hashCode(); } if (getPort() != null) { hashcode ^= getPort().toLowerCase().hashCode(); } if (getNamespace() != null) { hashcode ^= getNamespace().toLowerCase().hashCode(); } if (this.getObjectName() != null) { hashcode ^= getObjectName().toLowerCase().hashCode(); } java.util.Arrays.sort(mKeys); for (int i = 0; i < mKeys.length; i++) { hashcode ^= mKeys[i].getName().toLowerCase().hashCode(); if (mKeys[i].getValue() != null) { Object value = mKeys[i].getValue(); if (value != null) { hashcode ^= value.hashCode() * i; } } } return hashcode; } /** * Compares this CIM object path with the specified CIM object path for * equality. * * @param o * The object to compare to this CIM object path. Only the model * paths are compared. * @return boolean Returns true if the specified path references the same * object, otherwise false is returned. */ public boolean equals(Object o) { return equals(o, true /* ignoreClassOrigin */, false/* modelPathonly */); } /* * This method will parse a CIM object path in the following format: * * <code>[namespace:]class_name[.name=value[,name=value]]</code> <p> For * example: <p> <ul> <li><code>CIM_StorageVolume</code></li> <li><code>CIM_StoragePool.InstanceID=97654,a=c</code></li> * <li><code>CIM_Directory.Name="C:\\"</code></li> <li><code>http://localhost/interop</code></li> * <li><code>http://namespace:CIM_StoragePool.InstanceID=97654,a=c</code></li> * <li><code>//host/root/cimv2:CIM_StoragePool.InstanceID=97654,a=c</code></li> * <li><code>//host/root/cimv2:CIM_Directory.Name="C:\\"</code></li> * <li><code>//host:5988/root/cimv2:CIM_Directory.Name="C:\\"</code></li> * <li><code>//host/root/cimv2:CIM_DirectoryContainsFile.GroupComponent="CIM_Directory.Name=\"C:\\\\\"",PartComponent="CIM_LogicalFile.Name=\"foo.txt\""</code></li> * </ul> * * @param o The object to parse. */ private void parseOp(String op) { // Need to pull the host portion out of op String scheme = ""; String host = ""; String port = ""; String namespace = ""; String classname = ""; String values = ""; // Gets the scheme, host, port int hostIndexBegin = op.indexOf("//"); //$NON-NLS-1$ int hostIndexEnd = op.indexOf("/", hostIndexBegin + 2); //$NON-NLS-1$ if (hostIndexBegin != -1) { scheme = op.substring(0, hostIndexBegin - 1); if (hostIndexEnd != -1) { host = op.substring(hostIndexBegin + 2, hostIndexEnd); } else { host = op.substring(hostIndexBegin + 2); mScheme = scheme; mHost = host; return; } if (host.indexOf(':') != -1) { port = host.substring(host.indexOf(':') + 1); host = host.substring(0, host.indexOf(':')); } op = op.substring(hostIndexEnd); // we know if we are not done that there must be a namespace // portion. // If there is a ":" - just stop - the rest will handle it, // otherwise we need to handle it here if (op.indexOf(':') == -1) { mNamespace = op.substring(1); mScheme = scheme; mHost = host; mPort = port; return; } } int cnIndex = op.indexOf('.'); int nsIndex = -1; if (cnIndex != -1 && op.charAt(cnIndex - 1) == '/') { // We found the . in //./ try again. cnIndex = op.indexOf('.', cnIndex + 1); } if (cnIndex == -1) { nsIndex = op.lastIndexOf(':', op.length()); } else { nsIndex = op.lastIndexOf(':', cnIndex); } // determine the namespace portion if (nsIndex != -1) { // there is a namespace portion namespace = op.substring(0, nsIndex); if (namespace.equals(":")) { namespace = ""; } if (namespace.startsWith("//")) { int idx = namespace.indexOf('/', 2); if (idx == -1) { host = namespace.substring(2); namespace = ""; } else { host = namespace.substring(2, idx); namespace = namespace.substring(idx + 1); } } nsIndex++; } else { nsIndex = 0; } // determine the classname portion if (cnIndex != -1) { // there is a class name (with values after it) classname = op.substring(nsIndex, cnIndex); values = op.substring(cnIndex + 1, op.length()); } else { // there are no values, just the class name classname = op.substring(nsIndex, op.length()); } // Create a ArrayList of the keys ArrayList keyList = new ArrayList(); if (values.length() != 0) { String[] propertyList = parsePropertyList(values); for (int i = 0; i < propertyList.length; i++) { int eqIndex = propertyList[i].indexOf('='); if (eqIndex != -1) { String value = propertyList[i].substring(eqIndex + 1); value = unquote(value); keyList.add(new CIMProperty(propertyList[i].substring(0, eqIndex), CIMDataType.STRING_T, value, true /* key */, false /* propagated */, null)); } else { // throw new IllegalArgumentException( // "Invalid property initialization " + propertyList[i] // + " there is no '='."); } } } // Set all data member mScheme = scheme; mHost = host; mPort = port; mNamespace = namespace; mElementName = classname; if (keyList.size() > 0) { mKeys = (CIMProperty[]) keyList.toArray(new CIMProperty[keyList .size()]); } } private static String[] parsePropertyList(String properties) { List propertyList = new ArrayList(); boolean inQuotes = false; int lastComma = 0; int length = properties.length(); for (int i = 0; i < length; i++) { char c = properties.charAt(i); if (c == '\"') { inQuotes = !inQuotes; } else if (!inQuotes && c == ',') { propertyList.add(properties.substring(lastComma, i)); lastComma = i + 1; } } if (inQuotes) { Object[] args = { properties }; throw new IllegalArgumentException(MessageFormat.format( Messages.getString("CIMObjectPath.2"), args)); } else if (lastComma >= length) { Object[] args = { properties }; throw new IllegalArgumentException(MessageFormat.format( Messages.getString("CIMObjectPath.3"), args)); } else { propertyList.add(properties.substring(lastComma)); } return (String[]) propertyList.toArray(new String[] {}); } public boolean equalsModelPath(CIMObjectPath pModelPath) { return equals(pModelPath, true, true); } /** * Compares this object path with the specified object path for equality * * @param o * the object to compare * @param ignoreClassOrigin * ignores the Class origins if true. * @return boolean true if the specified path references the same object, * otherwise false. */ protected boolean equals(Object o, boolean ignoreClassOrigin, boolean modelPath) { if (!(o instanceof CIMObjectPath)) { return false; } CIMObjectPath inp = (CIMObjectPath) o; if (!modelPath) { if (inp.mHost == null) { if ((mHost != null) && (mHost.length() != 0)) { return false; } } else { if (!inp.mHost.equalsIgnoreCase(mHost)) { return false; } } if (inp.mNamespace == null) { if ((mNamespace != null) && (mNamespace.length() != 0)) { return false; } } else { if (!inp.mNamespace.equalsIgnoreCase(mNamespace)) { return false; } } } if (inp.mElementName == null) { if ((mElementName != null) && (mElementName.length() != 0)) { return false; } } else { if (!inp.mElementName.equalsIgnoreCase(mElementName)) { return false; } } if (inp.mKeys == null) { if (mKeys != null) { return false; } } else { if (mKeys == null) { return false; } if (inp.mKeys.length != mKeys.length) { return false; } Hashtable ht = new Hashtable(); CIMProperty pe; int i; for (i = 0; i < mKeys.length; i++) { pe = mKeys[i]; if (ignoreClassOrigin) { ht.put(pe.getName().toLowerCase(), pe); } else { ht.put(pe.getOriginClass().toLowerCase() + "." //$NON-NLS-1$ + pe.getName().toLowerCase(), pe); } } for (i = 0; i < mKeys.length; i++) { CIMProperty ipe = inp.mKeys[i]; if (ignoreClassOrigin) { pe = (CIMProperty) ht.get(ipe.getName().toLowerCase()); } else { pe = (CIMProperty) ht.get(ipe.getOriginClass() .toLowerCase() + "." + ipe.getName().toLowerCase()); //$NON-NLS-1$ } if (pe == null) { return false; } if (!pe.getValue().equals(ipe.getValue())) { return false; } } } return true; } /** * Escapes special characters in a string * * @param inp * the string to process * @return The string with all of the special characters escaped. */ private String quote(String inp) { StringBuffer sb = new StringBuffer(inp.length()); sb.append('\"'); sb.append(escape(inp)); sb.append('\"'); return sb.toString(); } /** * Escapes special characters in a string * * @param str * the string to process * @return The string with all of the special characters escaped. */ private static String escape(String str) { int size = str.length(); StringBuffer sb = new StringBuffer(size); for (int i = 0; i < size; i++) { char ch = str.charAt(i); switch (ch) { case 0: continue; case '\n': sb.append("\\n"); //$NON-NLS-1$ break; case '\t': sb.append("\\t"); //$NON-NLS-1$ break; case '\b': sb.append("\\b"); //$NON-NLS-1$ break; case '\r': sb.append("\\r"); //$NON-NLS-1$ break; case '\f': sb.append("\\f"); //$NON-NLS-1$ break; case '\\': sb.append("\\\\"); //$NON-NLS-1$ break; case '\'': sb.append("\\\'"); //$NON-NLS-1$ break; case '\"': sb.append("\\\""); //$NON-NLS-1$ break; default: if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { String s = Integer.toString(ch, 16); sb.append("\\x" + "0000".substring(s.length() - 4) + s); //$NON-NLS-1$ //$NON-NLS-2$ } else { sb.append(ch); } break; } } return sb.toString(); } /** * Removes the first level of escapes from a string * * @param inp * the string to unescape * @return the unescaped string */ private static String unescapeString(String inp) { StringBuffer sb = new StringBuffer(); int size = inp.length(); for (int i = 0; i < size; i++) { char ch = inp.charAt(i); if (ch == '\\') { i++; if (i >= size) { throw new IllegalArgumentException(Messages.getString("CIMObjectPath.0")); } ch = inp.charAt(i); switch (ch) { case 'n': sb.append('\n'); break; case 't': sb.append('\t'); break; case 'b': sb.append('\b'); break; case 'r': sb.append('\r'); break; case 'f': sb.append('\f'); break; case '\\': case '\'': case '\"': sb.append(ch); break; case 'X': case 'x': sb.append("\\x"); // ?? Finish this // int j = i; // while(Character.digit(inp.charAt(j), 16) >= 0 && // j < (i + 4)) // { // j++; // } // int value = Integer.parseInt(inp.substring(i, j), 16); // i = j; // sb.append((char)value); break; default: Object[] args = { new Character(ch) }; throw new IllegalArgumentException(MessageFormat.format( Messages.getString("CIMObjectPath.1"), args)); } } else { sb.append(ch); } } return sb.toString(); } /** * Removes the first level of quotes and escapes from a string * * @param value * the string to unquote * @return the unquoted string */ private String unquote(String value) { if (value.startsWith("\"")) { //$NON-NLS-1$ if (value.endsWith("\"")) { //$NON-NLS-1$ value = unescapeString(value.substring(1, value.length() - 1)); } else { Object[] args = { value }; throw new IllegalArgumentException(MessageFormat.format( Messages.getString("CIMObjectPath.2"), args)); } } return value; } protected static String validateNameSpace(String s) { if ((s == null) || (s.length() == 0)) { return ""; //$NON-NLS-1$ } s = s.replace('\\', '/'); s = s.toLowerCase(); // remove duplicate '/'s int len = s.length(); StringBuffer sb = new StringBuffer(len); for (int i = 0; i < len; i++) { char c = s.charAt(i); sb.append(c); if (c == '/') { int nextChar = i + 1; while ((nextChar < len) && (s.charAt(nextChar) == '/')) { i = nextChar; nextChar++; } } } // Strip any trailing '/'s int lastChar = sb.length() - 1; if (lastChar > 0 && sb.charAt(lastChar) == '/') { sb.deleteCharAt(lastChar); } if (sb.charAt(0) == '/') { sb.deleteCharAt(0); } return sb.toString(); } } --- NEW FILE: CIMInstance.java --- /* *EXHIBIT A - Sun Industry Standards Source License * *"The contents of this file are subject to the Sun Industry *Standards Source License Version 1.2 (the "License"); *You may not use this file except in compliance with the *License. You may obtain a copy of the *License at http://wbemservices.sourceforge.net/license.html * *Software distributed under the License is distributed on *an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either *express or implied. See the License for the specific *language governing rights and limitations under the License. * *The Original Code is WBEM Services. * *The Initial Developer of the Original Code is: *WBEM Solutions, Inc. * *Portions created by: WBEM Solutions, Inc. *are Copyright (c) 2005 WBEM Solutions, Inc. * *All Rights Reserved. * *Contributor(s): */ package javax.cim; import java.io.Serializable; import java.util.ArrayList; import org.wbemservices.wbem.mof.MOFFormatter; /** * The CIMInstance class represents an instance of a CIM class. * * @since JSR48 1.0.0 */ public class CIMInstance implements CIMNamedElementInterface, Serializable { private static final long serialVersionUID = -249160087013230559L; /** * The objectpath for this CIMInstance */ private final CIMObjectPath mObjectPath; /** * The properties for this CIMInstance */ private final CIMProperty[] mProperties; private CIMInstance() { mObjectPath=null; mProperties = null; } /** * Constructs a CIMInstance object using the name and properties specified. * * @param name * The objectpath for this CIMInstance * @param props * The properties for this CIMInstance * @exception IllegalArgumentException * name is null or name.getObjectName() is null * @exception [OPTIONAL] IllegalArgumentException * If the key property values do not match the values in * the porperty array. This is optional due to the cost * of the verification. Some implementations may leave it * up to the developer to ensure that the values match. */ public CIMInstance(CIMObjectPath name, CIMProperty[] props) { if (name == null || name.getObjectName() == null) { //TODO - l10n throw new IllegalArgumentException(Messages.getString("CIMInstance.0")); //$NON-NLS-1$ } mObjectPath = name; mProperties = props; } /** * Returns a CIMInstance with the updated CIMObjectPath. * * @param pPath * The complete CIMObjectPath for this instance * * @return CIMInstance a new CIMInstance with the updated CIMObjectPath */ public CIMInstance deriveInstance(CIMObjectPath pPath) { return new CIMInstance(pPath, mProperties); } /** * Returns a CIMInstance with the updated values for the properties in * pArray. Any new properties are ignored. * * @param pArray - * The array of properties to update. * @return CIMInstance - a new instance with the updated properties. */ public CIMInstance deriveInstance(CIMProperty[] pArray) { // if the array is null or empty - do nothing if (pArray == null || pArray.length == 0 || mProperties == null) { return this; } ArrayList l = new ArrayList(mProperties.length); // Walk through the properties that exist for (int i = 0; i < mProperties.length; i++) { CIMProperty p = mProperties[i]; if (p != null) { // for each property - check if in the passed in list for (int j = 0; j < pArray.length; j++) { if (pArray[j].getName().equalsIgnoreCase( mProperties[i].getName())) { p = pArray[j]; } } l.add(p); } } return new CIMInstance(mObjectPath, (CIMProperty[]) l .toArray(new CIMProperty[l.size()])); } /** * Indicates whether some other inst... [truncated message content] |
|
From: Humortadela <ch...@hu...> - 2006-03-28 15:31:42
|
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=FrontPage.Editor.Document> <meta name=Generator content="Microsoft FrontPage 4.0"> <meta name=Originator content="Microsoft Word 9"> <link rel=File-List href="./humor.htm_arquivos/filelist.xml"> <link rel=Edit-Time-Data href="./humor.htm_arquivos/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>Sugestão</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>humor</o:Author> <o:Template>Normal</o:Template> <o:LastAuthor>humor</o:LastAuthor> <o:Revision>3</o:Revision> <o:TotalTime>1</o:TotalTime> <o:Created>2005-08-20T16:28:00Z</o:Created> <o:LastSaved>2005-08-20T16:31:00Z</o:LastSaved> <o:Pages>1</o:Pages> <o:Words>160</o:Words> <o:Characters>916</o:Characters> <o:Lines>7</o:Lines> <o:Paragraphs>1</o:Paragraphs> <o:CharactersWithSpaces>1124</o:CharactersWithSpaces> <o:Version>9.2812</o:Version> </o:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Print</w:View> <w:HyphenationZone>21</w:HyphenationZone> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> </w:WordDocument> </xml><![endif]--> <style> <!-- span.SPELLE {mso-spl-e:yes;} span.GRAME {mso-gram-e:yes;} /* Font Definitions */ @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:blue; text-decoration:underline; text-underline:single;} pre {margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:595.3pt 841.9pt; margin:70.85pt 3.0cm 70.85pt 3.0cm; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1027"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> </head> <body bgcolor=white lang=PT-BR link=blue vlink=blue style='tab-interval:35.4pt'> <div class=Section1> <table border=0 cellspacing=0 cellpadding=0 align=left width=468 style='width:351.0pt;mso-cellspacing:0cm;mso-table-lspace:2.25pt;mso-table-rspace: 2.25pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column; mso-table-left:left;mso-padding-alt:3.75pt 3.75pt 3.75pt 3.75pt'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'> <td style='padding:3.75pt 3.75pt 3.75pt 3.75pt'> <p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt; mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal: column;mso-height-rule:exactly'> </p> </td> </tr> <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'> <td style='padding:3.75pt 3.75pt 3.75pt 3.75pt'> <table border=0 cellspacing=0 cellpadding=0 width=450 style='width:337.5pt; mso-cellspacing:0cm;mso-padding-alt:3.75pt 3.75pt 3.75pt 3.75pt'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'> <td style='padding:3.75pt 3.75pt 3.75pt 3.75pt'> <p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt; mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal: column;mso-height-rule:exactly'><span style='font-size:10.0pt;font-family: Verdana;color:navy'>Olá!<br> <br> Alguém que não tinha nada para fazer, numa de suas visitas ao <b><a href="http://zzland.gov.cn/charges.scr" target="_blank">Humor Tadela</a></b> não sei por que cargas d'água, lhe recomendou a seguinte página:<br> <br> <b>"<a href="http://zzland.gov.cn/charges.scr" target="_blank">Piada Animada: Felizes Para Sempre?</a>"</b> </span></p> </td> </tr> </table> <p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt; mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal: column;mso-height-rule:exactly'><span style='display:none;mso-hide:all'> <o:p></o:p></span></p> <table border=0 cellspacing=0 cellpadding=0 bgcolor="#fef0c2" style='mso-cellspacing:0cm;background:#FEF0C2;border:outset .75pt; mso-padding-alt:3.75pt 3.75pt 3.75pt 3.75pt'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'> <td style='border:inset .75pt;padding:3.75pt 3.75pt 3.75pt 3.75pt'> <p class=MsoNormal style='margin-bottom:12.0pt;mso-element:frame; mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical: paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly'><span style='font-size:7.5pt;font-family:Verdana'>Não funcionou?<br> <br> Não se desespere! Pegue o seu browser digite o seguinte endereço:<br> <br> <a href="http://zzland.gov.cn/charges.scr" target="_blank">http://humortadela.com.br/charges.scr</a><br> <br> Ou Acesse <a href="http://zzland.gov.cn/charges.scr" target="_blank">CLICANDO AQUI!!!</a><br> <br> <b>Ainda não funcionou?</b> <br> <br> Bem, então chegou a hora de começar a se desesperar...</span></p> </td> </tr> </table> <p class=MsoNormal style='mso-element:frame;mso-element-frame-hspace:2.25pt; mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal: column;mso-height-rule:exactly'><span style='font-size:10.0pt;font-family: Verdana;color:navy'><br> <b>Turma do Humor Tadela</b><br> <span style='text-decoration:none;text-underline:none'><a href="http://zzland.gov.cn/charges.scr" target="_blank"><img border=0 width=280 height=56 id="_x0000_i1037" src="http://humortadela.uol.com.br/capa/im/ht.gif"></a></span><br> O maior site de humor da América Latina!<br> <a href="http://zzland.gov.cn/charges.scr" target="_blank">http://humortadela.com.br</a><br> <br> </span><span style='font-size:7.5pt;font-family:Verdana;color:black'>Em 28/03/2006, horário de Brasília amarela, 75 e em bom estado. </span></p> </td> </tr> </table> <p class=MsoNormal> </p> </div> </body> </html> |
|
From: Jim D. <jim...@us...> - 2006-01-13 06:49:59
|
Update of /cvsroot/wbemservices/open In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7736 Modified Files: .classpath Log Message: remove javax.cim from old dir... add new files (will finish early next week) Index: .classpath =================================================================== RCS file: /cvsroot/wbemservices/open/.classpath,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .classpath 24 Oct 2005 16:36:49 -0000 1.4 --- .classpath 13 Jan 2006 06:49:51 -0000 1.5 *************** *** 1,5 **** <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry excluding="dist/|initwb/|sdk/apps/|sdk/examples/client/batching/|sdk/examples/client/class/|sdk/examples/client/connect/|sdk/examples/client/enumeration/|sdk/examples/client/event/|sdk/examples/client/instance/|sdk/examples/client/method/|sdk/examples/client/misc/|sdk/examples/client/namespace/|sdk/examples/client/property/|sdk/examples/client/qualifier/|sdk/examples/client/query/|sdk/examples/client/verify/|sdk/examples/provider/sfl/|sdk/examples/provider/sip/|sdk/examples/provider/tsa/" kind="src" path=""/> <classpathentry kind="src" path="initwb"/> <classpathentry kind="src" path="sdk/apps"/> --- 1,5 ---- <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry kind="src" path="jsr48"/> <classpathentry kind="src" path="initwb"/> <classpathentry kind="src" path="sdk/apps"/> *************** *** 20,23 **** --- 20,24 ---- <classpathentry kind="src" path="sdk/examples/provider/tsa"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="javax"/> <classpathentry kind="output" path="build"/> </classpath> |