axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prest...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/client/cpp nillableComplexTypeClient.cpp
Date Tue, 21 Jun 2005 16:28:58 GMT
prestonf    2005/06/21 09:28:58

  Added:       c/tests/auto_build/testcases/client/cpp
                        nillableComplexTypeClient.cpp
  Log:
  Added an additional unit test: nillableComplexType
  
  Revision  Changes    Path
  1.1                  ws-axis/c/tests/auto_build/testcases/client/cpp/nillableComplexTypeClient.cpp
  
  Index: nillableComplexTypeClient.cpp
  ===================================================================
  #include "nillableComplexType.hpp"
  #include <iostream>
  
  int main(int argc, char* argv[])
  {
  	try
  	{
  		char *  pszEndpoint = "http://whaler.hursley.ibm.com:9090/CalculatorDoc/services/CalculatorDoc";
  
  		if( argc > 0)
  		{
  			pszEndpoint = argv[1];
  		}
  
  		nillableComplexType * pwsnillableComplexType = new nillableComplexType( pszEndpoint);
  	
  		xsd__string			sValue = "Hello";
  		xsd__base64Binary * pb64Value = new xsd__base64Binary();
  		xsd__NMTOKEN		nmValue = 0;
  		char *				psz64BitValue = "FRED";
  
  	    pb64Value->__ptr = (unsigned char *) psz64BitValue;
  	    pb64Value->__size = strlen (psz64BitValue);
  
  		xsd__string  sResult = pwsnillableComplexType->Report( sValue, pb64Value, nmValue);
  
  		cout << "The result is " << sResult << endl;
  
  		delete pwsnillableComplexType;
  	}
  	catch( SoapFaultException& sfe)
  	{
  		// Catch any other SOAP faults
  		cout << "SoapFaultException: " << sfe.getFaultCode() << " " <<
sfe.what() << endl;
  	}
  	catch( AxisException& e)
  	{
  		// Catch an AXIS exception
  	cout << "AxisException: " << e.getExceptionCode() << " " << e.what()
<< endl;
  	}
  	catch( exception& e)
  	{
  		// Catch a general exception
  	cout << "Unknown Exception: " << e.what() << endl;
  	}
  	catch( ...)
  	{
  		// Catch any other exception
  	cout << "Unspecified Exception: " << endl;
  	}
  
      cout << "---------------------- TEST COMPLETE -----------------------------" <<
endl;
  
      // Exit.
      return 0;
  }
  
  
  

Mime
View raw message