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 da...@apache.org on 2004/03/29 06:29:34 UTC

cvs commit: ws-axis/c/samples/client/ssl_client InteropBaseClient.c InteropTestPortType.c InteropTestPortType.h Makefile.am

damitha     2004/03/28 20:29:34

  Added:       c/samples/client/ssl_client InteropBaseClient.c
                        InteropTestPortType.c InteropTestPortType.h
                        Makefile.am
  Log:
  
  
  Revision  Changes    Path
  1.1                  ws-axis/c/samples/client/ssl_client/InteropBaseClient.c
  
  Index: InteropBaseClient.c
  ===================================================================
  /* InteropBaseClient.cpp : Defines the entry point for the console application.*/
  
  
  #include "InteropTestPortType.h" 
  #include <stdio.h>
  #include <string.h>
  
  #define ARRAYSIZE 2
  
  int main(int argc, char* argv[])
  {
  	int x;
  	char buffer1[100];
  	char buffer2[100];
  	xsd__string_Array arrstr;
  	xsd__int_Array arrint;
  	xsd__float_Array arrfloat;
  	SOAPStruct_Array arrstct;
  	SOAPStruct stct;
  	time_t tim;
  	struct tm* lt;
  	void* pstub = get_InteropTestPortType_stub();
  	printf("invoking echoString...\n");
  	/*testing echoString */
  	if (0 == strcmp(echoString(pstub, "hello world"), "hello world"))
  		printf("successful\n");
  	else
  		printf("failed\n");
  
  	destroy_InteropTestPortType_stub(pstub);
  }
  
  
  
  1.1                  ws-axis/c/samples/client/ssl_client/InteropTestPortType.c
  
  Index: InteropTestPortType.c
  ===================================================================
  /*
   * This is the Client Stub implementation file genarated by WSDL2Ws tool.
   * InteropTestPortType.c: implemtation for the InteropTestPortType.
   *
   */
  
  #include "InteropTestPortType.h"
  
  extern int Axis_DeSerialize_SOAPStruct(SOAPStruct* param, IWrapperSoapDeSerializer *pDZ);
  extern void* Axis_Create_SOAPStruct(SOAPStruct *Obj, bool bArray, int nSize);
  extern void Axis_Delete_SOAPStruct(SOAPStruct* param, bool bArray, int nSize);
  extern int Axis_Serialize_SOAPStruct(SOAPStruct* param, IWrapperSoapSerializer* pSZ, bool bArray);
  extern int Axis_GetSize_SOAPStruct();
  
  void* get_InteropTestPortType_stub(){
  	return GetStubObject(APTHTTPS, "http://192.168.101.4/axis/InteropBase");
  }
  void destroy_InteropTestPortType_stub(void* p){
  	DestroyStubObject(p);
  }
  
  /*Methods corresponding to the web service methods*/
  
  /*
   * This method wrap the service methodechoString
   */
  xsd__string echoString(void* pStub, xsd__string Value0)
  {
  	Call* pCall = (Call*)pStub;
  	xsd__string Ret;
  	/* Following will establish the connections with the server too */
  	if (AXIS_SUCCESS != pCall->_functions->Initialize(pCall->_object, C_RPC_PROVIDER, 0)) return Ret;
  	pCall->_functions->SetTransportProperty(pCall->_object,SOAPACTION_HEADER , "InteropBase#echoString");
  	pCall->_functions->SetSOAPVersion(pCall->_object, SOAP_VER_1_1);
  	pCall->_functions->SetOperation(pCall->_object, "echoString", "http://soapinterop.org/");
  	pCall->_functions->AddParameter(pCall->_object, (void*)&Value0, "inputString", XSD_STRING);
  	if (AXIS_SUCCESS == pCall->_functions->Invoke(pCall->_object))
  	{
  		if(AXIS_SUCCESS == pCall->_functions->CheckMessage(pCall->_object, "echoStringResponse", ""))
  		{
  			Ret = pCall->_functions->GetElementAsString(pCall->_object, 0, 0);
  		}
  	}
  	pCall->_functions->UnInitialize(pCall->_object);
  	return Ret;
  }
  
  
  
  
  1.1                  ws-axis/c/samples/client/ssl_client/InteropTestPortType.h
  
  Index: InteropTestPortType.h
  ===================================================================
  /*
   * This is the Client Stub Class genarated by the tool WSDL2Ws
   * InteropTestPortType.h: interface for the InteropTestPortTypeclass.
   *
   */
  #if !defined(__INTEROPTESTPORTTYPE_H__INCLUDED_)
  #define __INTEROPTESTPORTTYPE_H__INCLUDED_
  
  #include <axis/client/Call.h>
  #include <axis/server/AxisWrapperAPI.h>
  #include "SOAPStruct_Array.h"
  #include "SOAPStruct.h"
  
  extern void* get_InteropTestPortType_stub();
  extern void destroy_InteropTestPortType_stub(void* p);
  extern xsd__string echoString(void* pStub, xsd__string Value0);
  extern xsd__string_Array echoStringArray(void* pStub, xsd__string_Array Value0);
  extern int echoInteger(void* pStub, int Value0);
  extern xsd__int_Array echoIntegerArray(void* pStub, xsd__int_Array Value0);
  extern float echoFloat(void* pStub, float Value0);
  extern xsd__float_Array echoFloatArray(void* pStub, xsd__float_Array Value0);
  extern SOAPStruct* echoStruct(void* pStub, SOAPStruct* Value0);
  extern SOAPStruct_Array echoStructArray(void* pStub, SOAPStruct_Array Value0);
  extern void echoVoid(void* pStub);
  extern xsd__base64Binary echoBase64(void* pStub, xsd__base64Binary Value0);
  extern xsd__dateTime echoDate(void* pStub, xsd__dateTime Value0);
  extern xsd__hexBinary echoHexBinary(void* pStub, xsd__hexBinary Value0);
  extern xsd__decimal echoDecimal(void* pStub, xsd__decimal Value0);
  extern xsd__boolean echoBoolean(void* pStub, xsd__boolean Value0);
  
  
  #endif // !defined(__INTEROPTESTPORTTYPE_H__INCLUDED_)
  
  
  
  1.1                  ws-axis/c/samples/client/ssl_client/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  bin_PROGRAMS = sslclient
  SUBDIRS =
  AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
  sslclient_SOURCES = InteropBaseClient.c InteropTestPortType.c  SOAPStruct.c
  
  sslclient_LDADD   =  -L$(AXISCPP_HOME)/bin -laxiscpp_client -L$(AXISCPP_HOME)/lib/expat -lexpat -lltdl -lssl -lstdc++
  INCLUDES = -I$(AXISCPP_HOME)/include