You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2004/01/01 06:45:52 UTC
cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info Type.java
sanjaya 2003/12/31 21:45:52
Modified: c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info Tag:
CWrapperSupport Type.java
Log:
1.Added two new Vector vElements vAttributes and populate them in setTypeForAttributeName and setTypeNameForElementName.
2.changed the signature of getAttributeName and getElementNames.
Revision Changes Path
No revision
No revision
1.4.4.3 +18 -8 ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java
Index: Type.java
===================================================================
RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java,v
retrieving revision 1.4.4.2
retrieving revision 1.4.4.3
diff -u -r1.4.4.2 -r1.4.4.3
--- Type.java 16 Dec 2003 10:38:37 -0000 1.4.4.2
+++ Type.java 1 Jan 2004 05:45:51 -0000 1.4.4.3
@@ -95,8 +95,16 @@
private String languageSpecificName;
/* element names and the type of the elements (QName,ElementInfo)*/
private Hashtable elements;
+ /* This vector was added to preserve the order of types parsed from the wsdl.
+ * This may be a hack. Should be improved if necessary
+ */
+ private Vector vElements;
/* attribute names and the type of the attributes (QName,QName)*/
private Hashtable attributes;
+ /* This vector was added to preserve the order of types parsed from the wsdl.
+ * This may be a hack. Should be improved if necessary
+ */
+ private Vector vAttributes;
/* has the attributes are specified with order <sequence> in the schema */
private boolean hasOrder;
/*if order presents the order is set in the vector */
@@ -117,6 +125,8 @@
this.name = name;
elements = new Hashtable();
attributes = new Hashtable();
+ vElements = new Vector();
+ vAttributes = new Vector();
if(language == null)
this.language = WrapperConstants.LANGUAGE_JAVA;
else
@@ -161,8 +171,9 @@
this.name = name;
}
- public Enumeration getAttributeNames() {
- return this.attributes.keys();
+ public Iterator getAttributeNames()
+ {
+ return this.vAttributes.iterator();
}
@@ -175,14 +186,16 @@
if (hasOrder)
this.attribOrder.add(attribName);
this.attributes.put(attribName, type);
+ this.vAttributes.add(attribName);
}
public Type getTypForAttribName(String attribName) {
return (Type) this.attributes.get(attribName);
}
- public Enumeration getElementnames() {
- return this.elements.keys();
+ public Iterator getElementnames()
+ {
+ return this.vElements.iterator();
}
@@ -195,6 +208,7 @@
if (hasOrder)
this.attribOrder.add(attribName);
this.elements.put(attribName, element);
+ this.vElements.add(attribName);
}
public ElementInfo getElementForElementName(String attribName) {
@@ -205,10 +219,6 @@
public void setAttribOrder(Vector order) {
this.attribOrder = order;
}
-
-
-
-
public boolean hasOrder() {
return this.hasOrder;