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 na...@apache.org on 2008/10/08 22:54:25 UTC

svn commit: r702986 - in /webservices/axis/trunk/c: include/axis/ include/axis/client/ src/cbindings/ src/cbindings/client/ src/common/ src/engine/client/ src/soap/ src/soap/xsd/ src/wsdl/org/apache/axis/wsdl/wsdl2ws/ src/wsdl/org/apache/axis/wsdl/wsdl...

Author: nadiramra
Date: Wed Oct  8 13:54:24 2008
New Revision: 702986

URL: http://svn.apache.org/viewvc?rev=702986&view=rev
Log:
AXISCPP-1002 - Support for xsd:anyType

Added:
    webservices/axis/trunk/c/src/soap/xsd/AnyType2.cpp
    webservices/axis/trunk/c/src/soap/xsd/AnyType2.hpp
Modified:
    webservices/axis/trunk/c/include/axis/AxisUserAPI.h
    webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp
    webservices/axis/trunk/c/include/axis/AxisUserAPIArrays.hpp
    webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.h
    webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.hpp
    webservices/axis/trunk/c/include/axis/TypeMapping.h
    webservices/axis/trunk/c/include/axis/TypeMapping.hpp
    webservices/axis/trunk/c/include/axis/client/Call.h
    webservices/axis/trunk/c/include/axis/client/Call.hpp
    webservices/axis/trunk/c/src/cbindings/AxisC.cpp
    webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp
    webservices/axis/trunk/c/src/cbindings/IWrapperSoapDeSerializerC.cpp
    webservices/axis/trunk/c/src/cbindings/client/CallC.cpp
    webservices/axis/trunk/c/src/common/AxisUserAPI.cpp
    webservices/axis/trunk/c/src/common/AxisUtils.cpp
    webservices/axis/trunk/c/src/common/AxisUtils.h
    webservices/axis/trunk/c/src/common/BasicTypeSerializer.cpp
    webservices/axis/trunk/c/src/engine/client/Call.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPI.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/AxisUserAPI.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPI.h (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPI.h Wed Oct  8 13:54:24 2008
@@ -126,6 +126,12 @@
 typedef AxiscChar * xsdc__NMTOKENS;
 
 /**
+ * @typedef xsdc__NMTOKENS
+ * Axis C++ defined type for xml basic type NMTOKENS
+ */
+typedef AxiscChar * xsdc__anyType;
+
+/**
  * @typedef xsdc__integer
  * Axis C++ defined type for xml basic type integer
  */
@@ -504,6 +510,7 @@
 AXISC_DEFINED_POINTER_ARRAY(xsdc__anyURI)
 AXISC_DEFINED_POINTER_ARRAY(xsdc__QName)
 AXISC_DEFINED_POINTER_ARRAY(xsdc__NOTATION)
+AXISC_DEFINED_POINTER_ARRAY(xsdc__anyType)
 
 
 #ifdef __cplusplus

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPI.hpp Wed Oct  8 13:54:24 2008
@@ -110,6 +110,11 @@
  */
 typedef AxisChar * xsd__NMTOKENS;
 /**
+ * @typedef xsd__anyType
+ * Axis C++ defined type for xml anyType
+ */
+typedef AxisChar * xsd__anyType;
+/**
  * @typedef xsd__integer
  * Axis C++ defined type for xml basic type integer
  */

Modified: webservices/axis/trunk/c/include/axis/AxisUserAPIArrays.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/AxisUserAPIArrays.hpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisUserAPIArrays.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisUserAPIArrays.hpp Wed Oct  8 13:54:24 2008
@@ -952,6 +952,47 @@
 };
 
 /**
+ * @class xsd__string_Array
+ * 
+ * The storage class for arrays of xsd__string
+ * 
+ */
+class STORAGE_CLASS_INFO xsd__anyType_Array : public Axis_Array {
+  public:
+    /**
+     * Constructor
+     */
+    xsd__anyType_Array();
+
+    /**
+     * Copy constructor
+     * @param original xsd__anyType_Array to copy.
+     */
+    xsd__anyType_Array(const xsd__anyType_Array & original);
+        
+    /**
+     * Destructor
+     */
+    virtual ~xsd__anyType_Array();
+    
+    /**
+     * Populate the array from a c-style array
+     * 
+     * @param array is a c-style array of pointers to the xsd__anyType data.
+     * @param size of the array, including NULL entries.
+     */
+     void set(xsd__anyType* array, int size);
+
+    /**
+     * Return a c-style array.
+     * 
+     * @param size will be updated with the size of the array returned.
+     * @return c-style array of pointers to the xsd__anyType data.
+     */
+    const xsd__anyType* get(int& size) const;
+};
+
+/**
  * @class xsd__boolean_Array
  * 
  * The storage class for arrays of xsd__boolean

Modified: webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.h (original)
+++ webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.h Wed Oct  8 13:54:24 2008
@@ -608,6 +608,17 @@
 	const AxiscChar * pNamespace);
 
 /**
+ * Method used by wrapper to deserialize an xsd:anyType element
+ *
+ * @param pName SOAP element name
+ * @param pNamespace SOAP namespace
+ * @return deserialized xsd:anyType value
+ */
+AXISC_STORAGE_CLASS_INFO
+xsdc__anyType axiscSoapDeSerializerGetElementAsAnyType(AXISCHANDLE wrapperSoapDeSerializer, const AxiscChar * pName, 
+	const AxiscChar * pNamespace);
+
+/**
  * Method used by wrapper to deserialize an xsd:int attribute
  *
  * @param pName SOAP attribute name

Modified: webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.hpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.hpp (original)
+++ webservices/axis/trunk/c/include/axis/IWrapperSoapDeSerializer.hpp Wed Oct  8 13:54:24 2008
@@ -538,6 +538,16 @@
                                                         const AxisChar* pNamespace)=0;
 
     /**
+     * Method used by wrapper to deserialize an xsd:anyType element
+     * 
+     * @param pName SOAP element name
+     * @param pNamespace SOAP namespace
+     * @return deserialized xsd:anyType value
+     */
+    virtual xsd__anyType AXISCALL getElementAsAnyType(const AxisChar* pName,
+                                                      const AxisChar* pNamespace)=0;
+    
+    /**
      * Method used by wrapper to deserialize an xsd:int attribute
      * 
      * @param pName SOAP attribute name

Modified: webservices/axis/trunk/c/include/axis/TypeMapping.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/TypeMapping.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/TypeMapping.h (original)
+++ webservices/axis/trunk/c/include/axis/TypeMapping.h Wed Oct  8 13:54:24 2008
@@ -288,7 +288,12 @@
     /**
      * Attachment
      */
-    C_ATTACHMENT
+    C_ATTACHMENT,
+    
+    /**
+     * xsd:anyType
+     */
+    XSDC_ANYTYPE    
 } AXISC_XSDTYPE;
 
 /**

Modified: webservices/axis/trunk/c/include/axis/TypeMapping.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/TypeMapping.hpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/TypeMapping.hpp (original)
+++ webservices/axis/trunk/c/include/axis/TypeMapping.hpp Wed Oct  8 13:54:24 2008
@@ -292,7 +292,12 @@
     /**
      * Attachment
      */
