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 ro...@apache.org on 2004/10/15 08:54:53 UTC
cvs commit: ws-axis/c/src/soap CharacterElement.h ComplexElement.h ComplexElement.cpp
roshan 2004/10/14 23:54:53
Modified: c/include/axis/server BasicNode.h
c/src/soap CharacterElement.h ComplexElement.h
ComplexElement.cpp
Log:
bug fix AXISCPP-122
Revision Changes Path
1.22 +11 -0 ws-axis/c/include/axis/server/BasicNode.h
Index: BasicNode.h
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/server/BasicNode.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- BasicNode.h 7 Aug 2004 06:52:22 -0000 1.21
+++ BasicNode.h 15 Oct 2004 06:54:53 -0000 1.22
@@ -148,6 +148,17 @@
const AxisChar* prefix, const AxisChar* value)=0 ;
/**
+ * Creates an Attribute and adds it to this Basic Node.
+ *
+ * @param localname The local name of the attribute.
+ * @param value The value of the attribute.
+ *
+ * @return A pointer to the created Attribute will be returned.
+ */
+ virtual IAttribute* createAttribute(const AxisChar* localname,
+ const AxisChar* value)=0 ;
+
+ /**
* Returns the local name of this node. The operation
* behavior depends on the TYPE of the node.
*
1.13 +13 -0 ws-axis/c/src/soap/CharacterElement.h
Index: CharacterElement.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/CharacterElement.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CharacterElement.h 6 Aug 2004 14:44:35 -0000 1.12
+++ CharacterElement.h 15 Oct 2004 06:54:53 -0000 1.13
@@ -118,6 +118,19 @@
IAttribute* createAttribute(const AxisChar* localname,
const AxisChar* prefix, const AxisChar* value) { return NULL; }
+ /**
+ * This method is overridden to always return NULL because this is a CharacterElement.
+ * A user of a CharacterElement should not use this method
+ *
+ * @param localname The local name of the attribute.
+ * @param value The value of the attribute.
+ *
+ * @return Will always return NULL
+ */
+ IAttribute* createAttribute(const AxisChar* localname,
+ const AxisChar* value) { return NULL; }
+
+
bool operator ==( const CharacterElement &objChEle);
/**
1.18 +11 -0 ws-axis/c/src/soap/ComplexElement.h
Index: ComplexElement.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/ComplexElement.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ComplexElement.h 6 Aug 2004 14:44:36 -0000 1.17
+++ ComplexElement.h 15 Oct 2004 06:54:53 -0000 1.18
@@ -136,6 +136,17 @@
const AxisChar* prefix, const AxisChar* value);
/**
+ * Creates an Attribute and adds it to this Complex Element.
+ *
+ * @param localname The local name of the attribute.
+ * @param value The value of the attribute.
+ *
+ * @return A pointer to the created Attribute will be returned.
+ */
+ IAttribute* createAttribute(const AxisChar* localname,
+ const AxisChar* value);
+
+ /**
* Returns the number of child elements of this ComplexElement.
*
* @return The number of child elements of this ComplexElement.
1.25 +10 -0 ws-axis/c/src/soap/ComplexElement.cpp
Index: ComplexElement.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/ComplexElement.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ComplexElement.cpp 24 Aug 2004 14:31:58 -0000 1.24
+++ ComplexElement.cpp 15 Oct 2004 06:54:53 -0000 1.25
@@ -147,6 +147,16 @@
return (IAttribute*)pAttribute;
}
+IAttribute* ComplexElement::createAttribute(const AxisChar *localname,
+ const AxisChar *value)
+{
+ Attribute* pAttribute = new Attribute(localname, "", value);
+ m_attributes.push_back(pAttribute);
+
+ return (IAttribute*)pAttribute;
+}
+
+
int ComplexElement::setPrefix(const AxisChar* pachPrefix)
{
m_pachPrefix = (AxisChar*) malloc(strlen(pachPrefix)+1);