axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r676129 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp
Date Sat, 12 Jul 2008 05:59:55 GMT
Author: nadiramra
Date: Fri Jul 11 22:59:54 2008
New Revision: 676129

URL: http://svn.apache.org/viewvc?rev=676129&view=rev
Log:
AXISCPP-879 - some fields not being set.

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp?rev=676129&r1=676128&r2=676129&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/inquire_v2Client.cpp Fri
Jul 11 22:59:54 2008
@@ -35,156 +35,175 @@
 
 char endpoint[256];
 
-int
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
 {
-    if( argc < 2 )
-    {
-        printf( "Usage: %s [endpoint] ", argv[0]);
-        exit(0);
-    }
-
-    sprintf(endpoint, argv[1]); 
-    Inquire *ws = new Inquire(endpoint); 
-    //ws->setProxy("localhost", 9090);
-
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
-
-                do
-                {
-    try 
-    {
-        char buffer[100];
-        sprintf(buffer, "UUID:2524c425-656e-4eb2-8b13-080cfb081382");
-
-        tModelKey_Array arrtModelKeys;
-                tModelKey * array = new tModelKey [ARRAYSIZE];        
-        int i = 0;
-        for (i = 0; i < ARRAYSIZE; i++)
-        {
-            array[i] = new char[100];
-                        strcpy(array[i],buffer);
-
-        }
-                arrtModelKeys.set(array,ARRAYSIZE);
-        char* cpname = "2.0";
-        
-        printf("invoking get_tModelDetail...\n");
-        tModel_Array *result = ws->get_tModelDetail(&arrtModelKeys, cpname);
-                int outputSize=0;
-                tModel ** arrayOut = result->get(outputSize);
-        printf("tModel_Array size = %d\n", outputSize);
-        for( i = 0; i < outputSize; i++ ) 
-        {
-            printf("tModel %d...\n", i + 1 );
-            printf("\t tModel Key Ref = %s\n", arrayOut[i]->tModelKey_Ref);
-            printf("\t Operator = %s\n", arrayOut[i]->_operator);
-            printf("\t Authorized Name = %s\n", arrayOut[i]->authorizedName);
-            if(arrayOut[i]->name_Ref)
-                printf("\t Name = %s\n", arrayOut[i]->name_Ref->name_value);
-                                int outputSizeDesc = 0;
-                            description ** arrayDesc= arrayOut[i]->description_Ref->get(outputSizeDesc);
 
-            for( int j = 0; j < outputSizeDesc; j++)
-            {
-                printf("\t Description %d = %s\n", j + 1,  arrayDesc[j]->description_value);
-            }
-
-            if( arrayOut[i]->overviewDoc_Ref )
-                printf("\t Overview URL = %s\n", arrayOut[i]->overviewDoc_Ref->overviewURL);
-        }
-
-        sprintf(buffer, "aea80cae-6cde-4eac-9feb-19ac9719ebb9");
-        businessKey_Array arrBusinessKeys;
-                businessKey * arrayBusiness = new businessKey[ARRAYSIZE];        
-        for (i = 0; i < ARRAYSIZE; i++)
-        {
-            arrayBusiness[i] = new char[100];
-                        strcpy(arrayBusiness[i],buffer);
-        }
-                arrBusinessKeys.set(arrayBusiness,ARRAYSIZE);
-        printf("invoking get_businessDetail ...\n");
-        //printf("businessEntity_Array size = %d\n", ws->get_businessDetail(arrBusinessKeys,
cpname).m_Size);           
-        businessEntity_Array* businessEntities = ws->get_businessDetail(&arrBusinessKeys,
cpname);
-                outputSize = 0;
-                businessEntity ** arrayOutB = businessEntities->get(outputSize);
-        //businessEntity_Array get_businessDetail(businessKey_Array Value0,xsd__string Value1);
-        printf("businessEntity_Array size = %d\n", outputSize);
-        for( i = 0; i < outputSize; i++ ) 
-        {
-            printf( "Business Entity %d\n", i + 1 );
-            printf("\t Business Key Ref = %s\n", arrayOutB[i]->businessKey_Ref);
-            printf("\t Operator = %s\n", arrayOutB[i]->_operator);
-            printf("\t Authorized Name = %s\n", arrayOutB[i]->authorizedName);
-            printf( "\t Names... \n" );
-                        int outputSizeBE = 0;
-                         name** arrayBE = arrayOutB[i]->name_Ref->get(outputSizeBE);
-            for( int j = 0; j < outputSizeBE; j++)
-            {
-                printf("\t\t Name %d = %s\n", j + 1,  arrayBE[j]->name_value);
-            }
-           
-            if( arrayOutB[i]->businessServices_Ref )
-            {
-                printf( "\t Business Services...\n" );
-                                int outputSizeBS = 0;
-                                businessService ** arrayOutBS = arrayOutB[i]->businessServices_Ref->businessService_Ref->get(outputSizeBS);
-                for( int j = 0; j < outputSizeBS; j++ )
-                {
-                    printf( "\t\t Business Service %d...\n", j + 1 );
-                    printf( "\t\t\t service key referance = %s\n", arrayOutBS[j]->serviceKey_Ref
);
-                    printf( "\t\t\t business key referance = %s\n", arrayOutBS[j]->serviceKey_Ref
);
-                    if( arrayOutBS[j]->bindingTemplates_Ref )
-                    {
-                         printf( "\t\t\t Binding Templates...\n" );
-                                                 int outputSizeBT=0;
-                                                 bindingTemplate ** arrayOutBT = arrayOutBS[j]->bindingTemplates_Ref->bindingTemplate_Ref->get(outputSizeBT);
-                         for( int k = 0; k < outputSizeBT; k++ )
-                         {
-                            printf( "\t\t\t\t Access Point %d...\n", k + 1 );
-                            if( arrayOutBT[k]->accessPoint_Ref )
-                            {
-                                printf( "\t\t\t\t\t Point = %s\n", arrayOutBT[k]->accessPoint_Ref->accessPoint_value
);
-                                printf( "\t\t\t\t\t URL Type = %s\n\n", arrayOutBT[k]->accessPoint_Ref->URLType_Ref
);
-                            }
-                         }
-                    }
-                }
-            }
-            //printf("overviewURL = %s\n", result.m_Array[i].overviewDoc_Ref->overviewURL);
-        }
-
-        bSuccess = true;
-        /*name* val1 = new name();
-        val1->name_value = "TEST";
-        tModelInfos* tModels =  ws->find_tModel(NULL, val1, NULL, NULL, "2.0",5);
-
-        printf("tModel info size = %d\n", tModels->tModelInfo_Ref.m_Size);
-        */
-    } 
-    catch(AxisException& e)
-    {
-                        bool bSilent = false;
-
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
-
-            if( !bSilent)
-                        {
-        printf("Exception caught : %s\n", e.what());
-                        }
-    }
-                iRetryIterationCount--;
-                } while( iRetryIterationCount > 0 && !bSuccess);
+	if (argc < 2)
+	{
+		printf("Usage: %s [endpoint] ", argv[0]);
+		exit(0);
+	}
+
+	sprintf(endpoint, argv[1]);
+	Inquire ws(endpoint);
+
+	bool bSuccess = false;
+	int iRetryIterationCount = 3;
+
+	do
+	{
+		try
+		{
+			char buffer[100];
+			sprintf(buffer, "UUID:2524c425-656e-4eb2-8b13-080cfb081382");
+
+			// TEST #1  OPERATION: TModelDetail* get_tModelDetail(Get_tModelDetail* Value0);
+			tModelKey_Array arrtModelKeys;
+			tModelKey * array = new tModelKey [ARRAYSIZE];
+			int i = 0;
+			for (i = 0; i < ARRAYSIZE; i++)
+			{
+				array[i] = new char[100];
+				strcpy(array[i],buffer);
+			}
+			arrtModelKeys.set(array,ARRAYSIZE);
+			char* cpname = "2.0";
+			
+			Get_tModelDetail gtmd_input;
+			gtmd_input.setgeneric(cpname);
+			gtmd_input.settModelKey(&arrtModelKeys);
+
+			printf("invoking get_tModelDetail...\n");
+
+			TModelDetail* tmd_result = ws.get_tModelDetail(&gtmd_input);
+			tModel_Array *result = tmd_result->gettModel();
+			int outputSize=0;
+			tModel ** arrayOut = result->get(outputSize);
+			printf("tModel_Array size = %d\n", outputSize);
+			for( i = 0; i < outputSize; i++ )
+			{
+				printf("tModel %d...\n", i + 1 );
+				printf("     tModel Key Ref = %s\n", arrayOut[i]->tModelKey_Ref);
+				printf("     Operator = %s\n", arrayOut[i]->_operator);
+				printf("     Authorized Name = %s\n", arrayOut[i]->authorizedName);
+				if(arrayOut[i]->name_Ref)
+				    printf("     Name = %s\n", arrayOut[i]->name_Ref->name_value);
+				int outputSizeDesc = 0;
+				description ** arrayDesc= arrayOut[i]->description_Ref->get(outputSizeDesc);
+				for( int j = 0; j < outputSizeDesc; j++)
+				{
+					printf("     Description %d = %s\n", j + 1, arrayDesc[j]->description_value);
+				}
+
+				if( arrayOut[i]->overviewDoc_Ref )
+				   printf("     Overview URL = %s\n", arrayOut[i]->overviewDoc_Ref->overviewURL);
+			
+				if( arrayOut[i]-> categoryBag_Ref )
+				{
+					printf("categoryBag...\n");
+					keyedReference_Array* kra = arrayOut[i]-> categoryBag_Ref->keyedReference_Ref;
+					keyedReference ** krarray = kra->get(outputSize);
+					for( i = 0; i < outputSize; i++ )
+					{
+						printf("keyedReference  %d...\n", i + 1 );
+						printf("     tModelKey = %s\n", krarray[i]->tModelKey_Ref);
+						printf("     keyName = %s\n", krarray[i]->keyName);
+						printf("     keyValue = %s\n", krarray[i]->keyValue);
+					}
+				}
+			}
+
+			// TEST #2  OPERATION: BusinessDetail* get_businessDetail(Get_businessDetail* Value0);
+
+			sprintf(buffer, "aea80cae-6cde-4eac-9feb-19ac9719ebb9");
+			businessKey_Array arrBusinessKeys;
+			businessKey * arrayBusiness = new businessKey[ARRAYSIZE];
+			for (i = 0; i < ARRAYSIZE; i++)
+			{
+				arrayBusiness[i] = new char[100];
+				strcpy(arrayBusiness[i],buffer);
+			}
+			arrBusinessKeys.set(arrayBusiness,ARRAYSIZE);
+			
+			Get_businessDetail gbd_input;
+			gbd_input.setgeneric(cpname);
+			gbd_input.setbusinessKey(&arrBusinessKeys);
+			
+			printf("invoking get_businessDetail ...\n");
+			BusinessDetail* bd_result = ws.get_businessDetail(&gbd_input);
+			
+			businessEntity_Array* businessEntities = bd_result->getbusinessEntity();
+			
+			outputSize = 0;
+			businessEntity ** arrayOutB = businessEntities->get(outputSize);
+			printf("businessEntity_Array size = %d\n", outputSize);
+			for( i = 0; i < outputSize; i++ )
+			{
+				printf( "Business Entity %d\n", i + 1 );
+				printf("     Business Key Ref = %s\n", arrayOutB[i]->businessKey_Ref);
+				printf("     Operator = %s\n", arrayOutB[i]->_operator);
+				printf("     Authorized Name = %s\n", arrayOutB[i]->authorizedName);
+				printf( "     Names... \n" );
+				int outputSizeBE = 0;
+				name** arrayBE = arrayOutB[i]->name_Ref->get(outputSizeBE);
+				for( int j = 0; j < outputSizeBE; j++)
+				{
+					printf("         Name %d = %s\n", j + 1, arrayBE[j]->name_value);
+				}
+
+				if( arrayOutB[i]->businessServices_Ref )
+				{
+					printf( "     Business Services...\n" );
+					int outputSizeBS = 0;
+					businessService ** arrayOutBS = arrayOutB[i]->businessServices_Ref->businessService_Ref->get(outputSizeBS);
+					for( int j = 0; j < outputSizeBS; j++ )
+					{
+						printf( "         Business Service %d...\n", j + 1 );
+						printf( "             service key referance = %s\n", arrayOutBS[j]->serviceKey_Ref
);
+						printf( "             business key referance = %s\n", arrayOutBS[j]->businessKey_Ref
);
+						if( arrayOutBS[j]->bindingTemplates_Ref )
+						{
+							printf( "             Binding Templates...\n" );
+							int outputSizeBT=0;
+							bindingTemplate ** arrayOutBT = arrayOutBS[j]->bindingTemplates_Ref->bindingTemplate_Ref->get(outputSizeBT);
+							for( int k = 0; k < outputSizeBT; k++ )
+							{
+								printf( "                 Access Point %d...\n", k + 1 );
+								if( arrayOutBT[k]->accessPoint_Ref )
+								{
+									printf( "                     Point = %s\n", arrayOutBT[k]->accessPoint_Ref->accessPoint_value
);
+									printf( "                     URL Type = %s\n\n", arrayOutBT[k]->accessPoint_Ref->URLType_Ref
);
+								}
+							}
+						}
+					}
+				}
+			}
+
+			bSuccess = true;
+		}
+		catch(AxisException& e)
+		{
+			bool bSilent = false;
+
+			if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+			{
+				if( iRetryIterationCount > 0)
+				{
+					bSilent = true;
+				}
+			}
+			else
+			{
+				iRetryIterationCount = 0;
+			}
+
+			if( !bSilent)
+			{
+				printf("Exception caught : %s\n", e.what());
+			}
+		}
+		iRetryIterationCount--;
+	} while (iRetryIterationCount > 0&& !bSuccess);
 
-    return 0;
+	return 0;
 }



Mime
View raw message