-    ATTACHMENT
+    ATTACHMENT,
+    
+    /**
+     * xsd:anyType
+     */
+    XSD_ANYTYPE
 } XSDTYPE;
 
 /**

Modified: webservices/axis/trunk/c/include/axis/client/Call.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/client/Call.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Call.h (original)
+++ webservices/axis/trunk/c/include/axis/client/Call.h Wed Oct  8 13:54:24 2008
@@ -1008,6 +1008,19 @@
 	const AxiscChar * pNamespace);
 
 /**
+ * Method used by stubs to get a deserialized value of XML element as any type.
+ *
+ * @param pName null terminated character string that contains the name of
+ * the tag containing the element.
+ * @param pNamespace null terminated character string that contains the
+ * namespace of the tag containing the element.
+ * @return pointer to xsd__anyType type containing the contents of the element.
+ */
+AXISC_STORAGE_CLASS_INFO
+xsdc__anyType axiscCallGetElementAsAnyType(AXISCHANDLE call, const AxiscChar * pName, 
+	const AxiscChar * pNamespace);
+
+/**
  * Method used by stubs to get a deserialized value of a XML attribute as basic type.
  *
  * @param pName null terminated character string that contains the name of

Modified: webservices/axis/trunk/c/include/axis/client/Call.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/include/axis/client/Call.hpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/client/Call.hpp (original)
+++ webservices/axis/trunk/c/include/axis/client/Call.hpp Wed Oct  8 13:54:24 2008
@@ -989,6 +989,18 @@
                                                  const AxisChar * pNamespace);
 
     /**
+     * Method used by stubs to get a deserialized value of XML element as any type.
+     *
+     * @param pName null terminated character string that contains the name of
+     * the tag containing the element.
+     * @param pNamespace null terminated character string that contains the
+     * namespace of the tag containing the element.
+     * @return pointer to xsd__anyType type containing the contents of the element.
+     */
+    xsd__anyType AXISCALL getElementAsAnyType( const AxisChar * pName,
+                                               const AxisChar * pNamespace);
+    
+    /**
      * Method used by stubs to get a deserialized value of a XML attribute as basic type.
      *
      * @param pName null terminated character string that contains the name of

Modified: webservices/axis/trunk/c/src/cbindings/AxisC.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/AxisC.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/AxisC.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/AxisC.cpp Wed Oct  8 13:54:24 2008
@@ -142,6 +142,7 @@
             case C_USER_TYPE:
             case C_ATTACHMENT:
             case XSDC_UNKNOWN:
+            case XSDC_ANYTYPE:
             {
                 Axis::AxisDelete(pValue, (XSDTYPE) type);
                 break;
@@ -283,6 +284,7 @@
             case XSDC_ANYURI:
             case XSDC_QNAME:
             case XSDC_NOTATION:
+            case XSDC_ANYTYPE:
             {
                 retVal = new char[size+1];
                 break;

Modified: webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp Wed Oct  8 13:54:24 2008
@@ -391,6 +391,12 @@
                     cArray->m_Array[count] = m_Array[count];
                     break;
                 }
+                case XSD_ANYTYPE:
+                {
+                    ((xsd__anyType*) cArray->m_Array)[count] = new char[strlen(((xsd__anyType*) m_Array)[count])+1];
+                    strcpy(((xsd__anyType*) cArray->m_Array)[count], ((xsd__anyType*) m_Array)[count]);
+                    break;
+                }
                 case XSD_UNKNOWN:
                 case XSD_ANY:
                 case ATTACHMENT:

Modified: webservices/axis/trunk/c/src/cbindings/IWrapperSoapDeSerializerC.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/IWrapperSoapDeSerializerC.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/IWrapperSoapDeSerializerC.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/IWrapperSoapDeSerializerC.cpp Wed Oct  8 13:54:24 2008
@@ -1201,7 +1201,28 @@
 }
 
 
+AXISC_STORAGE_CLASS_INFO
+xsdc__anyType axiscSoapDeSerializerGetElementAsAnyType(AXISCHANDLE wrapperSoapDeSerializer, 
+                                                       const AxiscChar * pName, 
+                                                       const AxiscChar * pNamespace)
+{
+    IWrapperSoapDeSerializer *dz = (IWrapperSoapDeSerializer*)wrapperSoapDeSerializer;
+
+    try
+    {
+        return dz->getElementAsAnyType(pName, pNamespace);
+    }
+    catch ( AxisException& e  )
+    {
+        axiscAxisInvokeExceptionHandler(e.getExceptionCode(), e.what(), NULL, NULL);
+    }
+    catch ( ... )
+    {
+        axiscAxisInvokeExceptionHandler(-1, "Unrecognized exception thrown.", NULL, NULL);
+    }
 
+    return (xsdc__anyType)NULL;      
+}
 
 
 

Modified: webservices/axis/trunk/c/src/cbindings/client/CallC.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/client/CallC.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/client/CallC.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/client/CallC.cpp Wed Oct  8 13:54:24 2008
@@ -1909,15 +1909,32 @@
 }
 
 
+AXISC_STORAGE_CLASS_INFO
+xsdc__anyType axiscCallGetElementAsAnyType(AXISCHANDLE call, const AxiscChar * pName, 
+	const AxiscChar * pNamespace)
+{
+    
+    
+    Call *c = (Call*)call;
+    
+    try
+    {
+        return c->getElementAsAnyType(pName,pNamespace);
+    }
+    catch ( AxisException& e  )
+    {
+        
+        processException(c, e);
+    }
+    catch ( ... )
+    {
+          
+          
+        axiscAxisInvokeExceptionHandler(-1, "Unrecognized exception thrown.", NULL, NULL);
+    }
 
-
-
-
-
-
-
-
-
+    return (xsdc__anyType)NULL;
+}
 
 
 AXISC_STORAGE_CLASS_INFO 

Modified: webservices/axis/trunk/c/src/common/AxisUserAPI.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/AxisUserAPI.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AxisUserAPI.cpp (original)
+++ webservices/axis/trunk/c/src/common/AxisUserAPI.cpp Wed Oct  8 13:54:24 2008
@@ -483,6 +483,12 @@
                 m_Array[count] = array[count];
                 break;
             }
+            case XSD_ANYTYPE:
+            {
+                ((xsd__anyType*) m_Array)[count] = new char[strlen(((xsd__anyType*) array)[count])+1];
+                strcpy(((xsd__anyType*) m_Array)[count], ((xsd__anyType*) array)[count]);
+                break;
+            }
             case XSD_UNKNOWN:
             case XSD_ANY:
             case ATTACHMENT:
@@ -792,6 +798,12 @@
                 m_Array[m_Size] = element;
                 break;
             }
+            case XSD_ANYTYPE:
+            {
+                ((xsd__anyType*) m_Array)[m_Size] = new char[strlen((xsd__anyType) element)+1];
+                strcpy(((xsd__anyType*) m_Array)[m_Size], (xsd__anyType) element);
+                break;
+            }
             case XSD_UNKNOWN:
             case XSD_ANY:
             case ATTACHMENT:
@@ -1045,6 +1057,11 @@
                         delete ((Axis_Array**) m_Array)[count];
                         break;
                     }
+                    case XSD_ANYTYPE:
+                    {
+                        delete []((xsd__anyType*) m_Array)[count];
+                        break;
+                    }
                     case USER_TYPE:
                     case XSD_ANY:
                     case ATTACHMENT:
@@ -2255,4 +2272,32 @@
     return (const xsd__NOTATION*) Axis_Array::get(size, type);
 }
 
+
+xsd__anyType_Array::xsd__anyType_Array()
+{
+    m_Type = XSD_ANYTYPE;
+}
+
+xsd__anyType_Array::xsd__anyType_Array(const xsd__anyType_Array & original)
+{
+    if (original.m_Type == XSD_ANYTYPE)
+        clone(original);
+}
+
+xsd__anyType_Array::~xsd__anyType_Array()
+{
+    // Parent Axis_Array will carry out full clear up
+}
+
+void xsd__anyType_Array::set(xsd__anyType* array, int size)
+{
+    Axis_Array::set((void**)array, size, XSD_ANYTYPE);
+}
+
+const xsd__anyType* xsd__anyType_Array::get(int& size) const
+{
+    XSDTYPE type;
+    return (const xsd__anyType*) Axis_Array::get(size, type);
+}
+
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/common/AxisUtils.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/AxisUtils.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AxisUtils.cpp (original)
+++ webservices/axis/trunk/c/src/common/AxisUtils.cpp Wed Oct  8 13:54:24 2008
@@ -307,6 +307,9 @@
         case XSD_NMTOKENS:
             xsdValue = new NMTOKENS((xsd__NMTOKENS) pValue);
             break;
+        case XSD_ANYTYPE:
+            xsdValue = new AnyType2((xsd__anyType) pValue);
+            break;
         default:
             break;
     }

Modified: webservices/axis/trunk/c/src/common/AxisUtils.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/AxisUtils.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AxisUtils.h (original)
+++ webservices/axis/trunk/c/src/common/AxisUtils.h Wed Oct  8 13:54:24 2008
@@ -22,6 +22,7 @@
 #include <axis/GDefine.hpp>
 #include <string>
 
+#include "../soap/xsd/AnyType2.hpp"
 #include "../soap/xsd/Boolean.hpp"
 #include "../soap/xsd/AnyURI.hpp"
 #include "../soap/xsd/String.hpp"

Modified: webservices/axis/trunk/c/src/common/BasicTypeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/common/BasicTypeSerializer.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/BasicTypeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/common/BasicTypeSerializer.cpp Wed Oct  8 13:54:24 2008
@@ -203,6 +203,8 @@
             return "QName";
         case XSD_NOTATION:
             return "NOTATION";
+        case XSD_ANYTYPE:
+            return "anyType";            
         default:
             return " ";
     }

Modified: webservices/axis/trunk/c/src/engine/client/Call.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/engine/client/Call.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/engine/client/Call.cpp (original)
+++ webservices/axis/trunk/c/src/engine/client/Call.cpp Wed Oct  8 13:54:24 2008
@@ -731,6 +731,12 @@
     return m_pIWSDZ->getElementAsNOTATION (pName, pNamespace);
 }
 
+xsd__anyType Call::getElementAsAnyType (const AxisChar* pName, 
+                                        const AxisChar* pNamespace)
+{
+    return m_pIWSDZ->getElementAsAnyType (pName, pNamespace);
+}
+
 xsd__int * Call::getAttributeAsInt (const AxisChar* pName, const AxisChar* pNamespace)
 {
     return m_pIWSDZ->getAttributeAsInt (pName, pNamespace);

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Wed Oct  8 13:54:24 2008
@@ -731,12 +731,23 @@
             elementName = m_pParser->peek();
             if ((RPC_ENCODED == m_nStyle && 0x00 != *elementName) || strcmp(elementName, pName) == 0)
             {
-                if (0 == count)
-                    pSimpleType = AxisUtils::createSimpleTypeObject(nType);
-                getElement(pName, pNamespace, pSimpleType, (bool)(RPC_ENCODED == m_nStyle));
-                pValue = pSimpleType->getValue();
-                Array->addElement(pValue);
-                Axis::AxisDelete(pValue, pSimpleType->getType());
+            	// TODO instead of deleting the pointer use it by by-passing addElement().
+            	if (XSD_ANYTYPE != nType)
+            	{
+	                if (0 == count)
+	                    pSimpleType = AxisUtils::createSimpleTypeObject(nType);
+	                getElement(pName, pNamespace, pSimpleType, (bool)(RPC_ENCODED == m_nStyle));
+	                pValue = pSimpleType->getValue();
+	                Array->addElement(pValue);
+	                Axis::AxisDelete(pValue, pSimpleType->getType());
+            	}
+            	else
+            	{
+            		pValue = getElementAsAnyType(pName, pNamespace);
+            		Array->addElement(pValue);
+            		Axis::AxisDelete(pValue, XSD_ANYTYPE);
+            	}
+            	
                 pValue = NULL;
             }
             else
@@ -1287,7 +1298,7 @@
     
     if (AXIS_FAIL == m_nStatus)
         return;
-        
+    
     // get next element, character mode 
     if (AXIS_FAIL == getNextNode(false, true))
        return;
@@ -1672,6 +1683,35 @@
     return simpleType.getNOTATION();
 }
 
+xsd__anyType SoapDeSerializer::
+getElementAsAnyType(const AxisChar* pName, const AxisChar* pNamespace)
+{
+    xsd__anyType ret = NULL;
+    
+    if (AXIS_SUCCESS != m_nStatus)
+        return ret;
+        
+    if (AXIS_FAIL == getNextNode(RPC_ENCODED != m_nStyle))
+        return ret;
+
+    if (RPC_ENCODED != m_nStyle && (0 != strcmp (pName, m_pNode->m_pchNameOrValue)))
+       return ret;
+    
+    AnyType *any = getAnyObject();
+    if (NULL != any)
+    {
+	    if (any->_size != 0)
+	    {
+	    	ret = any->_array[0];
+	    	any->_array[0] = NULL;
+	        delete [] any->_array;
+	    }
+	    delete any;
+    }
+    
+    return ret;
+}
+
 xsd__string SoapDeSerializer::
 getFaultAsXMLString()
 {
@@ -1687,11 +1727,11 @@
     xsd__string ret = new char[len];
     memset(ret,0,len);
     for (i=0; i<any->_size; i++) 
-        if (any->_array[i]) 
-        {
-            strcat(ret,any->_array[i]);
-            delete [] any->_array[i];
-        }
+    	if (any->_array[i]) 
+	    {
+	        strcat(ret,any->_array[i]);
+	        delete [] any->_array[i];
+	    }
     delete [] any->_array;
     delete any;
     return ret;
@@ -1915,7 +1955,7 @@
             tagCount++;
         else if (END_ELEMENT == m_pNode->m_type)
             tagCount--;
-                
+
         if (START_PREFIX == m_pNode->m_type)
         {
             nsDecls += " xmlns";

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.h?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.h Wed Oct  8 13:54:24 2008
@@ -207,6 +207,8 @@
         const AxisChar* pNamespace);
     xsd__NOTATION AXISCALL getElementAsNOTATION(const AxisChar* pName,
         const AxisChar* pNamespace);
+    xsd__anyType AXISCALL getElementAsAnyType(const AxisChar* pName,
+        const AxisChar* pNamespace);
 
 	void *getAttribute(const AxisChar* pName, const AxisChar* pNamespace,
         IAnySimpleType* pSimpleType);

Added: webservices/axis/trunk/c/src/soap/xsd/AnyType2.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/xsd/AnyType2.cpp?rev=702986&view=auto
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/AnyType2.cpp (added)
+++ webservices/axis/trunk/c/src/soap/xsd/AnyType2.cpp Wed Oct  8 13:54:24 2008
@@ -0,0 +1,150 @@
+// Copyright 2003-2004 The Apache Software Foundation.
+// (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
+// 
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// 
+//        http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "AnyType2.hpp"
+
+AXIS_CPP_NAMESPACE_START
+
+AnyType2::AnyType2()
+{
+}
+
+AnyType2::AnyType2(const xsd__anyType value)
+{
+        if (value)
+        {
+            setNil(false);
+            serialize(value);
+        }
+}
+
+XSDTYPE AnyType2::getType()
+{
+    return XSD_ANYTYPE;
+}
+
+xsd__anyType AnyType2::getAnyType()
+{
+    if (isNil())
+    {
+        return NULL;
+    }
+    else
+    {
+        return deserializeAnyType(m_Buf);
+    }
+}
+
+void * AnyType2::getValue()
+{
+    return (void*) getAnyType();
+}
+
+AxisChar* AnyType2::serialize(const xsd__anyType value) throw (AxisSoapException)
+{
+    MinLength* minLength= getMinLength();
+    if (minLength->isSet())
+    {
+        if (strlen(value) < (unsigned int) minLength->getMinLength())
+        {
+            AxisString exceptionMessage =
+            "Length of value to be serialized is shorter than MinLength specified for this type.  Minlength = ";
+            AxisChar length[100];
+            sprintf(length, "%d", minLength->getMinLength());
+            exceptionMessage += length;
+            exceptionMessage += ", Length of value = ";
+            sprintf(length, "%d", strlen(value));
+            exceptionMessage += length;
+            exceptionMessage += ".";
+            
+            delete minLength;
+            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+                const_cast<AxisChar*>(exceptionMessage.c_str()));
+        }
+    }
+    delete minLength;
+    
+    MaxLength* maxLength = getMaxLength();
+    if (maxLength->isSet())
+    {
+        if (strlen(value) > (unsigned int) maxLength->getMaxLength())
+        {
+            AxisString exceptionMessage =
+            "Length of value to be serialized is longer than MaxLength specified for this type.  Maxlength = ";
+            AxisChar length[100];
+            sprintf(length, "%d", maxLength->getMaxLength());
+            exceptionMessage += length;
+            exceptionMessage += ", Length of value = ";
+            sprintf(length, "%d", strlen(value));
+            exceptionMessage += length;
+            exceptionMessage += ".";
+            
+            delete maxLength;
+            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+                const_cast<AxisChar*>(exceptionMessage.c_str()));
+        }
+    }
+    delete maxLength;
+
+    Length* length = getLength();
+    if (length->isSet())
+    {
+        if (strlen(value) != (unsigned int) length->getLength())
+        {
+            AxisString exceptionMessage =
+            "Length of value to be serialized is not the same as Length specified for this type.  Length = ";
+            AxisChar lengthAsString[100];
+            sprintf(lengthAsString, "%d", length->getLength());
+            exceptionMessage += lengthAsString;
+            exceptionMessage += ", Length of value = ";
+            sprintf(lengthAsString, "%d", strlen(value));
+            exceptionMessage += lengthAsString;
+            exceptionMessage += ".";
+            
+            delete length;
+            throw AxisSoapException(CLIENT_SOAP_SOAP_CONTENT_ERROR,
+                const_cast<AxisChar*>(exceptionMessage.c_str()));
+        }
+    }
+    delete length;
+
+    IAnySimpleType::serialize(value);
+    return m_Buf;
+}
+
+xsd__anyType AnyType2::deserializeAnyType(const AxisChar* valueAsChar) throw (AxisSoapException)
+{
+
+	xsd__anyType value = new char[strlen (valueAsChar) + 1];
+	strcpy (value, valueAsChar);
+	return value;
+}
+
+MinLength* AnyType2::getMinLength()
+{
+    return new MinLength();
+}
+
+MaxLength* AnyType2::getMaxLength()
+{
+    return new MaxLength();
+}
+
+Length* AnyType2::getLength()
+{
+    return new Length();
+}
+
+AXIS_CPP_NAMESPACE_END

Added: webservices/axis/trunk/c/src/soap/xsd/AnyType2.hpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/xsd/AnyType2.hpp?rev=702986&view=auto
==============================================================================
--- webservices/axis/trunk/c/src/soap/xsd/AnyType2.hpp (added)
+++ webservices/axis/trunk/c/src/soap/xsd/AnyType2.hpp Wed Oct  8 13:54:24 2008
@@ -0,0 +1,117 @@
+/* -*- C++ -*- */
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+// (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *
+ * @author Nadir Amra (amra@us.ibm.com)
+ *
+ */
+
+#if !defined(_ANYTYPE_HPP____OF_AXIS_INCLUDED_)
+#define _ANYTYPE_HPP____OF_AXIS_INCLUDED_
+
+#include "IAnySimpleType.hpp"
+#include "constraints/MinLength.hpp"
+#include "constraints/MaxLength.hpp"
+#include "constraints/Length.hpp"
+
+AXIS_CPP_NAMESPACE_START
+
+using namespace std;
+
+/**
+ * Unfortunate that we have to name as AnyType2, but we already have an 
+ * AnyType for xsd:any element, which simple cannot be used cleanly in 
+ * support of xsd:anyType.
+ */
+class AnyType2 : public IAnySimpleType {
+public:
+
+    /**
+     * Constructor
+     */
+    AnyType2();
+
+    /**
+     * Constructor providing a value for later serialization
+     * @param value The value to be serialized
+     */
+    AnyType2(const xsd__anyType value);
+
+    /**
+     * Destructor
+     */
+    virtual ~AnyType2() { }
+
+    /**
+     * Get the xsd type of this simple type.
+     * @return the xsd type of this simple type
+     */
+    XSDTYPE getType();
+
+    /**
+     * Get the deserialized value.
+     * @return Deserialized value. Note: it is the responsibility of the calling code to delete this value!
+     */
+    xsd__anyType getAnyType();
+
+    /**
+     * Get the deserialized value
+     * @return the deserialized value. Note: it is the responsibility of the calling code to delete this value!
+     */
+    void* getValue();
+
+protected:
+
+    /**
+     * Deserialized AnyType value from it's on-the-wire string form.
+     * @param valueAsChar Serialized form of AnyType value.
+     * @return Deserialized AnyType value. Note: it is the responsibility of the calling code to delete this value!
+     */
+	xsd__anyType deserializeAnyType(const AxisChar* valueAsChar) throw (AxisSoapException);
+
+    /**
+     * Serialize AnyType value to it's on-the-wire string form.
+     * @param value The AnyType value to be serialized.
+     * @return Serialized form of AnyType value.
+     */   
+    AxisChar* serialize(const xsd__anyType value) throw (AxisSoapException);
+
+    /**
+     * Creates a minLength object, used to allocate storage.  By default the AnyType
+     * object does not have this specified, so this is an unset minLength object.
+     * @return An unset MinLength object
+     */
+    MinLength* getMinLength();
+
+    /**
+     * Creates a maxLength object, used to allocate storage.  By default the AnyType
+     * object does not have this specified, so this is an unset maxLength object.
+     * @return An unset MaxLength object
+     */
+    MaxLength* getMaxLength();
+
+    /**
+     * Creates a Length object, used to allocate storage.  By default the AnyType
+     * object does not have this specified, so this is an unset Length object.
+     * @return An unset Length object
+     */
+    Length* getLength();
+};
+
+AXIS_CPP_NAMESPACE_END
+
+#endif

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/CUtils.java Wed Oct  8 13:54:24 2008
@@ -135,7 +135,9 @@
             "xsd__byte",            "xsd__nonNegativeInteger",  "xsd__unsignedLong",            
             "xsd__unsignedInt",     "xsd__unsignedShort",       "xsd__unsignedByte",            
             "xsd__positiveInteger", "xsd__double",              "xsd__anyURI",    
