axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanj...@apache.org
Subject cvs commit: xml-axis/c/src/client/samples/Calculator Calculator.cpp
Date Tue, 16 Sep 2003 08:50:22 GMT
sanjaya     2003/09/16 01:50:22

  Modified:    c/src/client/samples/Calculator Calculator.cpp
  Log:
  modifications to support simple types
  
  Revision  Changes    Path
  1.2       +18 -7     xml-axis/c/src/client/samples/Calculator/Calculator.cpp
  
  Index: Calculator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-axis/c/src/client/samples/Calculator/Calculator.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Calculator.cpp	11 Sep 2003 10:42:47 -0000	1.1
  +++ Calculator.cpp	16 Sep 2003 08:50:22 -0000	1.2
  @@ -70,18 +70,29 @@
   {
   	int nStatus;
   	if (SUCCESS != m_pCall->Initialize()) return 0;
  -	m_pCall->SetOperation("Add", "http://www.opensource.lk/");//this should be done before
adding parameters or return type
  -	uParamValue Value;
  -	Value.nValue = a;
  -	m_pCall->AddParameter(XSD_INT, Value, "a");
  -	Value.nValue = b;
  -	m_pCall->AddParameter(XSD_INT, Value, "b");
  +	/*
  +	The protocol can be taken from the binding section in the 
  +	wsdl?
  +	*/
  +	m_pCall->SetProtocol(APTHTTP);
  +	/*
  +	The value for SOAPAction is specified in the binding section 
  +	of the WSDL under the relevant operation
  +	*/
  +	m_pCall->SetHeader("SOAPAction", "servicename");
  +	/*
  +	this should be done before adding parameters or return type
  +	*/
  +	m_pCall->SetOperation("Add", "http://www.opensource.lk/");
  +	m_pCall->AddParameter(a, "a");
  +	m_pCall->AddParameter(b, "b");
   	m_pCall->SetReturnType(XSD_INT);
   	int ret = 0;
   	nStatus = m_pCall->Invoke();
   	if (SUCCESS == nStatus)
   	{
  -		ret = m_pCall->GetResult().nValue;
  +		ret = m_pCall->GetResult()->GetInt();
  +		printf("%s%d", "Got The result", ret);
   	}
   	m_pCall->UnInitialize();
   	return ret;
  
  
  

Mime
View raw message