axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r496034 - in /webservices/axis/trunk/c: src/soap/ src/xml/xerces/ tests/auto_build/testcases/ tests/auto_build/testcases/client/cpp/ tests/auto_build/testcases/output/ tests/auto_build/testcases/tests/ tests/auto_build/testcases/wsdls/
Date Sun, 14 Jan 2007 06:41:45 GMT
Author: nadiramra
Date: Sat Jan 13 22:41:44 2007
New Revision: 496034

URL: http://svn.apache.org/viewvc?view=rev&rev=496034
Log:
AXISCPP-991 - Deserializing complex type broken when start-end element tag is encountered

Added:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementAttributesClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement.cpp.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes.cpp.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement_ServerResponse.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElement.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElementAttributes.xml
    webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElement.wsdl
    webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElementAttributes.wsdl
Modified:
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
    webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.cpp
    webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.h
    webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?view=diff&rev=496034&r1=496033&r2=496034
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Sat Jan 13 22:41:44 2007
@@ -91,6 +91,21 @@
     return m_pParser->setInputStream (pInputStream);
 }
 
+/*
+ * Routine that ensures we are actually skipping an end element.
+ */
+void SoapDeSerializer::
+skipEndNode()
+{
+    // TODO add code (possible new parser method) to determine if in fact 
+    // TODO the node we are about to skip is an end node. If not, we need 
+    // TODO to throw an exception since there could be extra elements that 
+    // TODO is due to server/client differences in wsdl being used.  in addition, a 
+    // TODO check is another safeguard.
+    m_pParser->next();
+    m_pNode = NULL;
+}
+
 SoapEnvelope *SoapDeSerializer::
 getEnvelope ()
 {
@@ -357,7 +372,6 @@
         throw AxisGenException (AXISC_NODE_VALUE_MISMATCH_EXCEPTION);
     }
 
-    /* we can check the namespace uri too here. Should we ? */
     m_pNode = NULL; // indicate node consumed
 
     return AXIS_SUCCESS;
@@ -440,17 +454,11 @@
     m_pNode = NULL;
     m_pCurrNode = NULL;
 
-    if (m_pEnv)
-    {
-        delete m_pEnv;
-        m_pEnv = NULL;
-    }
+    delete m_pEnv;
+    m_pEnv = NULL;
 
-    if (m_pHeader)
-    {
-        delete m_pHeader;
-        m_pHeader = NULL;
-    }
+    delete m_pHeader;
+    m_pHeader = NULL;
 
     m_nSoapVersion = VERSION_LAST;
     m_nStatus = AXIS_SUCCESS;
@@ -463,23 +471,13 @@
 {
     if (VERSION_LAST == m_nSoapVersion)
     {
-        if (m_pEnv)
-            delete m_pEnv;
+        delete m_pEnv;
         m_pEnv = getEnvelope ();
     }
 
     return m_nSoapVersion;
 }
 
