ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From susan...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal ClassLoader.java ClientStubWriter.java
Date Mon, 09 Feb 2004 14:57:07 GMT
susantha    2004/02/09 06:57:07

  Modified:    c/samples/client/interoptests/cbase InteropTestPortType.c
               c/samples/server/interoptests/base
                        InteropTestPortTypeWrapper.cpp
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c
                        BeanParamWriter.java ClassLoader.java
                        ClientStubWriter.java WrapHeaderWriter.java
                        WrapWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal
                        BeanParamWriter.java ClassLoader.java
                        ClientStubWriter.java WrapHeaderWriter.java
                        WrapWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp ClassLoader.java
                        ClientStubWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        ClassLoader.java ClientStubWriter.java
  Log:
  WSDL2WS tool changes to reflect changes in Axis codebase
  
  Revision  Changes    Path
  1.5       +14 -14    ws-axis/c/samples/client/interoptests/cbase/InteropTestPortType.c
  
  Index: InteropTestPortType.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/client/interoptests/cbase/InteropTestPortType.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InteropTestPortType.c	3 Feb 2004 14:17:11 -0000	1.4
  +++ InteropTestPortType.c	9 Feb 2004 14:57:06 -0000	1.5
  @@ -23,7 +23,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__string Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:80/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -53,7 +53,7 @@
   	CallFunctions* pCall;
   	xsd__string_Array RetArray = {NULL, 0};
   	Axis_Array array;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return RetArray;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -83,7 +83,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	int Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -113,7 +113,7 @@
   	CallFunctions* pCall;
   	xsd__int_Array RetArray = {NULL, 0};
   	Axis_Array array;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return RetArray;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -143,7 +143,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	float Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -173,7 +173,7 @@
   	CallFunctions* pCall;
   	xsd__float_Array RetArray = {NULL, 0};
   	Axis_Array array;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return RetArray;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -203,7 +203,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	SOAPStruct* pReturn = NULL;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return pReturn;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -233,7 +233,7 @@
   	CallFunctions* pCall;
   	SOAPStruct_Array RetArray = {NULL, 0};
   	Axis_Array array;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return RetArray;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -262,7 +262,7 @@
   {
   	int nStatus;
   	CallFunctions* pCall;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return 	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
   	if (AXIS_SUCCESS != pCall->Initialize(g_pInteropTestPortType, C_RPC_PROVIDER)) return ;
  @@ -288,7 +288,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__base64Binary Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -317,7 +317,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__dateTime Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -346,7 +346,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__hexBinary Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -375,7 +375,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__decimal Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  @@ -404,7 +404,7 @@
   	int nStatus;
   	CallFunctions* pCall;
   	xsd__boolean Ret;
  -	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost:5555/axis/InteropBase");
  +	if (!g_pInteropTestPortType) g_pInteropTestPortType = GetCallObject(APTHTTP, "http://localhost/axis/InteropBase");
   	if (!g_pInteropTestPortType || !g_pInteropTestPortType->__vfptr) return Ret;
   	pCall = g_pInteropTestPortType->__vfptr;
   	/* Following will establish the connections with the server too */
  
  
  
  1.4       +0 -26     ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeWrapper.cpp
  
  Index: InteropTestPortTypeWrapper.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/interoptests/base/InteropTestPortTypeWrapper.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InteropTestPortTypeWrapper.cpp	3 Feb 2004 13:04:46 -0000	1.3
  +++ InteropTestPortTypeWrapper.cpp	9 Feb 2004 14:57:06 -0000	1.4
  @@ -22,44 +22,18 @@
   	delete pWs;
   }
   
  -//implementation of WrapperClassHandler interface
  -static void InteropTestPortTypeWrapper_OnFault(InteropTestPortTypeWrapper* object, IMessageData *pMsg)
  -{
  -	object->OnFault(pMsg);
  -}
  -
   void InteropTestPortTypeWrapper::OnFault(void *pMsg)
   {
   }
   
  -static int InteropTestPortTypeWrapper_Init(InteropTestPortTypeWrapper* object)
  -{
  -	return object->Init();
  -}
  -
   int InteropTestPortTypeWrapper::Init()
   {
   	return AXIS_SUCCESS;
   }
   
  -static int InteropTestPortTypeWrapper_Fini(InteropTestPortTypeWrapper* object)
  -{
  -	return object->Fini();
  -}
  -
   int InteropTestPortTypeWrapper::Fini()
   {
   	return AXIS_SUCCESS;
  -}
  -
  -static int InteropTestPortTypeWrapper_Invoke(InteropTestPortTypeWrapper* object, IMessageData *mc)
  -{
  -	return object->Invoke(mc);
  -}
  -
  -static AXIS_BINDING_STYLE AXISCALL InteropTestPortTypeWrapper_GetBindingStyle(InteropTestPortTypeWrapper* object)
  -{
  -	return object->GetBindingStyle();
   }
   
   AXIS_BINDING_STYLE AXISCALL InteropTestPortTypeWrapper::GetBindingStyle()
  
  
  
  1.11      +16 -18    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BeanParamWriter.java	28 Jan 2004 10:19:13 -0000	1.10
  +++ BeanParamWriter.java	9 Feb 2004 14:57:06 -0000	1.11
  @@ -127,26 +127,25 @@
   			 System.out.println("possible error calss with no attributes....................");
   			 return;
   		}
  -		writer.write("\tIWrapperSoapSerializerFunctions* pSZX = pSZ->__vfptr;\n");
   		writer.write("\tconst AxisChar* sPrefix;\n");
   		writer.write("\tif (bArray)\n");
   		writer.write("\t{\n");
  -		writer.write("\t\tpSZX->SerializeStartElementOfType(pSZ, Axis_TypeName_"+classname+", 0, 0);\n");
  +		writer.write("\t\tpSZ->_functions->SerializeStartElementOfType(pSZ->_object, Axis_TypeName_"+classname+", 0, 0);\n");
   		writer.write("\t}\n");
   		writer.write("\telse\n");
   		writer.write("\t{\n");
  -		writer.write("\t\tsPrefix = pSZX->GetNamespacePrefix(pSZ, Axis_URI_"+classname+");\n");
  -		writer.write("\t\tpSZX->SerializeStartElementOfType(pSZ, Axis_TypeName_"+classname+", Axis_URI_"+classname+", sPrefix);\n");
  +		writer.write("\t\tsPrefix = pSZ->_functions->GetNamespacePrefix(pSZ->_object, Axis_URI_"+classname+");\n");
  +		writer.write("\t\tpSZ->_functions->SerializeStartElementOfType(pSZ->_object, Axis_TypeName_"+classname+", Axis_URI_"+classname+", sPrefix);\n");
   		writer.write("\t}\n\n");
   		String arrayType = null;
   		for(int i = 0; i< attribs.length;i++){
   			if(attribs[i].isArray()){
   				if(attribs[i].isSimpleType()){
  -					writer.write("\tpSZX->SerializeBasicArray(pSZ, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),"+CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+", \""+attribs[i].getParamName()+"\");\n"); 
  +					writer.write("\tpSZ->_functions->SerializeBasicArray(pSZ->_object, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),"+CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+", \""+attribs[i].getParamName()+"\");\n"); 
   				}
   				else{
   					arrayType = attribs[i].getTypeName();
  -					writer.write("\tpSZX->SerializeCmplxArray(pSZ, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),\n"); 
  +					writer.write("\tpSZ->_functions->SerializeCmplxArray(pSZ->_object, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),\n"); 
   					writer.write("\t\t(void*) Axis_Serialize_"+arrayType+", (void*) Axis_Delete_"+arrayType+", (void*) Axis_GetSize_"+arrayType+",\n"); 
   					writer.write("\t\tAxis_TypeName_"+arrayType+", Axis_URI_"+arrayType+", \""+attribs[i].getParamName()+"\");\n");
   				}
  @@ -155,21 +154,21 @@
   				if(attribs[i].isAttribute()){
   					if(attribs[i].isOptional()){
   						writer.write("\tif(0 != param->"+attribs[i].getParamName()+")\n");
  -						writer.write("\t\tpSZX->SerializeAsAttribute(pSZ, \""+attribs[i].getParamName()+"\", 0, (void*)(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +						writer.write("\t\tpSZ->_functions->SerializeAsAttribute(pSZ->_object, \""+attribs[i].getParamName()+"\", 0, (void*)(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   					}else{
  -						writer.write("\tpSZX->SerializeAsAttribute(pSZ, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +						writer.write("\tpSZ->_functions->SerializeAsAttribute(pSZ->_object, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   					}
   				}
   				else{
  -					writer.write("\tpSZX->SerializeAsElement(pSZ, \""+attribs[i].getParamName()+"\", (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +					writer.write("\tpSZ->_functions->SerializeAsElement(pSZ->_object, \""+attribs[i].getParamName()+"\", (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   				}
   			}
   			else{
   				//if complex type
  -				writer.write("\tAxis_Serialize_"+attribs[i].getTypeName()+"(param->"+attribs[i].getParamName()+", pSZ, false);\n");
  +				writer.write("\tAxis_Serialize_"+attribs[i].getTypeName()+"(param->"+attribs[i].getParamName()+", SZ._object, false);\n");
   			}			
   		}
  -		writer.write("\n\tpSZX->SerializeEndElementOfType(pSZ, Axis_TypeName_"+classname+");\n");
  +		writer.write("\n\tpSZ->_functions->SerializeEndElementOfType(pSZ->_object, Axis_TypeName_"+classname+");\n");
   		writer.write("\treturn AXIS_SUCCESS;\n");
   		writer.write("}\n\n");
   	
  @@ -185,7 +184,6 @@
   			 System.out.println("possible error calss with no attributes....................");
   			 return;
   		}
  -		writer.write("\tIWrapperSoapDeSerializerFunctions* pDZX = pDZ->__vfptr;\n");
   		boolean aretherearrayattribs = false;
   		for(int i = 0; i< attribs.length;i++){
   			if(attribs[i].isArray()){
  @@ -200,11 +198,11 @@
   			if(attribs[i].isArray()){
   				containedType = attribs[i].getTypeName();
   				if(attribs[i].isSimpleType()){
  -					writer.write("\tarray = pDZX->GetBasicArray(pDZ, "+CUtils.getXSDTypeForBasicType(containedType)+",0,0);\n");
  +					writer.write("\tarray = pDZ->_functions->GetBasicArray(pDZ->_object, "+CUtils.getXSDTypeForBasicType(containedType)+",0,0);\n");
   					writer.write("\tmemcpy(&(param->"+attribs[i].getParamName()+"), &array, sizeof(Axis_Array));\n");
   				}
   				else{
  -					writer.write("\tarray = pDZX->GetCmplxArray(pDZ, (void*)Axis_DeSerialize_"+containedType+ 
  +					writer.write("\tarray = pDZ->_functions->GetCmplxArray(pDZ->_object, (void*)Axis_DeSerialize_"+containedType+ 
   						"\n\t\t, (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+
   						"\n\t\t, (void*)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   					writer.write("\tmemcpy(&(param->"+attribs[i].getParamName()+"), &array, sizeof(Axis_Array));\n");
  @@ -215,21 +213,21 @@
   					if(attribs[i].isOptional()){
   						//TODO
   					}else{
  -						writer.write("\tparam->"+attribs[i].getParamName()+" = pDZX->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),true)+"(pDZ,0,0);\n");
  +						writer.write("\tparam->"+attribs[i].getParamName()+" = pDZ->_functions->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),true)+"(pDZ->_object,0,0);\n");
   					}
   				}
   				else{
  -					writer.write("\tparam->"+attribs[i].getParamName()+" = pDZX->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),false)+"(pDZ,0,0);\n");
  +					writer.write("\tparam->"+attribs[i].getParamName()+" = pDZ->_functions->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),false)+"(pDZ->_object,0,0);\n");
   				}
   			}
   			else{
   				//if complex type
  -				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)pDZX->GetCmplxObject(pDZ, (void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
  +				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)pDZ->_functions->GetCmplxObject(pDZ->_object, (void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
   					"\n\t\t, (void*)Axis_Create_"+attribs[i].getTypeName()+", (void*)Axis_Delete_"+attribs[i].getTypeName()+
   					"\n\t\t, Axis_TypeName_"+attribs[i].getTypeName()+", Axis_URI_"+attribs[i].getTypeName()+");\n");
   			}			
   		}
  -		writer.write("\treturn pDZX->GetStatus(pDZ);\n");
  +		writer.write("\treturn pDZ->_functions->GetStatus(pDZ->_object);\n");
   		writer.write("}\n");
   	}
   	
  
  
  
  1.5       +18 -25    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClassLoader.java
  
  Index: ClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClassLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClassLoader.java	19 Jan 2004 07:44:12 -0000	1.4
  +++ ClassLoader.java	9 Feb 2004 14:57:06 -0000	1.5
  @@ -94,33 +94,26 @@
   	  writer.write("#endif\n\n");
   	  writer.write("#include <malloc.h>\n");
   	  writer.write("#include \""+wrappername+".h\"\n\n");
  +	  writer.write("static BasicHandlerFunctions "+wrappername+"_functions = {\n");
  +	  writer.write("\t"+wrappername+"_Invoke,\n");
  +	  writer.write("\t"+wrappername+"_OnFault,\n");
  +	  writer.write("\t"+wrappername+"_Init,\n");
  +	  writer.write("\t"+wrappername+"_Fini,\n");
  +	  writer.write("\t"+wrappername+"_GetType,\n");
  +	  writer.write("\t"+wrappername+"_GetBindingStyle\n};\n");	  
   	  writer.write("STORAGE_CLASS_INFO\n");
  -	  writer.write("int GetClassInstance(BasicHandler **inst)\n");
  -	  writer.write("{\n");
  -	  writer.write("\tBasicHandler* pBH = malloc(sizeof(BasicHandler));\n");
  -	  writer.write("\tBasicHandlerX* pBHX = malloc(sizeof(BasicHandlerX));\n");
  -	  writer.write("\tif (pBHX)\n");
  -	  writer.write("\t{\n");
  -	  writer.write("\t\tpBHX->Invoke = Invoke;\n");
  -	  writer.write("\t\tpBHX->OnFault = OnFault;\n");
  -	  writer.write("\t\tpBHX->Init = Init;\n");
  -	  writer.write("\t\tpBHX->Fini = Fini;\n");
  -	  writer.write("\t\tpBHX->GetBindingStyle = GetBindingStyle;\n");
  -	  writer.write("\t\tpBH->__vfptr = pBHX;\n");
  -	  writer.write("\t\t*inst = pBH;\n");
  -	  writer.write("\t\treturn AXIS_SUCCESS;\n");
  -	  writer.write("\t}\n");
  -	  writer.write("\treturn AXIS_FAIL;\n");
  +	  writer.write("int GetClassInstance(BasicHandler **inst){\n");
  +	  writer.write("\t*inst = malloc(sizeof(BasicHandler));\n");
  +	  writer.write("\t(*inst)->_object = 0;	/* instantiate and provide the context object if needed */\n");
  +	  writer.write("\t(*inst)->_functions = &"+wrappername+"_functions;\n");
  +	  writer.write("\treturn (*inst)->_functions->Init((*inst)->_object);\n");
   	  writer.write("}\n\n");
  -	  writer.write("STORAGE_CLASS_INFO \n");
  -	  writer.write("int DestroyInstance(BasicHandler *inst)\n");
  -	  writer.write("{\n");
  -	  writer.write("\tBasicHandler* pBH;\n");
  -	  writer.write("\tif (inst)\n"); 
  -	  writer.write("\t{\n");
  -	  writer.write("\t\tpBH = inst;\n");
  -	  writer.write("\t\tfree(pBH->__vfptr);\n");
  -	  writer.write("\t\tfree(pBH);\n");
  +	  writer.write("STORAGE_CLASS_INFO\n");
  +	  writer.write("int DestroyInstance(BasicHandler *inst){\n");
  +	  writer.write("\tif (inst){\n");
  +	  writer.write("\t\tinst->_functions->Fini(inst->_object);\n");
  +	  writer.write("\t\t/* destroy the context object set to inst->_object if any here */\n");
  +	  writer.write("\t\tfree(inst);\n");
   	  writer.write("\t\treturn AXIS_SUCCESS;\n");
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
  
  
  
  1.10      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClientStubWriter.java	3 Feb 2004 13:04:48 -0000	1.9
  +++ ClientStubWriter.java	9 Feb 2004 14:57:06 -0000	1.10
  @@ -227,7 +227,7 @@
   		}
   		writer.write("\tpCall = "+globalobjectname+"->__vfptr;\n");
   		writer.write("\t/* Following will establish the connections with the server too */\n");
  -		writer.write("\tif (AXIS_SUCCESS != pCall->Initialize("+globalobjectname+", RPC_ENCODED)) return ");
  +		writer.write("\tif (AXIS_SUCCESS != pCall->Initialize("+globalobjectname+", C_RPC_PROVIDER)) return ");
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n");
   		}
  
  
  
  1.6       +7 -6      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapHeaderWriter.java
  
  Index: WrapHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapHeaderWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WrapHeaderWriter.java	15 Jan 2004 13:45:23 -0000	1.5
  +++ WrapHeaderWriter.java	9 Feb 2004 14:57:07 -0000	1.6
  @@ -105,16 +105,17 @@
   	protected void writeMethods() throws WrapperFault {
   		try{
   			writer.write("/*implementation of BasicHandler interface*/\n");
  -			writer.write("int AXISCALL Invoke(void*p, IMessageData* mc);\n");
  -			writer.write("void AXISCALL OnFault(void*p, IMessageData* mc);\n");
  -			writer.write("int AXISCALL Init(void*p);\n");
  -			writer.write("int AXISCALL Fini(void*p);\n");
  -			writer.write("AXIS_BINDING_STYLE AXISCALL GetBindingStyle(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_Invoke(void*p, void* pMsg);\n");
  +			writer.write("void AXISCALL "+classname+"_OnFault(void*p, void* pMsg);\n");
  +			writer.write("int AXISCALL "+classname+"_Init(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_Fini(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_GetType(void*p);\n");
  +			writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p);\n");
   			writer.write("/*Methods corresponding to the web service methods*/\n");
   			MethodInfo minfo;
   			for (int i = 0; i < methods.size(); i++) {
   					 minfo = (MethodInfo)methods.get(i);
  -					 writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IMessageData* mc);");
  +					 writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ);");
   					 writer.write("\n");
   			}
   		}catch(IOException e){
  
  
  
  1.19      +25 -34    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java
  
  Index: WrapWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- WrapWriter.java	3 Feb 2004 13:04:48 -0000	1.18
  +++ WrapWriter.java	9 Feb 2004 14:57:07 -0000	1.19
  @@ -111,10 +111,10 @@
   	protected void writeMethods() throws WrapperFault {
   		try{
   			writer.write("/*implementation of BasicHandler interface*/\n");			
  -			writer.write("void AXISCALL OnFault(void*p, IMessageData *pMsg)\n{\n}\n\n");
  -			writer.write("int AXISCALL Init(void*p)\n{\n\treturn AXIS_SUCCESS;\n}\n\n");
  -			writer.write("int AXISCALL Fini(void*p)\n{\n\treturn AXIS_SUCCESS;\n}\n\n");
  -			writer.write("AXIS_BINDING_STYLE AXISCALL GetBindingStyle(void*p)\n{\n\treturn RPC_ENCODED;\n}\n\n");
  +			writer.write("void AXISCALL "+classname+"_OnFault(void*p, void *pMsg){\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_Init(void*p){\n\treturn AXIS_SUCCESS;\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_Fini(void*p){\n\treturn AXIS_SUCCESS;\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_GetType(void*p){\n\treturn WEBSERVICE_HANDLER;\n}\n\n");
			writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p){\n\treturn RPC_ENCODED;\n}\n\n");
   			writeInvoke();
   			writer.write("\n/*Methods corresponding to the web service methods*/\n");
   			MethodInfo minfo;
  @@ -161,10 +161,14 @@
   		writer.write("\n/*\n");
   		writer.write(" * This method invokes the right service method \n");
   		writer.write(" */\n");
  -		writer.write("int AXISCALL Invoke(void*p, IMessageData *mc)\n{\n");
  +		writer.write("int AXISCALL "+classname+"_Invoke(void*p, void *pMsg){\n");
  +		writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
   		writer.write("\tconst AxisChar* method = 0;\n");
  -		writer.write("\tIMessageDataFunctions* pmcX = mc->__vfptr;\n");
  -		writer.write("\tmethod = pmcX->GetOperationName(mc);\n");
  +		writer.write("\tIWrapperSoapDeSerializer DZ = {0,0};\n");
  +		writer.write("\tIWrapperSoapSerializer SZ = {0,0};\n");
  +		writer.write("\tmethod = mc->_functions->GetOperationName(mc->_object);\n");
  +		writer.write("\tmc->_functions->GetSoapSerializer(mc->_object, &SZ);\n");
  +		writer.write("\tmc->_functions->GetSoapDeSerializer(mc->_object, &DZ);\n");		
   		//if no methods in the service simply return
   		if (methods.size() == 0) {
   			writer.write("}\n");
  @@ -173,13 +177,13 @@
   		MethodInfo minfo = (MethodInfo)methods.get(0);
   		//if conditions (if parts)		
   		writer.write("\tif (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
  -		writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(mc);\n");
  +		writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
   		//(else if parts)
   		if (methods.size() > 1) {
   			for (int i = 1; i < methods.size(); i++) {
   				minfo = (MethodInfo)methods.get(i);
   				writer.write("\telse if (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
  -				writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(mc);\n");
  +				writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
   			}
   		}
   		//(else part)
  @@ -254,13 +258,8 @@
   		writer.write(" * This method wrap the service method \n");
   		writer.write(" */\n");
   		//method signature
  -		writer.write("int "+ methodName + CUtils.WRAPPER_METHOD_APPENDER+ "(IMessageData* mc)\n{\n");
  +		writer.write("int "+ methodName + CUtils.WRAPPER_METHOD_APPENDER+ "(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ)\n{\n");
   		writer.write("\tint nStatus;\n");
  -		writer.write("\tIMessageDataFunctions* pmcX = mc->__vfptr;\n");
  -		writer.write("\tIWrapperSoapDeSerializer* pDZ = 0;\n");
  -		writer.write("\tIWrapperSoapDeSerializerFunctions* pDZX = 0;\n");
  -		writer.write("\tIWrapperSoapSerializer* pSZ = 0;\n");
  -		writer.write("\tIWrapperSoapSerializerFunctions* pSZX = 0;\n");
   		for (int i = 0; i < paramsB.size(); i++) {
   			paramTypeName = WrapperUtils.getClassNameFromParamInfoConsideringArrays((ParameterInfo)paramsB.get(i), wscontext);
   				writer.write("\t"+paramTypeName+" v"+i+";\n");
  @@ -271,45 +270,37 @@
   		if (aretherearrayparams){
   			writer.write("\tAxis_Array array;\n");
   		}
  -		writer.write("\tpmcX->GetSoapSerializer(mc, &pSZ);\n");
  -		writer.write("\tif (!pSZ) return AXIS_FAIL;\n");
  -		writer.write("\tpSZX = pSZ->__vfptr;\n");
  -		writer.write("\tif (!pSZX) return AXIS_FAIL;\n");
  -		writer.write("\tpmcX->GetSoapDeSerializer(mc, &pDZ);\n");
  -		writer.write("\tif (!pDZ) return AXIS_FAIL;\n");
  -		writer.write("\tpDZX = pDZ->__vfptr;\n");
  -		writer.write("\tif (!pDZX) return AXIS_FAIL;\n");
  -		writer.write("\tif (AXIS_SUCCESS != pDZX->CheckMessageBody(pDZ, \""+methodName+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\")) return AXIS_FAIL;\n");
  -		writer.write("\tpSZX->CreateSoapMethod(pSZ, \""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n\n");
  +		writer.write("\tif (AXIS_SUCCESS != DZ._functions->CheckMessageBody(DZ._object, \""+methodName+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\")) return AXIS_FAIL;\n");
  +		writer.write("\tSZ._functions->CreateSoapMethod(SZ._object, \""+methodName+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
   		//create and populate variables for each parameter
   		for (int i = 0; i < paramsB.size(); i++) {
   			paramTypeName = ((ParameterInfo)paramsB.get(i)).getLangName();
   			if((CUtils.isSimpleType(((ParameterInfo)paramsB.get(i)).getLangName()))){
   				//for simple types	
  -				writer.write("\tv"+i+" = pDZX->"+CUtils.getParameterGetValueMethodName(paramTypeName, false)+"(pDZ, 0, 0);\n");
  +				writer.write("\tv"+i+" = DZ._functions->"+CUtils.getParameterGetValueMethodName(paramTypeName, false)+"(DZ._object, 0, 0);\n");
   			}else if((type = this.wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName())) != null && type.isArray()){
   				QName qname = WrapperUtils.getArrayType(type).getName();
   				String containedType = null;
   				if (CUtils.isSimpleType(qname)){
   					containedType = CUtils.getclass4qname(qname);
  -					writer.write("\tarray = pDZX->GetBasicArray(pDZ, "+CUtils.getXSDTypeForBasicType(containedType)+", 0, 0);\n");
  +					writer.write("\tarray = DZ._functions->GetBasicArray(DZ._object, "+CUtils.getXSDTypeForBasicType(containedType)+", 0, 0);\n");
   					writer.write("\tmemcpy(&v"+i+", &array, sizeof(Axis_Array));\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\tarray = pDZX->GetCmplxArray(pDZ, (void*)Axis_DeSerialize_"+containedType+ 
  +					writer.write("\tarray = DZ._functions->GetCmplxArray(DZ._object, (void*)Axis_DeSerialize_"+containedType+ 
   						"\n\t\t, (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+
   						"\n\t\t, (void*)Axis_GetSize_"+containedType+", Axis_TypeName_"+containedType+", Axis_URI_"+containedType+");\n");
   					writer.write("\tmemcpy(&v"+i+", &array, sizeof(Axis_Array));\n");
   				}
   			}else{
   				//for complex types 
  -				writer.write("\tv"+i+" = ("+paramTypeName+"*)pDZX->GetCmplxObject(pDZ, (void*)Axis_DeSerialize_"+paramTypeName+
  +				writer.write("\tv"+i+" = ("+paramTypeName+"*)DZ._functions->GetCmplxObject(DZ._object, (void*)Axis_DeSerialize_"+paramTypeName+
   					"\n\t\t, (void*)Axis_Create_"+paramTypeName+", (void*)Axis_Delete_"+paramTypeName+
   					"\n\t\t, Axis_TypeName_"+paramTypeName+", Axis_URI_"+paramTypeName+");\n");
   			}
   		}
  -		writer.write("\tif (AXIS_SUCCESS != (nStatus = pDZX->GetStatus(pDZ))) return nStatus;\n");		
  +		writer.write("\tif (AXIS_SUCCESS != (nStatus = DZ._functions->GetStatus(DZ._object))) return nStatus;\n");		
   		if(returntype != null){
   			/* Invoke the service when return type not void */
   			writer.write("\tret = "+methodName+"(");
  @@ -322,24 +313,24 @@
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
  -				writer.write("\treturn pSZX->AddOutputParam(pSZ, \""+methodName+"Return\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamTypeName)+");\n");
  +				writer.write("\treturn SZ._functions->AddOutputParam(SZ._object, \""+methodName+"Return\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamTypeName)+");\n");
   			}else if(returntypeisarray){
   				QName qname = WrapperUtils.getArrayType(retType).getName();
   				String containedType = null;
   				if (CUtils.isSimpleType(qname)){
   					containedType = CUtils.getclass4qname(qname);
  -					writer.write("\treturn pSZX->AddOutputBasicArrayParam(pSZ, (Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+methodName+"Return\");\n");
  +					writer.write("\treturn SZ._functions->AddOutputBasicArrayParam(SZ._object, (Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+methodName+"Return\");\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\treturn pSZX->AddOutputCmplxArrayParam(pSZ, (Axis_Array*)(&ret),"+ 
  +					writer.write("\treturn SZ._functions->AddOutputCmplxArrayParam(SZ._object, (Axis_Array*)(&ret),"+ 
   					"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+methodName+"Return\", Axis_URI_"+containedType+");\n");
   				}
   			}
   			else{
   				//complex type
   				outparamTypeName = returntype.getLangName();//need to have complex type name without *
  -				writer.write("\treturn pSZX->AddOutputCmplxParam(pSZ, ret, (void*)Axis_Serialize_"+outparamTypeName+", (void*)Axis_Delete_"+outparamTypeName+", \""+methodName+"Return\", 0);\n");
  +				writer.write("\treturn SZ._functions->AddOutputCmplxParam(SZ._object, ret, (void*)Axis_Serialize_"+outparamTypeName+", (void*)Axis_Delete_"+outparamTypeName+", \""+methodName+"Return\", 0);\n");
   			}
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  
  
  
  1.9       +15 -17    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/BeanParamWriter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BeanParamWriter.java	28 Jan 2004 10:19:28 -0000	1.8
  +++ BeanParamWriter.java	9 Feb 2004 14:57:07 -0000	1.9
  @@ -126,7 +126,6 @@
   			 System.out.println("possible error class with no attributes....................");
   			 return;
   		 }
  -		writer.write("\tIWrapperSoapSerializerFunctions* pSZX = pSZ->__vfptr;\n");
   		String arrayType = null;
   		writer.write("\t/* first serialize attributes if any*/\n");
   		for(int i = 0; i< attributeParamCount;i++){
  @@ -136,35 +135,35 @@
   			else{
   				if (attribs[i].isOptional()){
   					writer.write("\tif (0 != param->"+attribs[i].getParamName()+")\n");
  -					writer.write("\tpSZX->SerializeAsAttribute(pSZ, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +					writer.write("\tpSZ->_functions->SerializeAsAttribute(SZ._object, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   				}
   				else{
  -					writer.write("\tpSZX->SerializeAsAttribute(pSZ, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +					writer.write("\tpSZ->_functions->SerializeAsAttribute(SZ._object, \""+attribs[i].getParamName()+"\", 0, (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   				}
   			}
   		}
  -		writer.write("\tpSZX->Serialize(pSZ, \">\");\n");
  +		writer.write("\tpSZ->_functions->Serialize(SZ._object, \">\");\n");
   		writer.write("\t/* then serialize elements if any*/\n");
   		for(int i = attributeParamCount; i< attribs.length;i++){
   			if(attribs[i].isArray()){
   				//if Array
   				arrayType = attribs[i].getTypeName();
   				if (attribs[i].isSimpleType()){
  -					writer.write("\tpSZX->SerializeBasicArray(pSZ, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),"+CUtils.getXSDTypeForBasicType(arrayType)+", \""+attribs[i].getParamName()+"\");\n"); 
  +					writer.write("\tpSZ->_functions->SerializeBasicArray(SZ._object, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),"+CUtils.getXSDTypeForBasicType(arrayType)+", \""+attribs[i].getParamName()+"\");\n"); 
   				}
   				else{
  -					writer.write("\tpSZX->SerializeCmplxArray(pSZ, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),\n"); 
  +					writer.write("\tpSZ->_functions->SerializeCmplxArray(SZ._object, (Axis_Array*)(&param->"+attribs[i].getParamName()+"),\n"); 
   					writer.write("\t\t(void*) Axis_Serialize_"+arrayType+", (void*) Axis_Delete_"+arrayType+", (void*) Axis_GetSize_"+arrayType+",\n"); 
   					writer.write("\t\t\""+attribs[i].getParamName()+"\", Axis_URI_"+arrayType+");\n");
   				}
   			}
   			else if (attribs[i].isSimpleType()){
  -				writer.write("\tpSZX->SerializeAsElement(pSZ, \""+attribs[i].getParamName()+"\", (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +				writer.write("\tpSZ->_functions->SerializeAsElement(SZ._object, \""+attribs[i].getParamName()+"\", (void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
   			}else{
   				//if complex type
  -				writer.write("\tpSZX->Serialize(pSZ, \"<"+attribs[i].getParamName()+"\");\n");
  -				writer.write("\tAxis_Serialize_"+attribs[i].getTypeName()+"(param->"+attribs[i].getParamName()+", pSZ, false);\n");
  -				writer.write("\tpSZX->Serialize(pSZ, \"</"+attribs[i].getParamName()+">\");\n");
  +				writer.write("\tpSZ->_functions->Serialize(SZ._object, \"<"+attribs[i].getParamName()+"\");\n");
  +				writer.write("\tAxis_Serialize_"+attribs[i].getTypeName()+"(param->"+attribs[i].getParamName()+", SZ._object, false);\n");
  +				writer.write("\tpSZ->_functions->Serialize(SZ._object, \"</"+attribs[i].getParamName()+">\");\n");
   			}			
   		}
   		writer.write("\treturn AXIS_SUCCESS;\n");
  @@ -182,7 +181,6 @@
   			 System.out.println("possible error calss with no attributes....................");
   			 return;
   		}
  -		writer.write("\tIWrapperSoapDeSerializerFunctions* pDZX = pDZ->__vfptr;\n");
   		boolean aretherearrayparams = false;
   		for(int i = 0; i< attribs.length;i++){
   			if(attribs[i].isArray()){
  @@ -199,11 +197,11 @@
   				//if Array
   				String containedType = attribs[i].getTypeName();
   				if (attribs[i].isSimpleType()){
  -					writer.write("\tarray = pDZX->GetBasicArray(pDZ, "+CUtils.getXSDTypeForBasicType(containedType)+ ", \""+attribs[i].getParamName()+"\",0);\n");
  +					writer.write("\tarray = DZ._functions->GetBasicArray(DZ._object, "+CUtils.getXSDTypeForBasicType(containedType)+ ", \""+attribs[i].getParamName()+"\",0);\n");
   					writer.write("\tmemcpy(&(param->"+attribs[i].getParamName()+"), &array, sizeof(Axis_Array));\n");
   				}
   				else{
  -					writer.write("\tarray = pDZX->GetCmplxArray(pDZ, (void*)Axis_DeSerialize_"+containedType+ 
  +					writer.write("\tarray = DZ._functions->GetCmplxArray(DZ._object, (void*)Axis_DeSerialize_"+containedType+ 
   						"\n\t\t, (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+
   						"\n\t\t, (void*)Axis_GetSize_"+containedType+", \""+attribs[i].getParamName()+"\", Axis_URI_"+containedType+");\n");
   					writer.write("\tmemcpy(&(param->"+attribs[i].getParamName()+"), &array, sizeof(Axis_Array));\n");
  @@ -214,20 +212,20 @@
   					if (attribs[i].isOptional()){
   						//TODO
   					}else{
  -						writer.write("\tparam->"+attribs[i].getParamName()+" = pDZX->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(), true)+"(pDZ, \""+attribs[i].getParamName()+"\", 0);\n");
  +						writer.write("\tparam->"+attribs[i].getParamName()+" = DZ._functions->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(), true)+"(DZ._object, \""+attribs[i].getParamName()+"\", 0);\n");
   					}
   				}
   				else{
  -					writer.write("\tparam->"+attribs[i].getParamName()+" = pDZX->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(), false)+"(pDZ, \""+attribs[i].getParamName()+"\", 0);\n");
  +					writer.write("\tparam->"+attribs[i].getParamName()+" = DZ._functions->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(), false)+"(DZ._object, \""+attribs[i].getParamName()+"\", 0);\n");
   				}
   			}else{
   				//if complex type
  -				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)pDZX->GetCmplxObject(pDZ, (void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
  +				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)DZ._functions->GetCmplxObject(DZ._object, (void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
   					"\n\t\t, (void*)Axis_Create_"+attribs[i].getTypeName()+", (void*)Axis_Delete_"+attribs[i].getTypeName()+
   					"\n\t\t, \""+attribs[i].getParamName()+"\", Axis_URI_"+attribs[i].getTypeName()+");\n");
   			}		
   		}
  -		writer.write("\treturn pDZX->GetStatus(pDZ);\n");
  +		writer.write("\treturn DZ._functions->GetStatus(DZ._object);\n");
   		writer.write("}\n");
   	}
   	
  
  
  
  1.5       +18 -25    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClassLoader.java
  
  Index: ClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClassLoader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ClassLoader.java	19 Jan 2004 07:44:12 -0000	1.4
  +++ ClassLoader.java	9 Feb 2004 14:57:07 -0000	1.5
  @@ -94,33 +94,26 @@
   	  writer.write("#endif\n\n");
   	  writer.write("#include <malloc.h>\n");
   	  writer.write("#include \""+wrappername+".h\"\n\n");
  +	  writer.write("static BasicHandlerFunctions "+wrappername+"_functions = {\n");
  +	  writer.write("\t"+wrappername+"_Invoke,\n");
  +	  writer.write("\t"+wrappername+"_OnFault,\n");
  +	  writer.write("\t"+wrappername+"_Init,\n");
  +	  writer.write("\t"+wrappername+"_Fini,\n");
  +	  writer.write("\t"+wrappername+"_GetType,\n");
  +	  writer.write("\t"+wrappername+"_GetBindingStyle\n};\n");	  
   	  writer.write("STORAGE_CLASS_INFO\n");
  -	  writer.write("int GetClassInstance(BasicHandler **inst)\n");
  -	  writer.write("{\n");
  -	  writer.write("\tBasicHandler* pBH = malloc(sizeof(BasicHandler));\n");
  -	  writer.write("\tBasicHandlerX* pBHX = malloc(sizeof(BasicHandlerX));\n");
  -	  writer.write("\tif (pBHX)\n");
  -	  writer.write("\t{\n");
  -	  writer.write("\t\tpBHX->Invoke = Invoke;\n");
  -	  writer.write("\t\tpBHX->OnFault = OnFault;\n");
  -	  writer.write("\t\tpBHX->Init = Init;\n");
  -	  writer.write("\t\tpBHX->Fini = Fini;\n");
  -	  writer.write("\t\tpBHX->GetBindingStyle = GetBindingStyle;\n");
  -	  writer.write("\t\tpBH->__vfptr = pBHX;\n");
  -	  writer.write("\t\t*inst = pBH;\n");
  -	  writer.write("\t\treturn AXIS_SUCCESS;\n");
  -	  writer.write("\t}\n");
  -	  writer.write("\treturn AXIS_FAIL;\n");
  +	  writer.write("int GetClassInstance(BasicHandler **inst){\n");
  +	  writer.write("\t*inst = malloc(sizeof(BasicHandler));\n");
  +	  writer.write("\t(*inst)->_object = 0;	/* instantiate and provide the context object if needed */\n");
  +	  writer.write("\t(*inst)->_functions = &"+wrappername+"_functions;\n");
  +	  writer.write("\treturn (*inst)->_functions->Init((*inst)->_object);\n");
   	  writer.write("}\n\n");
  -	  writer.write("STORAGE_CLASS_INFO \n");
  -	  writer.write("int DestroyInstance(BasicHandler *inst)\n");
  -	  writer.write("{\n");
  -	  writer.write("\tBasicHandler* pBH;\n");
  -	  writer.write("\tif (inst)\n"); 
  -	  writer.write("\t{\n");
  -	  writer.write("\t\tpBH = inst;\n");
  -	  writer.write("\t\tfree(pBH->__vfptr);\n");
  -	  writer.write("\t\tfree(pBH);\n");
  +	  writer.write("STORAGE_CLASS_INFO\n");
  +	  writer.write("int DestroyInstance(BasicHandler *inst){\n");
  +	  writer.write("\tif (inst){\n");
  +	  writer.write("\t\tinst->_functions->Fini(inst->_object);\n");
  +	  writer.write("\t\t/* destroy the context object set to inst->_object if any here */\n");
  +	  writer.write("\t\tfree(inst);\n");
   	  writer.write("\t\treturn AXIS_SUCCESS;\n");
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
  
  
  
  1.8       +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ClientStubWriter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ClientStubWriter.java	28 Jan 2004 10:19:28 -0000	1.7
  +++ ClientStubWriter.java	9 Feb 2004 14:57:07 -0000	1.8
  @@ -253,7 +253,7 @@
   		}
   		writer.write("\tpCall = "+globalobjectname+"->__vfptr;\n");
   		writer.write("\t/* Following will establish the connections with the server too */\n");
  -		writer.write("\tif (AXIS_SUCCESS != pCall->Initialize("+globalobjectname+", DOC_LITERAL)) return ");
  +		writer.write("\tif (AXIS_SUCCESS != pCall->Initialize("+globalobjectname+", C_DOC_PROVIDER)) return ");
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n");
   		}
  
  
  
  1.4       +7 -6      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapHeaderWriter.java
  
  Index: WrapHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapHeaderWriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WrapHeaderWriter.java	15 Jan 2004 13:45:23 -0000	1.3
  +++ WrapHeaderWriter.java	9 Feb 2004 14:57:07 -0000	1.4
  @@ -105,16 +105,17 @@
   	protected void writeMethods() throws WrapperFault {
   		try{
   			writer.write("/*implementation of BasicHandler interface*/\n");
  -			writer.write("int AXISCALL Invoke(void*p, IMessageData* mc);\n");
  -			writer.write("void AXISCALL OnFault(void*p, IMessageData* mc);\n");
  -			writer.write("int AXISCALL Init(void*p);\n");
  -			writer.write("int AXISCALL Fini(void*p);\n");
  -			writer.write("AXIS_BINDING_STYLE AXISCALL GetBindingStyle(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_Invoke(void*p, void* pMsg);\n");
  +			writer.write("void AXISCALL "+classname+"_OnFault(void*p, void* pMsg);\n");
  +			writer.write("int AXISCALL "+classname+"_Init(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_Fini(void*p);\n");
  +			writer.write("int AXISCALL "+classname+"_GetType(void*p);\n");
  +			writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p);\n");
   			writer.write("/*Methods corresponding to the web service methods*/\n");
   			MethodInfo minfo;
   			for (int i = 0; i < methods.size(); i++) {
   					 minfo = (MethodInfo)methods.get(i);
  -					 writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IMessageData* mc);");
  +					 writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ);");
   					 writer.write("\n");
   			}
   		}catch(IOException e){
  
  
  
  1.8       +28 -36    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java
  
  Index: WrapWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- WrapWriter.java	21 Jan 2004 07:43:15 -0000	1.7
  +++ WrapWriter.java	9 Feb 2004 14:57:07 -0000	1.8
  @@ -110,11 +110,12 @@
   	 */
   	protected void writeMethods() throws WrapperFault {
   		try{
  -			writer.write("/*implementation of BasicHandler interface*/\n");			
  -			writer.write("void AXISCALL OnFault(void*p, IMessageData *pMsg)\n{\n}\n\n");
  -			writer.write("int AXISCALL Init(void*p)\n{\n\treturn AXIS_SUCCESS;\n}\n\n");
  -			writer.write("int AXISCALL Fini(void*p)\n{\n\treturn AXIS_SUCCESS;\n}\n\n");
  -			writer.write("AXIS_BINDING_STYLE AXISCALL GetBindingStyle(void*p)\n{\n\treturn DOC_LITERAL;\n}\n\n");
  +			writer.write("/*implementation of BasicHandler interface*/\n");		
  +			writer.write("void AXISCALL "+classname+"_OnFault(void*p, void *pMsg){\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_Init(void*p){\n\treturn AXIS_SUCCESS;\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_Fini(void*p){\n\treturn AXIS_SUCCESS;\n}\n\n");
  +			writer.write("int AXISCALL "+classname+"_GetType(void*p){\n\treturn WEBSERVICE_HANDLER;\n}\n\n");
  +			writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p){\n\treturn DOC_LITERAL;\n}\n\n");
   			writeInvoke();
   			writer.write("\n/*Methods corresponding to the web service methods*/\n");
   			MethodInfo minfo;
  @@ -158,10 +159,14 @@
   		writer.write("\n/*\n");
   		writer.write(" * This method invokes the right service method \n");
   		writer.write(" */\n");
  -		writer.write("int AXISCALL Invoke(void*p, IMessageData *mc)\n{\n");
  -		writer.write("\tconst AxisChar* method = NULL;\n");
  -		writer.write("\tIMessageDataFunctions* pmcX = mc->__vfptr;\n");
  -		writer.write("\tmethod = pmcX->GetOperationName(mc);\n");
  +		writer.write("int AXISCALL "+classname+"_Invoke(void*p, void *pMsg){\n");
  +		writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
  +		writer.write("\tconst AxisChar* method = 0;\n");
  +		writer.write("\tIWrapperSoapDeSerializer DZ = {0,0};\n");
  +		writer.write("\tIWrapperSoapSerializer SZ = {0,0};\n");
  +		writer.write("\tmethod = mc->_functions->GetOperationName(mc->_object);\n");
  +		writer.write("\tmc->_functions->GetSoapSerializer(mc->_object, &SZ);\n");
  +		writer.write("\tmc->_functions->GetSoapDeSerializer(mc->_object, &DZ);\n");		
   		//if no methods in the service simply return
   		if (methods.size() == 0) {
   			writer.write("}\n");
  @@ -170,13 +175,13 @@
   		MethodInfo minfo = (MethodInfo)methods.get(0);
   		//if conditions (if parts)		
   		writer.write("\tif (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
  -		writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(mc);\n");
  +		writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
   		//(else if parts)
   		if (methods.size() > 1) {
   			for (int i = 1; i < methods.size(); i++) {
   				minfo = (MethodInfo)methods.get(i);
   				writer.write("\telse if (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
  -				writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(mc);\n");
  +				writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
   			}
   		}
   		//(else part)
  @@ -255,13 +260,8 @@
   		writer.write(" * This method wrap the service method \n");
   		writer.write(" */\n");
   		//method signature
  -		writer.write("int "+ methodName + CUtils.WRAPPER_METHOD_APPENDER+ "(IMessageData* mc)\n{\n");
  +		writer.write("int "+ methodName + CUtils.WRAPPER_METHOD_APPENDER+ "(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ)\n{\n");
   		writer.write("\tint nStatus;\n");
  -		writer.write("\tIMessageDataFunctions* pmcX = mc->__vfptr;\n");
  -		writer.write("\tIWrapperSoapDeSerializer* pDZ = NULL;\n");
  -		writer.write("\tIWrapperSoapDeSerializerFunctions* pDZX = NULL;\n");
  -		writer.write("\tIWrapperSoapSerializer* pSZ = NULL;\n");
  -		writer.write("\tIWrapperSoapSerializerFunctions* pSZX = NULL;\n");
   		boolean aretherearrayparams = false;
   		String parameterName;
   		for (int i = 0; i < paramsB.size(); i++) {
  @@ -284,46 +284,38 @@
   		if (aretherearrayparams){
   			writer.write("\tAxis_Array array;\n");
   		}
  -		writer.write("\tpmcX->GetSoapSerializer(mc, &pSZ);\n");
  -		writer.write("\tif (!pSZ) return AXIS_FAIL;\n");
  -		writer.write("\tpSZX = pSZ->__vfptr;\n");
  -		writer.write("\tif (!pSZX) return AXIS_FAIL;\n");
  -		writer.write("\tpmcX->GetSoapDeSerializer(mc, &pDZ);\n");
  -		writer.write("\tif (!pDZ) return AXIS_FAIL;\n");
  -		writer.write("\tpDZX = pDZ->__vfptr;\n");
  -		writer.write("\tif (!pDZX) return AXIS_FAIL;\n");
  -		writer.write("\tif (AXIS_SUCCESS != pDZX->CheckMessageBody(pDZ, \""+minfo.getInputMessage().getLocalPart()+"\", \""+minfo.getInputMessage().getNamespaceURI()+"\")) return AXIS_FAIL;\n");
  -		writer.write("\tpSZX->CreateSoapMethod(pSZ, \""+minfo.getOutputMessage().getLocalPart()+"\", \""+minfo.getOutputMessage().getNamespaceURI()+"\");\n");
  +		writer.write("\tif (AXIS_SUCCESS != DZ._functions->CheckMessageBody(DZ._object, \""+minfo.getInputMessage().getLocalPart()+"\", \""+minfo.getInputMessage().getNamespaceURI()+"\")) return AXIS_FAIL;\n");
  +		writer.write("\tpSZ->_functions->CreateSoapMethod(SZ._object, \""+minfo.getOutputMessage().getLocalPart()+"\", \""+minfo.getOutputMessage().getNamespaceURI()+"\");\n");
   		//create and populate variables for each parameter
   		for (int i = 0; i < paramsB.size(); i++) {
   			paraTypeName = ((ParameterInfo)paramsB.get(i)).getLangName();
   			parameterName = ((ParameterInfo)paramsB.get(i)).getParamName();
   			if((CUtils.isSimpleType(((ParameterInfo)paramsB.get(i)).getLangName()))){
   				//for simple types	
  -				writer.write("\tv"+i+" = pDZX->"+CUtils.getParameterGetValueMethodName(paraTypeName, false)+"(pDZ,\""+parameterName+"\", 0);\n");
  +				writer.write("\tv"+i+" = DZ._functions->"+CUtils.getParameterGetValueMethodName(paraTypeName, false)+"(DZ._object,\""+parameterName+"\", 0);\n");
   			}else if((type = this.wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName())) != null && type.isArray()){
   				QName qname = WrapperUtils.getArrayType(type).getName();
   				String containedType = null;
   				if (CUtils.isSimpleType(qname)){
   					containedType = CUtils.getclass4qname(qname);
  -					writer.write("\tarray = pDZX->GetBasicArray(pDZ, "+CUtils.getXSDTypeForBasicType(containedType)+"\""+parameterName+"\", 0);\n");
  +					writer.write("\tarray = DZ._functions->GetBasicArray(DZ._object, "+CUtils.getXSDTypeForBasicType(containedType)+"\""+parameterName+"\", 0);\n");
   					writer.write("\tmemcpy(&v"+i+", &array, sizeof(Axis_Array));\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\tarray = pDZX->GetCmplxArray(pDZ, (void*)Axis_DeSerialize_"+containedType+ 
  +					writer.write("\tarray = DZ._functions->GetCmplxArray(DZ._object, (void*)Axis_DeSerialize_"+containedType+ 
   						"\n\t\t, (void*)Axis_Create_"+containedType+", (void*)Axis_Delete_"+containedType+
   						"\n\t\t, (void*)Axis_GetSize_"+containedType+", \""+parameterName+"\", Axis_URI_"+containedType+");\n");
   					writer.write("\tmemcpy(&v"+i+", &array, sizeof(Axis_Array));\n");
   				}
   			}else{
   				//for complex types 
  -				writer.write("\tv"+i+" = ("+paraTypeName+"*)pDZX->GetCmplxObject(pDZ, (void*)Axis_DeSerialize_"+paraTypeName+
  +				writer.write("\tv"+i+" = ("+paraTypeName+"*)DZ._functions->GetCmplxObject(DZ._object, (void*)Axis_DeSerialize_"+paraTypeName+
   					"\n\t\t, (void*)Axis_Create_"+paraTypeName+", (void*)Axis_Delete_"+paraTypeName+
   					"\n\t\t,\""+parameterName+"\", Axis_URI_"+paraTypeName+");\n");
   			}
   		}
  -		writer.write("\tif (AXIS_SUCCESS != (nStatus = pDZX->GetStatus(pDZ))) return nStatus;\n");				
  +		writer.write("\tif (AXIS_SUCCESS != (nStatus = DZ._functions->GetStatus(DZ._object))) return nStatus;\n");				
   		if(returntype != null){
   			String returnParamName = returntype.getParamName();
   			/* Invoke the service when return type not void */
  @@ -337,23 +329,23 @@
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
  -				writer.write("\treturn pSZX->AddOutputParam(pSZ, \""+returnParamName+"\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamType)+");\n");
  +				writer.write("\treturn pSZ->_functions->AddOutputParam(SZ._object, \""+returnParamName+"\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamType)+");\n");
   			}else if(returntypeisarray){
   				QName qname = WrapperUtils.getArrayType(retType).getName();
   				String containedType = null;
   				if (CUtils.isSimpleType(qname)){
   					containedType = CUtils.getclass4qname(qname);
  -					writer.write("\treturn pSZX->AddOutputBasicArrayParam(pSZ, (Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+returnParamName+"\");\n");
  +					writer.write("\treturn pSZ->_functions->AddOutputBasicArrayParam(SZ._object, (Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+returnParamName+"\");\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\treturn pSZX->AddOutputCmplxArrayParam(pSZ, (Axis_Array*)(&ret), (void*) Axis_Serialize_"+containedType
  +					writer.write("\treturn pSZ->_functions->AddOutputCmplxArrayParam(SZ._object, (Axis_Array*)(&ret), (void*) Axis_Serialize_"+containedType
   					+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+returnParamName+"\", Axis_URI_"+containedType+");\n");
   				}
   			}
   			else{
   				//complex type
  -				writer.write("\treturn pSZX->AddOutputCmplxParam(pSZ, ret, (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+", \""+returnParamName+"\", Axis_URI_"+outparamType+");\n");
  +				writer.write("\treturn pSZ->_functions->AddOutputCmplxParam(SZ._object, ret, (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+", \""+returnParamName+"\", Axis_URI_"+outparamType+");\n");
   			}
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  
  
  
  1.6       +5 -3      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java
  
  Index: ClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClassLoader.java	15 Jan 2004 13:45:24 -0000	1.5
  +++ ClassLoader.java	9 Feb 2004 14:57:07 -0000	1.6
  @@ -97,12 +97,13 @@
   	  writer.write("STORAGE_CLASS_INFO\n");
   	  writer.write("int GetClassInstance(BasicHandler **inst)\n");
   	  writer.write("{\n");
  +	  writer.write("\t*inst = new BasicHandler();\n");
   	  writer.write("\tWrapperClassHandler* pWCH = new "+wrappername+"();\n");
  +	  writer.write("\t(*inst)->_functions = 0;\n");
   	  writer.write("\tif (pWCH)\n");
   	  writer.write("\t{\n");
  -	  writer.write("\t\tpWCH->Init();\n");
  -	  writer.write("\t\t*inst = pWCH;\n");
  -	  writer.write("\t\treturn AXIS_SUCCESS;\n");
  +	  writer.write("\t\t(*inst)->_object = pWCH;\n");
  +	  writer.write("\t\treturn pWCH->Init();\n");	  
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
   	  writer.write("}\n");
  @@ -114,6 +115,7 @@
   	  writer.write("\t\tWrapperClassHandler* pWCH = static_cast<WrapperClassHandler*>(inst);\n");
   	  writer.write("\t\tpWCH->Fini();\n");
   	  writer.write("\t\tdelete pWCH;\n");
  +	  writer.write("\t\tdelete inst;\n");
   	  writer.write("\t\treturn AXIS_SUCCESS;\n");
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
  
  
  
  1.21      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- ClientStubWriter.java	19 Jan 2004 07:44:13 -0000	1.20
  +++ ClientStubWriter.java	9 Feb 2004 14:57:07 -0000	1.21
  @@ -268,7 +268,7 @@
   				//TODO initialize return parameter appropriately.
   			}
   		}
  -		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize(RPC_ENCODED)) return ");
  +		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize(CPP_RPC_PROVIDER)) return ");
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n");
   		}
  
  
  
  1.4       +5 -3      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClassLoader.java
  
  Index: ClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClassLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClassLoader.java	15 Jan 2004 13:45:24 -0000	1.3
  +++ ClassLoader.java	9 Feb 2004 14:57:07 -0000	1.4
  @@ -97,12 +97,13 @@
   	  writer.write("STORAGE_CLASS_INFO\n");
   	  writer.write("int GetClassInstance(BasicHandler **inst)\n");
   	  writer.write("{\n");
  +	  writer.write("\t*inst = new BasicHandler();\n");
   	  writer.write("\tWrapperClassHandler* pWCH = new "+wrappername+"();\n");
  +	  writer.write("\t(*inst)->_functions = 0;\n");
   	  writer.write("\tif (pWCH)\n");
   	  writer.write("\t{\n");
  -	  writer.write("\t\tpWCH->Init();\n");
  -	  writer.write("\t\t*inst = pWCH;\n");
  -	  writer.write("\t\treturn AXIS_SUCCESS;\n");
  +	  writer.write("\t\t(*inst)->_object = pWCH;\n");
  +	  writer.write("\t\treturn pWCH->Init();\n");	  
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
   	  writer.write("}\n");
  @@ -114,6 +115,7 @@
   	  writer.write("\t\tWrapperClassHandler* pWCH = static_cast<WrapperClassHandler*>(inst);\n");
   	  writer.write("\t\tpWCH->Fini();\n");
   	  writer.write("\t\tdelete pWCH;\n");
  +	  writer.write("\t\tdelete inst;\n");
   	  writer.write("\t\treturn AXIS_SUCCESS;\n");
   	  writer.write("\t}\n");
   	  writer.write("\treturn AXIS_FAIL;\n");
  
  
  
  1.6       +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ClientStubWriter.java	19 Jan 2004 07:44:13 -0000	1.5
  +++ ClientStubWriter.java	9 Feb 2004 14:57:07 -0000	1.6
  @@ -268,7 +268,7 @@
   				//TODO initialize return parameter appropriately.
   			}
   		}
  -		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize(DOC_LITERAL)) return ");
  +		writer.write("\tif (AXIS_SUCCESS != m_pCall->Initialize(CPP_RPC_PROVIDER)) return ");
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n\t");
   		}
  
  
  

Mime
View raw message