-            "xsd__QName",           "xsd__NOTATION",            
+            "xsd__QName",           "xsd__NOTATION",
+            
+            "xsd__anyType", 
             
             // ====================
             // C primitive types
@@ -154,7 +156,9 @@
             "xsdc__byte",           "xsdc__nonNegativeInteger", "xsdc__unsignedLong",           
             "xsdc__unsignedInt",    "xsdc__unsignedShort",      "xsdc__unsignedByte",           
             "xsdc__positiveInteger","xsdc__double",             "xsdc__anyURI",                  
-            "xsdc__QName",          "xsdc__NOTATION"
+            "xsdc__QName",          "xsdc__NOTATION",
+            
+            "xsdc__anyType" 
         };
         
         c_primitiveTypes = new HashSet(Arrays.asList(primitiveTypes));
@@ -204,6 +208,7 @@
         c_qnameToPrimitiveTypeMapperCPP.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "QName"),                "xsd__QName");
         c_qnameToPrimitiveTypeMapperCPP.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyURI"),                "xsd__anyURI");
         c_qnameToPrimitiveTypeMapperCPP.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "NOTATION"),                "xsd__NOTATION");
+        c_qnameToPrimitiveTypeMapperCPP.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyType"),                "xsd__anyType");
         
         // TODO revisit attachment support.
         c_qnameToPrimitiveTypeMapperCPP.put(new QName(WrapperConstants.APACHE_XMLSOAP_NAMESPACE, "Image"),       "ISoapAttachment");