-bool SoapDeSerializer::
-isCurrentElementEmpty()
-{
-    if (m_pCurrNode && START_END_ELEMENT == m_pCurrNode->m_type2)
-        return true;
-    
-    return false;
-}
-
 /*
  * In rpc/encoded style the stream is as follows,
  * <abc:ArrayOfPoints xmlns:abc="http://www.opensource.lk/Points"
@@ -547,9 +545,6 @@
     {
         m_pNode = m_pParser->next ();
         
-        // skip wrapper node w/type info - 
-        // Ex:<tns:QuoteInfoTypeArray xmlns:tns="http://www.getquote.org/test">
-
         if (!m_pNode)
             return pArray;
     
@@ -561,7 +556,7 @@
     
         if (arraySize == 0)
         {
-            m_pNode = m_pParser->next ();   // skip end element node too
+            skipEndNode();
             return pArray;
         }
         else if (arraySize > 0)
@@ -571,7 +566,7 @@
             
             if (m_nStatus != AXIS_FAIL)
             {
-                m_pNode = m_pParser->next ();   // skip end element node too
+                skipEndNode();
                 return pArray;
             }
         }
@@ -694,10 +689,6 @@
     if (RPC_ENCODED == m_nStyle)
     {
         m_pNode = m_pParser->next ();
-    
-        // skip wrapper node w/type info - 
-        // Ex:<tns:ArrayOfPhoneNumbers xmlns:tns="http://www.getquote.org/test">
-   
         if (!m_pNode)
             return Array;
     
@@ -705,7 +696,7 @@
     
         if (size == 0)
         {
-            m_pNode = m_pParser->next ();    // skip end element node too
+            skipEndNode();
             return Array;
         }
         else if (size > 0)
@@ -756,17 +747,12 @@
                 const AxisChar * pName,
                 const AxisChar * pNamespace)
 {
-    /* if anything has gone wrong earlier just do nothing */
     if (AXIS_SUCCESS != m_nStatus)
         return NULL;
 
     if (RPC_ENCODED == m_nStyle)
     {
         m_pNode = m_pParser->next ();
-        
-        // just skip wrapper node with type info
-        // Ex: <tns:QuoteInfoType xmlns:tns="http://www.getquote.org/test"> 
-        
         if (!m_pNode)
             return NULL;
             
@@ -782,7 +768,7 @@
             
             if (AXIS_SUCCESS == m_nStatus)
             {
-                m_pParser->next ();    // skip end node too
+                skipEndNode();
                 return pObject;
             }
             else
@@ -797,20 +783,11 @@
     {
         if (!m_pNode)
             m_pNode = m_pParser->next ();
-            
         if (!m_pNode)
             return NULL;
             
         if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
         {
-            // The StartEnd logic imbedded in code below is a temporary fix for 
-            // AXISCPP-991.  Prior to this fix, a start/end tag would create havoc
-            // when deserializing.  This is a temporary fix because if there are 
-            // attributes in the start/end empty tag, then we let it through as before
-            // and problems will surface.
-            
-            bool isStartEnd = false;
-            
             // if node contain attributes let them be used by the complex type's deserializer
             if (0 != m_pNode->m_pchAttributes[0])
             {
@@ -831,20 +808,12 @@
                         delete isNill; 
                 }
             }
-            else
-                isStartEnd = (START_END_ELEMENT == m_pNode->m_type2);
             
             m_pNode = NULL; // indicate node consumed
     
             TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct, 0);
             void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct)(0);
             TRACE_OBJECT_CREATE_FUNCT_EXIT(pCreFunct, pObject);
-            
-            if (isStartEnd)
-            {
-                m_pParser->next ();
-                return pObject;
-            }
     
             if (pObject && pDZFunct)
             {
@@ -854,8 +823,7 @@
 
                 if (AXIS_SUCCESS == m_nStatus)
                 {
-                    m_pParser->next ();    // skip end node too
-                    m_pNode = NULL;  // indicate node consumed
+                    skipEndNode();
                     return pObject;
                 }
                 else
@@ -890,10 +858,6 @@
         m_pParser->next ();
         
     m_nStatus = AXIS_SUCCESS;
-
-    // if anything has gone wrong earlier just do nothing
-    if (AXIS_SUCCESS != m_nStatus)
-        return NULL;
         
     if (RPC_ENCODED == m_nStyle)
     {
@@ -931,7 +895,7 @@
             
             if (AXIS_SUCCESS == m_nStatus)
             {
-                m_pParser->next ();    // skip end node too
+                skipEndNode();
                 return pObject;
             }
             else
@@ -976,8 +940,7 @@
 
             if (AXIS_SUCCESS == m_nStatus)
             {
-                m_pParser->next (); // skip end node too
-                m_pNode = NULL; // indicate node consumed
+                skipEndNode();
                 return pObject;
             }
             else
@@ -1394,15 +1357,14 @@
     
                         if (bReturn)
                         {
-                            m_pNode = m_pParser->next ();  // skip end element node too
+                            skipEndNode();
                             return;
                         }
                     }
                 }
                 
                 pSimpleType->deserialize(elementValue);
-                m_pNode = m_pParser->next ();  // skip end element node too
-                m_pNode = NULL;
+                skipEndNode();
                 return;
             }
             else if (m_pNode && (END_ELEMENT == m_pNode->m_type) && bNillFound
 ) //xsi:nil="true"
@@ -1411,22 +1373,14 @@
                 m_pNode = NULL;
                 return;
             } 
-
-            else if (m_pNode && (END_ELEMENT == m_pNode->m_type))    // We have
an empty string - Jira AXISCPP-93
+            else if (m_pNode && (END_ELEMENT == m_pNode->m_type))    // We have
an empty string
             {
                 pSimpleType->deserialize("");
                 m_pNode = NULL;
                 return;
             }
             else
-            {
-                // simpleType may have xsi:nill="true" */
-                //m_pNode = NULL;
-                // this is important when deserializing 
-                // arrays
-                 
                 return;
-            }
         }
         else
         {
@@ -1486,19 +1440,14 @@
             
                         if (bReturn)
                         {
-                            m_pNode = m_pParser->next ();  // skip end element node too
-                            m_pNode = NULL; // indicate node consumed
+                            skipEndNode();
                             return;
                         }
                     }
                 }
                 
                 pSimpleType->deserialize(elementValue);
-                m_pNode = m_pParser->next ();  // skip end element node too
-                m_pNode = NULL;
-                /* this is important in doc/lit style when deserializing 
-                 * arrays
-                 */
+                skipEndNode();
                 return;
             }
             else if (m_pNode && (END_ELEMENT == m_pNode->m_type) && bNillFound
) //xsi:nil="true"
@@ -1514,14 +1463,7 @@
                 return;
             }
             else
-            {
-                /* simpleType may have xsi:nill="true" */
-    //            m_pNode = NULL;
-                /* this is important in doc/lit style when deserializing 
-                 * arrays
-                 */
                 return;
-            }
          }
         else
             return;

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.h?view=diff&rev=496034&r1=496033&r2=496034
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.h Sat Jan 13 22:41:44 2007
@@ -73,7 +73,6 @@
     const char* getMethodNameToInvoke();
     void setMethodNameToInvoke(const char*);
     