@@ -259,7 +264,8 @@
         c_qnameToPrimitiveTypeMapperC.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "QName"),                "xsdc__QName");
         c_qnameToPrimitiveTypeMapperC.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyURI"),                "xsdc__anyURI");
         c_qnameToPrimitiveTypeMapperC.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "NOTATION"),            "xsdc__NOTATION");
-        
+        c_qnameToPrimitiveTypeMapperC.put(new QName(WrapperConstants.SCHEMA_NAMESPACE, "anyType"),                "xsdc__anyType");
+
         /* TODO:
          *   Should be removed when the following issue will be fixed :
          *     -> http://marc.theaimsgroup.com/?t=107907748000002&r=1&w=2 
@@ -374,6 +380,8 @@
         c_simpleTypeToMethodSuffixMapper.put("xsd__anyURI",                "AnyURI");
         c_simpleTypeToMethodSuffixMapper.put("xsd__QName",                "QName");
         c_simpleTypeToMethodSuffixMapper.put("xsd__NOTATION",                "NOTATION");
+        c_simpleTypeToMethodSuffixMapper.put("xsd__anyType",                "AnyType");
+
         
         c_simpleTypeToMethodSuffixMapper.put("xsdc__duration",                "Duration");
         c_simpleTypeToMethodSuffixMapper.put("xsdc__dateTime",                "DateTime");
@@ -419,6 +427,8 @@
         c_simpleTypeToMethodSuffixMapper.put("xsdc__anyURI",                "AnyURI");
         c_simpleTypeToMethodSuffixMapper.put("xsdc__QName",                    "QName");
         c_simpleTypeToMethodSuffixMapper.put("xsdc__NOTATION",                "NOTATION");
+        c_simpleTypeToMethodSuffixMapper.put("xsdc__anyType",                "AnyType");
+
         
         c_simpleTypeToEnumMapper.put("xsd__duration",            "XSD_DURATION");
         c_simpleTypeToEnumMapper.put("xsd__dateTime",            "XSD_DATETIME");
@@ -464,6 +474,8 @@
         c_simpleTypeToEnumMapper.put("xsd__anyURI",                "XSD_ANYURI");
         c_simpleTypeToEnumMapper.put("xsd__QName",                "XSD_QNAME");
         c_simpleTypeToEnumMapper.put("xsd__NOTATION",            "XSD_NOTATION");
+        c_simpleTypeToEnumMapper.put("xsd__anyType",             "XSD_ANYTYPE");
+
 
         c_simpleTypeToEnumMapper.put("xsdc__duration",            "XSDC_DURATION");
         c_simpleTypeToEnumMapper.put("xsdc__dateTime",            "XSDC_DATETIME");
@@ -509,6 +521,8 @@
         c_simpleTypeToEnumMapper.put("xsdc__anyURI",                "XSDC_ANYURI");
         c_simpleTypeToEnumMapper.put("xsdc__QName",                "XSDC_QNAME");
         c_simpleTypeToEnumMapper.put("xsdc__NOTATION",            "XSDC_NOTATION");
+        c_simpleTypeToEnumMapper.put("xsdc__anyType",             "XSDC_ANYTYPE");
+
 
 
         c_initValueForSimpleType.put("xsd__duration",                "0");
@@ -555,7 +569,8 @@
         c_initValueForSimpleType.put("xsd__anyURI",                "NULL");
         c_initValueForSimpleType.put("xsd__QName",                    "NULL");
         c_initValueForSimpleType.put("xsd__NOTATION",                "NULL");
- 
+        c_initValueForSimpleType.put("xsd__anyType",                "NULL");
+
         
         c_initValueForSimpleType.put("xsdc__duration",                "0");
         c_initValueForSimpleType.put("xsdc__dateTime",                "{0, 0, 0, 0, 0, 0, 0, 0, 0}");
@@ -601,6 +616,8 @@
         c_initValueForSimpleType.put("xsdc__anyURI",                    "NULL");
         c_initValueForSimpleType.put("xsdc__QName",                    "NULL");
         c_initValueForSimpleType.put("xsdc__NOTATION",                "NULL");
+        c_initValueForSimpleType.put("xsdc__anyType",                "NULL");
+
         
         String[] pointerTypes = {
         // C++ types
@@ -609,14 +626,14 @@
         "xsd__ID",             "xsd__IDREF",                        "xsd__IDREFS",
         "xsd__ENTITY",         "xsd__ENTITIES",                     "xsd__NMTOKEN",
         "xsd__NMTOKENS",       "xsd__anyURI",                       "xsd__QName",
-        "xsd__NOTATION",    
+        "xsd__NOTATION",       "xsd__anyType",   
         // C types
         "xsdc__string",        "xsdc__normalizedString",            "xsdc__token",
         "xsdc__language",      "xsdc__Name",                        "xsdc__NCName",
         "xsdc__ID",            "xsdc__IDREF",                       "xsdc__IDREFS",
         "xsdc__ENTITY",        "xsdc__ENTITIES",                    "xsdc__NMTOKEN",       
         "xsdc__NMTOKENS",      "xsdc__anyURI",                      "xsdc__QName",         
-        "xsdc__NOTATION"
+        "xsdc__NOTATION",      "xsdc__anyType"
         };
         c_pointerBasedTypes = new HashSet(Arrays.asList(pointerTypes));
     
@@ -810,7 +827,7 @@
     {
             return name.equals(xsdAnyElementQName);
     }
-  
+    
     /**
      * Method to determine if QName represents an xsd:anyType.
      * 
@@ -946,7 +963,7 @@
      */
     public static String getArrayNameForComplexType(QName qname)
     {
-        if (isAnyType(qname) || isAnyElement(qname))
+        if (isAnyElement(qname))
             return "AnyType";
         
         String arrayName = null;
@@ -1210,8 +1227,7 @@
         WebServiceContext wscontext)
         throws WrapperFault
     {
-        if (CUtils.isAnyElement(param.getType().getName()) 
-                || CUtils.isAnyType(param.getType().getName()))
+        if (CUtils.isAnyElement(param.getType().getName()))
             return "AnyType*";
         
         Type type = wscontext.getTypemap().getType(param.getSchemaName());

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java Wed Oct  8 13:54:24 2008
@@ -151,7 +151,7 @@
             this.attribs[i].setParamName((String) elementfields.get(i - attributeParamCount), wscontext.getTypemap());
             CElementDecl elem = type.getElementForElementName(this.attribs[i].getParamName());
             Type elementType = elem.getType();
-            this.attribs[i].setAnyTypeOrAnyElement(elementType.isAnyType() || elementType.isAnyElement());
+            this.attribs[i].setAnyElement(elementType.isAnyElement());
 
             if (CUtils.isSimpleType(elementType.getName()))
                 this.attribs[i].setTypeName(CUtils.getSimpleType(elementType.getName()));

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java Wed Oct  8 13:54:24 2008
@@ -249,15 +249,10 @@
                     c_writer.write("\tif(param->" + attribs[i].getParamNameAsMember() + ")\n\t{\n\t");
                 }
              
-            if (attribs[i].isAnyTypeOrAnyElement())
+            if (attribs[i].isAnyElement())
             {
-                String fieldName = attribs[i].getParamNameAsMember();
-            
-                if (attribs[i].getType().isAnyElement())
-                {
-                    anyCounter += 1;
-                    fieldName  = "any" + Integer.toString(anyCounter);
-                }
+                anyCounter += 1;
+                String fieldName  = "any" + Integer.toString(anyCounter);
                     
                 if (!ifCheckPrinted && attribs[i].isOptional())
                     c_writer.write("\tif (param->" + fieldName + " != NULL)\n");
@@ -599,15 +594,10 @@
             if (handleAll || handleChoice)
                 tab2 += "\t";
             
-            if (attribs[i].isAnyTypeOrAnyElement())
+            if (attribs[i].isAnyElement())
             {
-                String fieldName = attribs[i].getParamNameAsMember();
-                
-                if (attribs[i].getType().isAnyElement())
-                {
-                    anyCounter += 1;
-                    fieldName  = "any" + Integer.toString(anyCounter);
-                }
+                anyCounter += 1;
+                String fieldName  = "any" + Integer.toString(anyCounter);
                 
                 c_writer.write(tab2 + "param->" + fieldName + " = axiscSoapDeSerializerGetAnyObject(pDZ);\n");
             }
@@ -845,7 +835,7 @@
         // the container structure for arrays are created by the corresponding deserializer.
         for (int i = 0; i < attribs.length; i++)
         {
-            if (attribs[i].isArray() && !attribs[i].isAnyTypeOrAnyElement())
+            if (attribs[i].isArray() && !attribs[i].isAnyElement())
             {
                 writeNewline = true;
                 
@@ -955,19 +945,14 @@
                     c_writer.write("\n");
                 }
             }
-            else if (attribs[i].isAnyTypeOrAnyElement())
+            else if (attribs[i].isAnyElement())
             {
-                String fieldName = attribs[i].getParamNameAsMember();
-                
-                if (attribs[i].getType().isAnyElement())
-                {
-                    anyCounter += 1;
-                    fieldName  = "any" + Integer.toString(anyCounter);
-                }
+                anyCounter += 1;
+                String fieldName  = "any" + Integer.toString(anyCounter);
                 
                 c_writer.write("\t\tif (param->" + fieldName + " != NULL)\n");
                 c_writer.write("\t\t\taxiscAxisDelete(param->" + fieldName + ", XSDC_ANY);\n");               
-            }            
+            }
             else
             {
                 String deleteFunctionSuffix = "";

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java Wed Oct  8 13:54:24 2008
@@ -266,13 +266,10 @@
                 
                 // Following will set param name - if xsd:any, we index param name
                 String paramName = attribs[i].getParamNameAsMember();
-                if(attribs[i].isAnyTypeOrAnyElement())
+                if(attribs[i].isAnyElement())
                 {
-                    if (attribs[i].getType().isAnyElement())
-                    {
-                        anyCounter += 1;
-                        paramName  += Integer.toString(anyCounter);
-                    }
+                    anyCounter += 1;
+                    paramName  += Integer.toString(anyCounter);
                     
                     paramType = "Axisc" + paramType;
                 }
@@ -404,7 +401,7 @@
 
                 if (theType.isRestriction() && !CUtils.isPrimitiveType(basicType))
                     typeSet.add(basicType);
-                else if (!attribs[i].isSimpleType() && !attribs[i].isAnyTypeOrAnyElement())
+                else if (!attribs[i].isSimpleType() && !attribs[i].isAnyElement())
                 {
                     if ((attribs[i].isArray()) && !theType.isSimpleType())
                         typeSet.add(basicType + "_Array");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java Wed Oct  8 13:54:24 2008
@@ -276,7 +276,7 @@
         {
             c_writer.write("\t");
             
-            if (returntypeisarray && !returntype.isAnyTypeOrAnyElement())
+            if (returntypeisarray && !returntype.isAnyElement())
             {   
                 QName qname = null;
                 if (CUtils.getArrayType (retType) != null)
@@ -430,7 +430,7 @@
                 typeisarray = false;
             }
  
-            if (param.isAnyTypeOrAnyElement ())
+            if (param.isAnyElement ())
                 c_writer.write("\taxiscCallAddAnyObject(call, Value" + i);
             else
             {
@@ -549,7 +549,7 @@
             }
 
             c_writer.write (");\n");
-            if (!param.isAnyTypeOrAnyElement ())
+            if (!param.isAnyElement ())
                 c_writer.write("\t}\n");            
           } // end for-loop
 
@@ -637,7 +637,7 @@
                 currentParamName = "*OutValue" + i;
                 
                 // Some code need to be merged as we have some duplicated in coding here.
-                if (currentType.isAnyTypeOrAnyElement ())
+                if (currentType.isAnyElement ())
                 {
                     // TODO work needs to be done to clean up storage!
                     c_writer.write ("\t\t\t"
@@ -799,9 +799,9 @@
             if (minfo.getOutputMessage () != null)
                 c_writer.write ("\t\t\t// no output?\n\t\t}\n");
         }
-        else if (returntype.isAnyTypeOrAnyElement ())
+        else if (returntype.isAnyElement ())
         {
-            // TODO need to handle arrays
+            // TODO need to handle arrays?
             c_writer.write ("\t\t\tpReturn = (" + outparamType + ")axiscCallGetAnyObject(call);\n\t\t}\n");
 
             returnStatement = "\treturn pReturn;\n";

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java Wed Oct  8 13:54:24 2008
@@ -466,15 +466,10 @@
                     c_writer.write("\tif(param->" + attribs[i].getParamNameAsMember() + ")\n\t{\n\t");
                 }
              
-            if (attribs[i].isAnyTypeOrAnyElement())
+            if (attribs[i].isAnyElement())
             {
-                String fieldName = attribs[i].getParamNameAsMember();
-                
-                if (attribs[i].getType().isAnyElement())
-                {
-                    anyCounter += 1;
-                    fieldName  = "any" + Integer.toString(anyCounter);
-                }
+                anyCounter += 1;
+                String fieldName  = "any" + Integer.toString(anyCounter);
                 
                 if (!ifCheckPrinted && attribs[i].isOptional())
                     c_writer.write("\tif (param->" + fieldName + " != NULL)\n");
@@ -825,15 +820,10 @@
             if (handleAll || handleChoice)
                 tab2 += "\t";
             
-            if (attribs[i].isAnyTypeOrAnyElement())
+            if (attribs[i].isAnyElement())
             {
-                String fieldName = attribs[i].getParamNameAsMember();
-                
-                if (attribs[i].getType().isAnyElement())
-                {
-                    anyCounter += 1;
-                    fieldName  = "any" + Integer.toString(anyCounter);
-                }
+                anyCounter += 1;
+                String fieldName  = "any" + Integer.toString(anyCounter);
                 
                 c_writer.write(tab2 + "param->" + fieldName + " = pIWSDZ->getAnyObject();\n");
             }
@@ -1155,15 +1145,10 @@
                 if (i != 0)
                     c_writer.write("\n");
 
-                if (attribs[i].isAnyTypeOrAnyElement())
+                if (attribs[i].isAnyElement())
                 {
-                    String fieldName = attribs[i].getParamNameAsMember();
-                    
-                    if (attribs[i].getType().isAnyElement())
-                    {
-                        anyCounter += 1;
-                        fieldName  = "any" + Integer.toString(anyCounter);
-                    }
+                    anyCounter += 1;
+                    String fieldName  = "any" + Integer.toString(anyCounter);
                     
                     c_writer.write("\tif (original." + fieldName + " != NULL)\n");
                     c_writer.write("\t\t" + fieldName + " = new " + attribs[i].getTypeName() + "(*(original." + fieldName + "));\n");
@@ -1238,13 +1223,10 @@
                 else
                     isPointerType = CUtils.isPointerType(typename);
                 
-                if (attribs[i].isAnyTypeOrAnyElement())
+                if (attribs[i].isAnyElement())
                 {                    
-                    if (attribs[i].getType().isAnyElement())
-                    {
-                        anyCounter += 1;
-                        name  = "any" + Integer.toString(anyCounter);
-                    }
+                    anyCounter += 1;
+                    name  = "any" + Integer.toString(anyCounter);
                     
                     // TODO remove and replace with simple delete!
                     if (!forConstructor)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java Wed Oct  8 13:54:24 2008
@@ -531,7 +531,7 @@
                 
                 if (theType.isRestriction() && !CUtils.isPrimitiveType(basicType))
                     typeSet.add(basicType);
-                else if (!attribs[i].isSimpleType() && !attribs[i].isAnyTypeOrAnyElement())
+                else if (!attribs[i].isSimpleType() && !attribs[i].isAnyElement())
                 {
                     if ((attribs[i].isArray()) && !theType.isSimpleType())
                         typeSet.add(basicType + "_Array");
@@ -581,7 +581,7 @@
             {
                 if (!attribs[i].isArray() && 
                         !(attribs[i].isSimpleType() || attribs[i].getType().isSimpleType())
-                        && !attribs[i].isAnyTypeOrAnyElement())
+                        && !attribs[i].isAnyElement())
 				{
                     typeSet.add(attribs[i].getTypeName());
                 } 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java Wed Oct  8 13:54:24 2008
@@ -432,7 +432,7 @@
                 typeisarray = false;
             }
     
-            if (param.isAnyTypeOrAnyElement ())
+            if (param.isAnyElement ())
                 c_writer.write ("\t\tm_pCall->addAnyObject(Value" + i);
             else
             {
@@ -638,7 +638,7 @@
                 currentParamName = "*OutValue" + i;
                 
                 // Some code need to be merged as we have some duplicated in coding here.
-                if (currentType.isAnyTypeOrAnyElement ())
+                if (currentType.isAnyElement ())
                 {
                     // TODO Handle arrays
                     c_writer.write ("\t\t\t\t"
@@ -791,7 +791,7 @@
             if (minfo.getOutputMessage () != null)
                 c_writer.write ("\t\t\t\t// no output?\n\t\t\t}\n");
         }
-        else if (returntype.isAnyTypeOrAnyElement ())
+        else if (returntype.isAnyElement ())
         {
             // TODO handle arrays
             c_writer.write ("\t\t\t\tpReturn = (" + outparamType + ")m_pCall->getAnyObject();\n\t\t\t}\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java Wed Oct  8 13:54:24 2008
@@ -286,7 +286,7 @@
                         + ",\n\t\t \"" + elementName + "\", Axis_URI_" + containedType + ");\n");
                 }
             }
-            else if (param.isAnyTypeOrAnyElement())
+            else if (param.isAnyElement())
             {
                 c_writer.write("\t" + paraTypeName + " *v" + i + " = (" + paraTypeName
                         + "*)pIWSDZ->getAnyObject();\n");
@@ -413,7 +413,7 @@
                     c_writer.write("\t\treturn nStatus;\n");
                 }
             }
-            else if (returntype.isAnyTypeOrAnyElement())
+            else if (returntype.isAnyElement())
                 c_writer.write( "\t\treturn pIWSSZ->addOutputAnyObject(ret);\n");
             else
             {
@@ -531,7 +531,7 @@
                                 + ", \"" + returnParamName + "\", Axis_URI_" + containedType + ");\n");
                     }
                 }
-                else if (param.isAnyTypeOrAnyElement())
+                else if (param.isAnyElement())
                     c_writer.write("\tpIWSSZ->addOutputAnyObject(out" + i + ");\n");
                 else
                 {

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java Wed Oct  8 13:54:24 2008
@@ -36,7 +36,7 @@
     private String attribNameAsSOAPString = null;
     private String attribNameAsMember = null;
     private String methodName=null;
-    private boolean isAnyTypeOrAnyElement = false;
+    private boolean isAnyElement = false;
     private boolean isArray = false;
     private boolean isAttribute = false;
     private boolean isNillable = false;
@@ -72,7 +72,7 @@
         str = str + "attribNameAsSOAPString ="  + attribNameAsSOAPString + "\n";
         str = str + "elementName ="             + elementName + "\n";
         str = str + "elementNameAsSOAPString =" + elementNameAsSOAPString + "\n";
-        str = str + "isAnyTypeOrAnyElement ="   + isAnyTypeOrAnyElement + "\n";
+        str = str + "isAnyElement ="            + isAnyElement + "\n";
         str = str + "isArray ="                 + isArray + "\n";
         str = str + "isAttribute ="             + isAttribute + "\n";
         str = str + "isNillable = "             + isNillable + "\n";
@@ -229,17 +229,17 @@
     /**
      * @return
      */
-    public boolean isAnyTypeOrAnyElement()
+    public boolean isAnyElement()
     {
-        return isAnyTypeOrAnyElement;
+        return isAnyElement;
     }
 
     /**
      * @param b
      */
-    public void setAnyTypeOrAnyElement(boolean b)
+    public void setAnyElement(boolean b)
     {
-        isAnyTypeOrAnyElement = b;
+        isAnyElement = b;
     }
 
     /**

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/TypeMap.java Wed Oct  8 13:54:24 2008
@@ -60,8 +60,6 @@
     {
         if (CUtils.isPrimitiveType(name)) 
             return new Type(name, null);
-        else if (CUtils.isAnyType(name))
-            return new Type(name, "AnyType");
 
         return (Type) this.typeInfo.get(name);
     }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java?rev=702986&r1=702985&r2=702986&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java Wed Oct  8 13:54:24 2008
@@ -615,7 +615,7 @@
             if (null == qn)
                 throw new WrapperFault("Array type found without a Ref type");
             
-            if (CUtils.isPrimitiveType(qn) || CUtils.isAnyType(qn))
+            if (CUtils.isPrimitiveType(qn))
                 return null;
             
             QName newqn = new QName(type.getQName().getNamespaceURI(), qn.getLocalPart() + "_Array");
@@ -799,7 +799,7 @@
                                     
                                     typeName = new QName(typeName.getNamespaceURI(), localpart);
                                     
-                                    if (CUtils.isPrimitiveType(typeName) || CUtils.isAnyType(typeName))
+                                    if (CUtils.isPrimitiveType(typeName))
                                         newSecondaryType = createTypeInfo(typeName);
                                     else
                                         newSecondaryType = createTypeInfo(elem.getTypeEntry());
@@ -1274,7 +1274,7 @@
                     pinfo.setType(type);
                     pinfo.setParamName(elementName, c_typeMap);
                     pinfo.setElementName(element.getQName());
-                    pinfo.setAnyTypeOrAnyElement(type.isAnyType() || type.isAnyElement());
+                    pinfo.setAnyElement(type.isAnyElement());
                     minfo.addOutputParameter(pinfo);                    
                     minfo.setConsumeBodyOnMessageValidation(false);
                 }
@@ -1294,7 +1294,7 @@
                     pinfo.setNillable(eleinfo.isNillable());
                     pinfo.setOptional(eleinfo.getMinOccurs() == 0);
                     pinfo.setElementName(type.getElementForElementName(elementname).getName());
-                    pinfo.setAnyTypeOrAnyElement(innerType.isAnyType() || innerType.isAnyElement());
+                    pinfo.setAnyElement(innerType.isAnyElement());
     
                     minfo.addOutputParameter(pinfo);
                 }
@@ -1314,7 +1314,7 @@
             else
                 pinfo.setElementName(type.getName());
             
-            pinfo.setAnyTypeOrAnyElement(type.isAnyType() || type.isAnyElement());
+            pinfo.setAnyElement(type.isAnyElement());
             
             // Let us be nice and uppercase the first character in type name, 
             // in addition to resolving method name/type conflicts.
@@ -1425,7 +1425,7 @@
                 pinfo.setParamName(elementname, c_typeMap);     
                 pinfo.setArray(eleinfo.getMaxOccurs() > 1);
                 pinfo.setElementName(type.getElementForElementName(elementname).getName());
-                pinfo.setAnyTypeOrAnyElement(innerType.isAnyType() || innerType.isAnyElement());
+                pinfo.setAnyElement(innerType.isAnyElement());
                 pinfo.setNillable(eleinfo.isNillable());
                 pinfo.setOptional(eleinfo.getMinOccurs() == 0);
 
@@ -1469,7 +1469,7 @@
                 type.setIsUnwrappedInputType(true);
                 pinfo.setParamName(elementName, c_typeMap);
                 pinfo.setElementName(type.getName());
-                pinfo.setAnyTypeOrAnyElement(type.isAnyType() || type.isAnyElement());
+                pinfo.setAnyElement(type.isAnyElement());
     
                 // Let us be nice and uppercase the first character in type name, 
                 // in addition to resolving method name/type conflicts.