-    bool isCurrentElementEmpty();
 	/**
 	* This method allows to peek for the name of the next element in XML stream.
 	* Useful in supporting "all" & "choice" WSDL constructs.
@@ -353,6 +352,7 @@
     void deserializeEncodedArray (Axis_Array* pArray, IAnySimpleType* pSimpleType, const
AxisChar* pName, const AxisChar* pNamespace, int size);
 	void deserializeLiteralComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct,
void *pDelFunct,  const AxisChar * pName, const AxisChar * pNamespace);
 	void deserializeEncodedComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct,
void *pDelFunct, const AxisChar * pName, const AxisChar * pNamespace, int size);
+    void skipEndNode();
 };
 
 AXIS_CPP_NAMESPACE_END

Modified: webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.cpp?view=diff&rev=496034&r1=496033&r2=496034
==============================================================================
--- webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.cpp (original)
+++ webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.cpp Sat Jan 13 22:41:44 2007
@@ -42,6 +42,7 @@
     m_pParser = XMLReaderFactory::createXMLReader();
     m_pInputSource = NULL;
     m_bCanParseMore = false;
+    m_bStartEndElement = false;
 }
 
 XMLParserXerces::
@@ -52,7 +53,6 @@
 
     delete m_pInputSource;
     delete m_pParser;
-    
 }
 
 int XMLParserXerces::
@@ -133,19 +133,22 @@
 #endif
         m_bFirstParsed = true;
     }
-
+    
     if(!m_bPeeked) 
         m_Xhandler.freeElement();
+        
+    // set flag to false since we are going to read next node
+    m_bStartEndElement = false;
     
     AnyElement* elem;
     while (m_bCanParseMore && AXIS_FAIL != m_Xhandler.getStatus())
-    {
+    {        
         // See if we have a token to consume
         elem = m_Xhandler.getAnyElement();
         
         // Since we have consumed whatever is there, ensure peek flag is set to false
         m_bPeeked = false;
-        
+
         // If we do not have an element, then parse next token; else if
         // whitespace, ignore whitespace; else return token
         if (!elem)
@@ -153,7 +156,14 @@
         else if (!isCharData && (CHARACTER_ELEMENT == elem->m_type))
             m_Xhandler.freeElement();
         else
+        {
+            // Keep track of when we give back a start-end element in order to ensure
+            // that peek() - which is used to determine optional elements or elements 
+            // that are not in order (e.g. xsd:all support) - returns a null string 
+            if (elem->m_type == START_ELEMENT && elem->m_type2 == START_END_ELEMENT)
+               m_bStartEndElement = true;
             return elem;
+        }
     }
     
     return NULL;
@@ -163,6 +173,12 @@
 const char* XMLParserXerces::
 peek()
 {
+    // peek() is used to determine optional elements or elements 
+    // that are not in order (e.g. xsd:all support) - return a null string if 
+    // the last node processed was a start/end element
+    if (m_bStartEndElement)
+        return "";
+        
     if (!m_bPeeked)
     {
         if(!m_bFirstParsed)
@@ -215,6 +231,9 @@
     if(!m_bPeeked) 
         m_Xhandler.freeElement();
 
+    // set flag to false since we are going to read next node
+    m_bStartEndElement = false;
+
     AnyElement* elem;
     while (m_bCanParseMore && AXIS_FAIL != m_Xhandler.getStatus())
     {
@@ -230,6 +249,12 @@
             m_bCanParseMore = m_pParser->parseNext(m_ScanToken);
         else
         {
+            // Keep track of when we give back a start-end element in order to ensure
+            // that peek() - which is used to determine optional elements or elements 
+            // that are not in order (e.g. xsd:all support) - returns a null string 
+            if (elem->m_type == START_ELEMENT && elem->m_type2 == START_END_ELEMENT)
+               m_bStartEndElement = true;
+                           
             m_Xhandler.setGetPrefixMappings(false);
             return elem;
         }

Modified: webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.h?view=diff&rev=496034&r1=496033&r2=496034
==============================================================================
--- webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.h (original)
+++ webservices/axis/trunk/c/src/xml/xerces/XMLParserXerces.h Sat Jan 13 22:41:44 2007
@@ -68,6 +68,7 @@
     bool m_bFirstParsed;
     SoapInputSource* m_pInputSource;
     bool m_bPeeked;
+    bool m_bStartEndElement;
 };
 
 #endif

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementAttributesClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementAttributesClient.cpp?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementAttributesClient.cpp
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementAttributesClient.cpp
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,78 @@
+#include "StartEndElementAttributes.hpp"
+#include <iostream>
+
+// Test that a start/end element is handled correctly.
+
+int main( int argc, char * argv[])
+{
+	char *	pszEndpoint = "http://localhost:9020/UnitTest_StartEndElement1";
+
+	// If there are arguments, replace the default URL with that specified on the
+	// command line.
+	if( argc > 1)
+	{
+		pszEndpoint = argv[1];
+	}
+
+	// Create the web service.
+	StartEndElementAttributes  ws( pszEndpoint, APTHTTP1_1);
+
+	try
+	{
+        
+        // Set input information
+        NewOperation_Param_NewOperation in;
+        in.setshortNumber(20);
+        in.setaString("somestring", false);
+        
+        // Issue we service require
+        NewOperationResponse_Param_NewOperationResponse* out = ws.NewOperation(&in);
+        
+        // Dump output response
+        if (out == NULL)
+            cout << "Test failed, NULL response" << endl;
+        else
+        {
+            int arraySize = -1;
+            if (out->ListInfoString == NULL)
+                cout << "Test failed, Expecting data for field ListInfoString" <<
endl;
+            else if (out->ListInfoString->InfoString == NULL)
+                cout << "Test failed, Expecting data for field InfoString" <<
endl;
+            else if (out->ListInfoString->InfoString->get(arraySize) != NULL ||
arraySize != 0)
+                cout << "Test failed, Expecting zero-size array" << endl;
+            
+            if (out->ListInfoString->attributeA)
+                cout << "Test failed, Expecting attributeA to be NULL" << endl;
           
+            else if (out->ListInfoString->attributeB == NULL)
+                cout << "Test failed, Expecting value for attributeB" << endl;
+            else
+                cout << "attributeB = " << out->ListInfoString->attributeB
<< endl;
+                
+            if (out->SomeString == NULL)
+                cout << "Test failed, Expecting data for field SomeString" <<
endl;
+            else
+                cout << "SomeString = " << out->SomeString << endl;
+        }
+        
+        delete out;
+	}
+
+	// Catch those exceptions!
+	catch( AxisException& e)
+	{
+		cout << "Exception : " << e.what() << endl;
+	}
+	catch( exception& e)
+	{
+	    cout << "Unknown exception has occured: " << e.what() << endl;
+	}
+	catch( ...)
+	{
+	    cout << "Unknown exception has occured" << endl;
+	}
+
+	// Done!
+	cout << "---------------------- TEST COMPLETE -----------------------------" <<
endl;
+
+	return 0;
+}
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementClient.cpp?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementClient.cpp
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/StartEndElementClient.cpp
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,71 @@
+#include "StartEndElement.hpp"
+#include <iostream>
+
+// Test that a start/end element is handled correctly.
+
+int main( int argc, char * argv[])
+{
+	char *	pszEndpoint = "http://localhost:9020/UnitTest_StartEndElement1";
+
+	// If there are arguments, replace the default URL with that specified on the
+	// command line.
+	if( argc > 1)
+	{
+		pszEndpoint = argv[1];
+	}
+
+	// Create the web service.
+	StartEndElement  ws( pszEndpoint, APTHTTP1_1);
+
+	try
+	{
+        
+        // Set input information
+        NewOperation_Param_NewOperation in;
+        in.setshortNumber(20);
+        in.setaString("somestring", false);
+        
+        // Issue we service require
+        NewOperationResponse_Param_NewOperationResponse* out = ws.NewOperation(&in);
+        
+        // Dump output response
+        if (out == NULL)
+            cout << "Test failed, NULL response" << endl;
+        else
+        {
+            int arraySize = -1;
+            if (out->ListInfoString == NULL)
+                cout << "Test failed, Expecting data for field ListInfoString" <<
endl;
+            else if (out->ListInfoString->InfoString == NULL)
+                cout << "Test failed, Expecting data for field InfoString" <<
endl;
+            else if (out->ListInfoString->InfoString->get(arraySize) != NULL ||
arraySize != 0)
+                cout << "Test failed, Expecting zero-size array" << endl;
+                
+            if (out->SomeString == NULL)
+                cout << "Test failed, Expecting data for field SomeString" <<
endl;
+            else
+                cout << "SomeString = " << out->SomeString << endl;
+        }
+        
+        delete out;
+	}
+
+	// Catch those exceptions!
+	catch( AxisException& e)
+	{
+		cout << "Exception : " << e.what() << endl;
+	}
+	catch( exception& e)
+	{
+	    cout << "Unknown exception has occured: " << e.what() << endl;
+	}
+	catch( ...)
+	{
+	    cout << "Unknown exception has occured" << endl;
+	}
+
+	// Done!
+	cout << "---------------------- TEST COMPLETE -----------------------------" <<
endl;
+
+	return 0;
+}
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement.cpp.out?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement.cpp.out (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement.cpp.out Sat
Jan 13 22:41:44 2007
@@ -0,0 +1,3 @@
+attributeB = attributeB-Value
+SomeString = Testing start/end empty element
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes.cpp.out
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes.cpp.out?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes.cpp.out
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes.cpp.out
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,3 @@
+attributeB = attributeB-Value
+SomeString = Testing start/end empty element
+---------------------- TEST COMPLETE -----------------------------

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes_ServerResponse.expected?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes_ServerResponse.expected
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElementAttributes_ServerResponse.expected
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,21 @@
+HTTP/1.1 200 OK
+Server: WebSphere Application Server/5.1
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-GB
+Transfer-Encoding: chunked
+
+###
+<?xml version="1.0" encoding="utf-8"?>                                    
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"     
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                     
+xmlns:xsd="http://www.w3.org/2001/XMLSchema">                             
+<soap:Body>
+<NewOperationResponse xmlns="http://startendelement.test.apache.org">             
                                                    
+      <Param_NewOperationResponse>
+        <ListInfoString attributeB="attributeB-Value"/>                           
                       
+        <SomeString>Testing start/end empty element</SomeString>            
          
+      </Param_NewOperationResponse>                                               
+</NewOperationResponse>                                               
+</soap:Body>                                                            
+</soap:Envelope>         
+0

Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement_ServerResponse.expected
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement_ServerResponse.expected?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement_ServerResponse.expected
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/StartEndElement_ServerResponse.expected
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,21 @@
+HTTP/1.1 200 OK
+Server: WebSphere Application Server/5.1
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-GB
+Transfer-Encoding: chunked
+
+###
+<?xml version="1.0" encoding="utf-8"?>                                    
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"     
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                     
+xmlns:xsd="http://www.w3.org/2001/XMLSchema">                             
+<soap:Body>
+<NewOperationResponse xmlns="http://startendelement.test.apache.org">             
                                                    
+      <Param_NewOperationResponse>
+        <ListInfoString />                                                   
+        <SomeString>Testing start/end empty element</SomeString>            
          
+      </Param_NewOperationResponse>                                               
+</NewOperationResponse>                                               
+</soap:Body>                                                            
+</soap:Envelope>         
+0

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElement.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElement.xml?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElement.xml (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElement.xml Sat Jan
13 22:41:44 2007
@@ -0,0 +1,16 @@
+<test>
+  <name>StartEndElement</name>
+  <description>StartEndElement</description>
+  <clientLang>cpp</clientLang>
+  <clientCode>StartEndElementClient.cpp</clientCode>
+  <wsdl>StartEndElement.wsdl</wsdl>
+  <expected>
+    <output>
+      StartEndElement.cpp.out
+    </output>
+    <serverResponse>
+      StartEndElement_ServerResponse.expected
+    </serverResponse>
+  </expected>
+  <endpoint>http://localhost:80/StartEndElement</endpoint>
+</test>

Added: webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElementAttributes.xml
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElementAttributes.xml?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElementAttributes.xml
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/StartEndElementAttributes.xml
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,16 @@
+<test>
+  <name>StartEndElementAttributes</name>
+  <description>StartEndElementAttributes</description>
+  <clientLang>cpp</clientLang>
+  <clientCode>StartEndElementAttributesClient.cpp</clientCode>
+  <wsdl>StartEndElementAttributes.wsdl</wsdl>
+  <expected>
+    <output>
+      StartEndElementAttributes.cpp.out
+    </output>
+    <serverResponse>
+      StartEndElementAttributes_ServerResponse.expected
+    </serverResponse>
+  </expected>
+  <endpoint>http://localhost:80/StartEndElementAttributes</endpoint>
+</test>

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?view=diff&rev=496034&r1=496033&r2=496034
==============================================================================
Binary files - no diff available.

Added: webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElement.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElement.wsdl?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElement.wsdl (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElement.wsdl Sat Jan
13 22:41:44 2007
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+                  xmlns:s="http://www.w3.org/2001/XMLSchema" 
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
+                  xmlns:tns="http://startendelement.test.apache.org" 
+                  targetNamespace="http://startendelement.test.apache.org" 
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" 
+         targetNamespace="http://startendelement.test.apache.org">
+      <s:element name="NewOperation">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="Param_NewOperation">
+              <s:complexType>
+               <s:sequence>
+                 <s:element minOccurs="1" maxOccurs="1" name="shortNumber" type="s:short"
/>
+                 <s:element minOccurs="0" maxOccurs="1" name="aString" type="s:string"
/>
+               </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+ 
+      <s:element name="NewOperationResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="Param_NewOperationResponse">
+              <s:complexType>
+                <s:sequence>
+                  <s:element minOccurs="0" maxOccurs="1" name="ListInfoString" type="tns:ArrayOfInfoString"
/>
+                  <s:element minOccurs="0" maxOccurs="1" name="SomeString" type="s:string"
/>
+                </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:complexType name="ArrayOfInfoString">
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="unbounded" name="InfoString" nillable="true">
+            <s:complexType name="InfoString">
+             <s:sequence>
+               <s:element minOccurs="0" maxOccurs="1" name="CodInfoString" type="s:string"
/>
+             </s:sequence>
+            </s:complexType>
+          </s:element>
+        </s:sequence>
+      </s:complexType>
+
+    </s:schema>
+  </wsdl:types>
+
+  <wsdl:message name="NewOperationRequest">
+    <wsdl:part name="parameters" element="tns:NewOperation" />
+  </wsdl:message>
+  <wsdl:message name="NewOperationResponse">
+    <wsdl:part name="parameters" element="tns:NewOperationResponse" />
+  </wsdl:message>
+
+  <wsdl:portType name="StartEndElement">
+    <wsdl:operation name="NewOperation">
+      <wsdl:input message="tns:NewOperationRequest" />
+      <wsdl:output message="tns:NewOperationResponse" />
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:binding name="StartEndElement" type="tns:StartEndElement">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+    <wsdl:operation name="NewOperation">
+      <soap:operation soapAction="http://startendelement.test.apache.org/NewOperation"
style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="StartEndElement">
+    <wsdl:port name="Service" binding="tns:StartEndElement">
+      <soap:address location="http://localhost:9080/StartEndElement/services/Service"
/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

Added: webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElementAttributes.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElementAttributes.wsdl?view=auto&rev=496034
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElementAttributes.wsdl
(added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/wsdls/StartEndElementAttributes.wsdl
Sat Jan 13 22:41:44 2007
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+                  xmlns:s="http://www.w3.org/2001/XMLSchema" 
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
+                  xmlns:tns="http://startendelement.test.apache.org" 
+                  targetNamespace="http://startendelement.test.apache.org" 
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema elementFormDefault="qualified" 
+         targetNamespace="http://startendelement.test.apache.org">
+      <s:element name="NewOperation">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="Param_NewOperation">
+              <s:complexType>
+               <s:sequence>
+                 <s:element minOccurs="1" maxOccurs="1" name="shortNumber" type="s:short"
/>
+                 <s:element minOccurs="0" maxOccurs="1" name="aString" type="s:string"
/>
+               </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+ 
+      <s:element name="NewOperationResponse">
+        <s:complexType>
+          <s:sequence>
+            <s:element minOccurs="0" maxOccurs="1" name="Param_NewOperationResponse">
+              <s:complexType>
+                <s:sequence>
+                  <s:element minOccurs="0" maxOccurs="1" name="ListInfoString" type="tns:ArrayOfInfoString"
/>
+                  <s:element minOccurs="0" maxOccurs="1" name="SomeString" type="s:string"
/>
+                </s:sequence>
+              </s:complexType>
+            </s:element>
+          </s:sequence>
+        </s:complexType>
+      </s:element>
+
+      <s:complexType name="ArrayOfInfoString">
+        <s:attribute name="attributeA" type="s:string" use="optional"/>
+        <s:attribute name="attributeB" type="s:string" use="required"/>
+        <s:sequence>
+          <s:element minOccurs="0" maxOccurs="unbounded" name="InfoString" nillable="true">
+            <s:complexType name="InfoString">
+             <s:sequence>
+               <s:element minOccurs="0" maxOccurs="1" name="CodInfoString" type="s:string"
/>
+             </s:sequence>
+            </s:complexType>
+          </s:element>
+        </s:sequence>
+      </s:complexType>
+
+    </s:schema>
+  </wsdl:types>
+
+  <wsdl:message name="NewOperationRequest">
+    <wsdl:part name="parameters" element="tns:NewOperation" />
+  </wsdl:message>
+  <wsdl:message name="NewOperationResponse">
+    <wsdl:part name="parameters" element="tns:NewOperationResponse" />
+  </wsdl:message>
+
+  <wsdl:portType name="StartEndElementAttributes">
+    <wsdl:operation name="NewOperation">
+      <wsdl:input message="tns:NewOperationRequest" />
+      <wsdl:output message="tns:NewOperationResponse" />
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <wsdl:binding name="StartEndElementAttributes" type="tns:StartEndElementAttributes">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+    <wsdl:operation name="NewOperation">
+      <soap:operation soapAction="http://startendelement.test.apache.org/NewOperation"
style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="StartEndElementAttributes">
+    <wsdl:port name="Service" binding="tns:StartEndElementAttributes">
+      <soap:address location="http://localhost:9080/StartEndElementAttributes/services/Service"
/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message