You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2004/06/08 09:22:09 UTC

cvs commit: ws-axis/c/samples/server/rpcfault DivByZeroStruct.cpp DivByZeroStruct.h AxisDivByZeroException.cpp AxisDivByZeroException.h Makefile.am MathOps.cpp MathOps.h MathOps.wsdl MathOpsWrapper.cpp MathOpsWrapper.h

damitha     2004/06/08 00:22:09

  Modified:    c/samples/server/rpcfault AxisDivByZeroException.cpp
                        AxisDivByZeroException.h Makefile.am MathOps.cpp
                        MathOps.h MathOps.wsdl MathOpsWrapper.cpp
                        MathOpsWrapper.h
  Added:       c/samples/server/rpcfault DivByZeroStruct.cpp
                        DivByZeroStruct.h
  Log:
  
  
  Revision  Changes    Path
  1.4       +48 -59    ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.cpp
  
  Index: AxisDivByZeroException.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AxisDivByZeroException.cpp	24 May 2004 05:44:19 -0000	1.3
  +++ AxisDivByZeroException.cpp	8 Jun 2004 07:22:08 -0000	1.4
  @@ -1,106 +1,95 @@
  -/* -*- C++ -*- */
   /*
  - *   Copyright 2003-2004 The Apache Software Foundation.
  - *
  - *   Licensed under the Apache License, Version 2.0 (the "License");
  - *   you may not use this file except in compliance with the License.
  - *   You may obtain a copy of the License at
  - *
  - *       http://www.apache.org/licenses/LICENSE-2.0
  - *
  - *   Unless required by applicable law or agreed to in writing, software
  - *   distributed under the License is distributed on an "AS IS" BASIS,
  - *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - *   See the License for the specific language governing permissions and
  - *   limitations under the License.
  - *
  - * 
  - * @author  wsdl2ws generated
  + * This is the  implementation file genarated by WSDL2Ws tool.
  + * AxisDivByZeroException.cpp: implemtation for the AxisDivByZeroException.
    *
    */
   
   #include "AxisDivByZeroException.h"
  -#include <exception>
  -using namespace std;
   
  -/**
  - *    Default when no parameter passed. When thrown with no parameter
  - *    more general AXISC_DIVBYZERO_EXCEPTION is assumed.
  -*/
  +#include <axis/server/AxisWrapperAPI.h>
   
   AxisDivByZeroException::AxisDivByZeroException()
   {
  -    /* This only serves the pupose of indicating that the 
  -     * service has thrown an excpetion
  -     */
  -    m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
  -    processException(m_iExceptionCode);
  +/* This only serves the pupose of indicating that the 
  + * service has thrown an excpetion 
  + */ 
  +	m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION; 
  +	processException(m_iExceptionCode); 
   }
   
  -AxisDivByZeroException::AxisDivByZeroException (int iExceptionCode)
  +AxisDivByZeroException::AxisDivByZeroException(DivByZeroStruct*pFault)
   {
  -    m_iExceptionCode = iExceptionCode;
  -    processException (iExceptionCode);
  -}
  +	m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
  +	processException(pFault);}
   
  -AxisDivByZeroException::AxisDivByZeroException (exception* e)
  +AxisDivByZeroException::AxisDivByZeroException(int iExceptionCode)
   {
  -    processException (e);
  +
  +	m_iExceptionCode = iExceptionCode;
  +	processException (iExceptionCode);
   }
   
  -AxisDivByZeroException::AxisDivByZeroException (exception* e, int iExceptionCode)
  +AxisDivByZeroException::AxisDivByZeroException(exception* e)
   {
  -    processException (e, iExceptionCode);
  +	processException (e);
   }
   
  -AxisDivByZeroException::~AxisDivByZeroException() throw ()
  +AxisDivByZeroException::AxisDivByZeroException(exception* e,int iExceptionCode)
   {
   
  +	processException (e, iExceptionCode);
   }
   
  -void AxisDivByZeroException::processException (exception* e, int iExceptionCode)
  +AxisDivByZeroException::~AxisDivByZeroException() throw () 
   {
  -    m_sMessage = getMessage (e) + getMessage (iExceptionCode);
  +	m_sMessage ="";
   }
   
  -void AxisDivByZeroException::processException (exception* e)
  +void AxisDivByZeroException:: processException(exception* e, int iExceptionCode)
   {
  -    m_sMessage = getMessage (e);
  +	m_sMessage = getMessage (e) + getMessage (iExceptionCode);
  +}
  +
  +void AxisDivByZeroException::processException (DivByZeroStruct* pFault)
  +{
  +	/*User can do something like deserializing the struct into a string*/}
  +
  +void AxisDivByZeroException::processException(exception* e)
  +{
  +	m_sMessage = getMessage (e);
   }
   
   void AxisDivByZeroException::processException(int iExceptionCode)
   {
  -    m_sMessage = getMessage (iExceptionCode);
  +	m_sMessage = getMessage (iExceptionCode);
   }
   
   const string AxisDivByZeroException::getMessage (exception* objException)
   {
  -    string sMessage = objException->what();
  -
  -    return sMessage;
  +	string sMessage = objException->what();
  +	return sMessage;
   }
   
   const string AxisDivByZeroException::getMessage (int iExceptionCode)
   {
  -    string sMessage;
  -    switch(iExceptionCode)
  -    {
  -        case AXISC_SERVICE_THROWN_EXCEPTION:
  -            sMessage = "A service has thrown an exception. see detail";
  -            break;
  -        default:
  -            sMessage = "Unknown Exception has occured";
  -    }
  -    return sMessage;
  +	string sMessage;
  +	switch(iExceptionCode)
  +	{
  +		case AXISC_SERVICE_THROWN_EXCEPTION:
  +		sMessage = "A service has thrown an exception. see detail";
  +		break;
  +		default:
  +		sMessage = "Unknown Exception has occured";
  +	}
  +return sMessage;
   }
   
   const char* AxisDivByZeroException::what() throw ()
   {
  -    return m_sMessage.c_str ();
  +	return m_sMessage.c_str ();
   }
   
  -const int AxisDivByZeroException::getExceptionCode()
  -{
  -    return m_iExceptionCode;
  +const int AxisDivByZeroException::getExceptionCode(){
  +	return m_iExceptionCode;
   }
   
  
  
  
  1.2       +24 -40    ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.h
  
  Index: AxisDivByZeroException.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AxisDivByZeroException.h	18 May 2004 10:14:02 -0000	1.1
  +++ AxisDivByZeroException.h	8 Jun 2004 07:22:08 -0000	1.2
  @@ -1,54 +1,38 @@
   /*
  - *   Copyright 2003-2004 The Apache Software Foundation.
  - *
  - *   Licensed under the Apache License, Version 2.0 (the "License");
  - *   you may not use this file except in compliance with the License.
  - *   You may obtain a copy of the License at
  - *
  - *       http://www.apache.org/licenses/LICENSE-2.0
  - *
  - *   Unless required by applicable law or agreed to in writing, software
  - *   distributed under the License is distributed on an "AS IS" BASIS,
  - *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - *   See the License for the specific language governing permissions and
  - *   limitations under the License.
  - *
  - *
  - *   @author wsdl2ws generated
  + * This is the Client Stub Class genarated by the tool WSDL2Ws
  + * AxisDivByZeroException.h: interface for the AxisDivByZeroExceptionclass.
    *
    */
  - 
  -#ifndef __AXISDIVBYZEROEXCEPTION_H_OF_AXIS_INCLUDED_
  -#define __AXISDIVBYZEROEXCEPTION_H_OF_AXIS_INCLUDED_
  +#if !defined(__AXISDIVBYZEROEXCEPTION_EXCEPTION_H__INCLUDED_)
  +#define __AXISDIVBYZEROEXCEPTION_EXCEPTION_H__INCLUDED_
   
   #include <string>
   #include <exception>
   #include <axis/server/AxisException.h>
  -#include "SOAPStructFault.h"
  +#include "DivByZeroStruct.h"
   
   using namespace std;
  -
  -class AxisDivByZeroException : public AxisException
  +class AxisDivByZeroException: public AxisException
   {
  -
   public:
  -    AxisDivByZeroException();
  -    AxisDivByZeroException(int iExceptionCode);
  -    AxisDivByZeroException(exception* e);
  -    AxisDivByZeroException(exception* e, int iExceptionCode);
  -    virtual ~AxisDivByZeroException() throw();
  -    const char* what() throw();
  -    const int getExceptionCode();
  -    const string getMessage(exception* e);
  -    const string getMessage(int iExceptionCode);
  -                                                                                                                             
  +	AxisDivByZeroException();
  +	AxisDivByZeroException(DivByZeroStruct* pFault);
  +	AxisDivByZeroException(int iExceptionCode);
  +	AxisDivByZeroException(exception* e);
  +	AxisDivByZeroException(exception* e, int iExceptionCode);
  +	virtual ~AxisDivByZeroException() throw();
  +	 const char* what() throw();
  +	 const int getExceptionCode();
  +	 const string getMessage(exception* e);
  +	 const string getMessage(int iExceptionCode);
   private:
  -    void processException(exception* e);
  -    void processException(exception* e, int iExceptionCode);
  -    void processException(int iExceptionCode);
  -    string m_sMessage;
  -    int m_iExceptionCode;
  -};
  +	 void processException(exception* e);
  +	 void processException(DivByZeroStruct* pFault);
  +	 void processException(exception* e, int iExceptionCode);
  +	 void processException(int iExceptionCode);
  +	 string m_sMessage;
  +	 int m_iExceptionCode;
   
  -#endif
  +};
   
  +#endif /* !defined(__AXISDIVBYZEROEXCEPTION_EXCEPTION_H__INCLUDED_)*/
  
  
  
  1.2       +1 -1      ws-axis/c/samples/server/rpcfault/Makefile.am
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/Makefile.am,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.am	20 May 2004 08:11:28 -0000	1.1
  +++ Makefile.am	8 Jun 2004 07:22:08 -0000	1.2
  @@ -3,7 +3,7 @@
   libmathops_la_SOURCES = MathOps.cpp \
                           MathOpsWrapper.cpp \
                           MathOpsService.cpp \
  -                        SOAPStructFault.cpp \
  +                        DivByZeroStruct.cpp \
                           AxisDivByZeroException.cpp
   libmathops_la_LIBADD   = $(LDFLAGS)
   
  
  
  
  1.3       +3 -2      ws-axis/c/samples/server/rpcfault/MathOps.cpp
  
  Index: MathOps.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/MathOps.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MathOps.cpp	18 May 2004 04:32:30 -0000	1.2
  +++ MathOps.cpp	8 Jun 2004 07:22:08 -0000	1.3
  @@ -5,6 +5,7 @@
    */
   #include "MathOps.h"
   
  +
   MathOps::MathOps()
   {
   }
  @@ -13,8 +14,8 @@
   {
   }
   
  -int MathOps::div(int Value0, int Value1) throw(AxisDivByZeroException)
  +int MathOps::div(int Value0, int Value1)  
   {
       if (Value1 == 0) throw AxisDivByZeroException();
  -    return Value0/Value1;
  +        return Value0/Value1;
   }
  
  
  
  1.3       +12 -10    ws-axis/c/samples/server/rpcfault/MathOps.h
  
  Index: MathOps.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/MathOps.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MathOps.h	18 May 2004 04:32:30 -0000	1.2
  +++ MathOps.h	8 Jun 2004 07:22:08 -0000	1.3
  @@ -1,22 +1,24 @@
   /*
    * This is the Service Class genarated by the tool WSDL2Ws
  - * MathOps.h: interface for the MathOps class.
  + * MathOps.h: interface for the MathOpsclass.
    *
    */
  -#if !defined(__MATHOPS_SERVERSKELETON_H__OF_AXIS_INCLUDED_)
  -#define __MATHOPS_SERVERSKELETON_H__OF_AXIS_INCLUDED_
  +#if !defined(__MATHOPS_SERVERSKELETON_H__INCLUDED_)
  +#define __MATHOPS_SERVERSKELETON_H__INCLUDED_
   
   #include <axis/server/AxisUserAPI.h>
   #include "AxisDivByZeroException.h"
   
  +#include "DivByZeroStruct.h"
  +
   class MathOps 
   {
  -public:
  -    MathOps();
  -public:
  -    virtual ~MathOps();
  -public: 
  -    int div(int Value0,int Value1) throw(AxisDivByZeroException);
  +	public:
  +		MathOps();
  +	public:
  +		virtual ~MathOps();
  +	public: 
  +		int div(int Value0,int Value1);
   };
   
  -#endif /* !defined(__MATHOPS_SERVERSKELETON_H__OF_AXIS_INCLUDED_)*/
  +#endif /* !defined(__MATHOPS_SERVERSKELETON_H__INCLUDED_)*/
  
  
  
  1.6       +7 -7      ws-axis/c/samples/server/rpcfault/MathOps.wsdl
  
  Index: MathOps.wsdl
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/MathOps.wsdl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MathOps.wsdl	26 May 2004 09:59:53 -0000	1.5
  +++ MathOps.wsdl	8 Jun 2004 07:22:08 -0000	1.6
  @@ -2,7 +2,7 @@
   	<types>
   		<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://soapinterop.org/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soapinterop.org/types">
   			<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
  -			<complexType name="SOAPStructFault">
  +			<complexType name="DivByZeroStruct">
   				<sequence>
   					<element name="varString" type="xsd:string"/>
   					<element name="varInt" type="xsd:int"/>
  @@ -12,7 +12,7 @@
   		</schema>
   	</types>
   	<message name="DivByZeroFault">
  -		<part name="faultstruct" type="ns2:SOAPStructFault"/>
  +		<part name="faultstruct1" type="ns2:DivByZeroStruct"/>
   	</message>
   	<message name="divRequest">
   		<part name="int0" type="xsd:int"/>
  @@ -25,7 +25,7 @@
   		<operation name="div" parameterOrder ="int0 int1">
   			<input message="tns:divRequest"/>
   			<output message="tns:divResponse"/>
  -			<fault name="DivByZeroFault" message="tns:DivByZeroFault"/>
  +			<fault name="DivByZero" message="tns:DivByZeroFault"/>
   		 </operation>
   	</portType>
   	<binding name="MathOpsBinding" type="tns:MathOps">
  @@ -43,14 +43,14 @@
                           namespace="http://localhost/axis/MathOps" 
                           use="encoded"/>
                   </output>
  -			<fault name="DivByZeroFault">
  -				<soap:fault name="DivByZeroFault" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/wsdl"/>
  +			<fault name="DivByZero">
  +				<soap:fault name="DivByZero" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soapinterop.org/wsdl"/>
   			</fault>
   			</operation>
   		</binding>
   	<service name="MathOpsService">
  -		<port name="MathOpsPort" binding="tns:MathOpsBinding">
  -			<soap:address location="http://localhost/axis/MathOpsPort"/>
  +		<port name="MathOps" binding="tns:MathOpsBinding">
  +			<soap:address location="http://localhost/axis/MathOps"/>
   		</port>
   	</service>
   	<!-- Fault messages -->
  
  
  
  1.8       +29 -39    ws-axis/c/samples/server/rpcfault/MathOpsWrapper.cpp
  
  Index: MathOpsWrapper.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/MathOpsWrapper.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MathOpsWrapper.cpp	26 May 2004 06:12:08 -0000	1.7
  +++ MathOpsWrapper.cpp	8 Jun 2004 07:22:08 -0000	1.8
  @@ -6,19 +6,11 @@
   
   #include "MathOpsWrapper.h"
   
  -extern int Axis_DeSerialize_SOAPStructFault(SOAPStructFault* param, 
  -    IWrapperSoapDeSerializer *pDZ);
  -
  -extern void* Axis_Create_SOAPStructFault(SOAPStructFault *Obj, bool bArray = false, 
  -    int nSize=0);
  -
  -extern void Axis_Delete_SOAPStructFault(SOAPStructFault* param, bool bArray = false, 
  -    int nSize=0);
  -
  -extern int Axis_Serialize_SOAPStructFault(SOAPStructFault* param, IWrapperSoapSerializer* pSZ, 
  -    bool bArray = false);
  -
  -extern int Axis_GetSize_SOAPStructFault();
  +extern int Axis_DeSerialize_DivByZeroStruct(DivByZeroStruct* param, IWrapperSoapDeSerializer *pDZ);
  +extern void* Axis_Create_DivByZeroStruct(DivByZeroStruct *Obj, bool bArray = false, int nSize=0);
  +extern void Axis_Delete_DivByZeroStruct(DivByZeroStruct* param, bool bArray = false, int nSize=0);
  +extern int Axis_Serialize_DivByZeroStruct(DivByZeroStruct* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
  +extern int Axis_GetSize_DivByZeroStruct();
   
   MathOpsWrapper::MathOpsWrapper()
   {
  @@ -64,11 +56,10 @@
   /*
    * This method wrap the service method 
    */
  -int MathOpsWrapper::div(void* pMsg) throw(AxisDivByZeroException)
  +int MathOpsWrapper::div(void* pMsg)
   {
   	IMessageData* mc = (IMessageData*)pMsg;
   	int nStatus;
  -        int ret;
   	IWrapperSoapSerializer *pIWSSZ = NULL;
   	mc->getSoapSerializer(&pIWSSZ);
   	if (!pIWSSZ) return AXIS_FAIL;
  @@ -76,30 +67,29 @@
   	mc->getSoapDeSerializer(&pIWSDZ);
   	if (!pIWSDZ) return AXIS_FAIL;
   	/* check whether we have got correct message */
  -	if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("div", "http://localhost/axis/MathOps")) return AXIS_FAIL;
  -	pIWSSZ->createSoapMethod("divResponse", "http://localhost/axis/MathOps");
  -	int v0 = pIWSDZ->getElementAsInt("in0",0);
  -	int v1 = pIWSDZ->getElementAsInt("in1",0);
  +	if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("div", "http://soapinterop.org/wsdl")) return AXIS_FAIL;
  +	pIWSSZ->createSoapMethod("divResponse", "http://soapinterop.org/wsdl");
  +	int v0 = pIWSDZ->getElementAsInt("int0",0);
  +	int v1 = pIWSDZ->getElementAsInt("int1",0);
   	if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus())) return nStatus;
  -        try
  -        {
  -	    ret = pWs->div(v0,v1);
  -        }
  -        catch(AxisDivByZeroException& e)
  -        {
  -            pIWSSZ->createSoapFault("SOAPStructFault", "http://soapinterop.org/"); 
  -            SOAPStructFault* pObjFault = new SOAPStructFault();
  -            pObjFault->varString = "Division by zero exception";
  -            pObjFault->varInt = 1;
  -            pObjFault->varFloat = 10.52;
  -
  -            if(pObjFault)
  -                pIWSSZ->addFaultDetail(pObjFault, (void*)Axis_Serialize_SOAPStructFault,
  -                    (void*)Axis_Delete_SOAPStructFault, "DivByZeroException", 
  -                    Axis_URI_SOAPStructFault);
  -
  -            throw;
  -        }
  -	return pIWSSZ->addOutputParam("divReturn", (void*)&ret, XSD_INT);
  +	try
  +	{
  +		int ret = pWs->div(v0,v1);
  +		return pIWSSZ->addOutputParam("divReturn", (void*)&ret, XSD_INT);
  +	}
  +	catch(AxisDivByZeroException& e)
  +	{
  +		pIWSSZ->createSoapFault("DivByZeroStruct", "http://soapinterop.org/wsdl");
  +		DivByZeroStruct* pObjFault = new DivByZeroStruct();
  +		/*User may write code here to fill the struct*/
  +                pObjFault->varString = "Division by zero exception";
  +                pObjFault->varInt = 1;
  +                pObjFault->varFloat = 10.52;
  +		if (pObjFault)
  +			pIWSSZ->addFaultDetail(pObjFault, (void*) Axis_Serialize_DivByZeroStruct,
  +			(void*) Axis_Delete_DivByZeroStruct,"DivByZeroFault", Axis_URI_DivByZeroStruct);
  +		throw;
  +	}
  +
   }
   
  
  
  
  1.3       +5 -6      ws-axis/c/samples/server/rpcfault/MathOpsWrapper.h
  
  Index: MathOpsWrapper.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/samples/server/rpcfault/MathOpsWrapper.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MathOpsWrapper.h	18 May 2004 04:32:30 -0000	1.2
  +++ MathOpsWrapper.h	8 Jun 2004 07:22:08 -0000	1.3
  @@ -1,13 +1,12 @@
   /*
    * This is the Service Class genarated by the tool WSDL2Ws
  - *		MathOpsWrapper.h: interface for the MathOpsWrapper class.
  + *		MathOpsWrapper.h: interface for the MathOpsWrapperclass.
    *
    */
  -#if !defined(__MATHOPSWRAPPER_SERVERWRAPPER_H__OF_AXIS_INCLUDED_)
  -#define __MATHOPSWRAPPER_SERVERWRAPPER_H__OF_AXIS_INCLUDED_
  +#if !defined(__MATHOPSWRAPPER_SERVERWRAPPER_H__INCLUDED_)
  +#define __MATHOPSWRAPPER_SERVERWRAPPER_H__INCLUDED_
   
   #include "MathOps.h"
  -#include "SOAPStructFault.h"
   #include <axis/server/WrapperClassHandler.h>
   #include <axis/server/IMessageData.h>
   #include <axis/server/GDefine.h>
  @@ -29,7 +28,7 @@
   	int AXISCALL fini();
   	AXIS_BINDING_STYLE AXISCALL getBindingStyle(){return RPC_ENCODED;};
   private:/*Methods corresponding to the web service methods*/
  -	int div(void* pMsg) throw(AxisDivByZeroException);
  +	int div(void* pMsg);
   };
   
  -#endif /* !defined(__CALCULATORWRAPPER_SERVERWRAPPER_H__OF_AXIS_INCLUDED_)*/
  +#endif /* !defined(__MATHOPSWRAPPER_SERVERWRAPPER_H__INCLUDED_)*/
  
  
  
  1.1                  ws-axis/c/samples/server/rpcfault/DivByZeroStruct.cpp
  
  Index: DivByZeroStruct.cpp
  ===================================================================
  /*
   *This file is automatically generated by the Axis C++ Wrapper Class Generator
   *Web service wrapper class's implementation generated by Axis WCG
   *Parameters and wrapper methos to manipulate DivByZeroStruct
   */
  
  #include <malloc.h>
  #include "DivByZeroStruct.h"
  #include <axis/server/AxisWrapperAPI.h>
  
  /*
   * This static method serialize a DivByZeroStruct type of object
   */
  int Axis_Serialize_DivByZeroStruct(DivByZeroStruct* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
  {
  	if (bArray)
  	{
  		pSZ->serialize("<", Axis_TypeName_DivByZeroStruct, ">", NULL);
  	}
  	else
  	{
  		const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_DivByZeroStruct);
  		pSZ->serialize("<", Axis_TypeName_DivByZeroStruct, " xsi:type=\"", sPrefix, ":",
  			Axis_TypeName_DivByZeroStruct, "\" xmlns:", sPrefix, "=\"",
  			Axis_URI_DivByZeroStruct, "\">", NULL);
  	}
  
  	pSZ->serializeAsElement("varString", (void*)&(param->varString), XSD_STRING);
  	pSZ->serializeAsElement("varInt", (void*)&(param->varInt), XSD_INT);
  	pSZ->serializeAsElement("varFloat", (void*)&(param->varFloat), XSD_FLOAT);
  
  	pSZ->serialize("</", Axis_TypeName_DivByZeroStruct, ">", NULL);
  	return AXIS_SUCCESS;
  }
  
  /*
   * This static method deserialize a DivByZeroStruct type of object
   */
  int Axis_DeSerialize_DivByZeroStruct(DivByZeroStruct* param, IWrapperSoapDeSerializer *pIWSDZ)
  {
  	param->varString = pIWSDZ->getElementAsString("varString",0);
  	param->varInt = pIWSDZ->getElementAsInt("varInt",0);
  	param->varFloat = pIWSDZ->getElementAsFloat("varFloat",0);
  	return pIWSDZ->getStatus();
  }
  void* Axis_Create_DivByZeroStruct(DivByZeroStruct* pObj, bool bArray = false, int nSize=0)
  {
  	if (bArray && (nSize > 0))
  	{
  		if (pObj)
  		{
  			DivByZeroStruct* pNew = new DivByZeroStruct[nSize];
  			memcpy(pNew, pObj, sizeof(DivByZeroStruct)*nSize/2);
  			memset(pObj, 0, sizeof(DivByZeroStruct)*nSize/2);
  			delete [] pObj;
  			return pNew;
  		}
  		else
  		{
  			return new DivByZeroStruct[nSize];
  		}
  	}
  	else
  		return new DivByZeroStruct;
  }
  
  /*
   * This static method delete a DivByZeroStruct type of object
   */
  void Axis_Delete_DivByZeroStruct(DivByZeroStruct* param, bool bArray = false, int nSize=0)
  {
  	if (bArray)
  	{
  		delete [] param;
  	}
  	else
  	{
  		delete param;
  	}
  }
  /*
   * This static method gives the size of DivByZeroStruct type of object
   */
  int Axis_GetSize_DivByZeroStruct()
  {
  	return sizeof(DivByZeroStruct);
  }
  
  DivByZeroStruct::DivByZeroStruct()
  {
  	/*do not allocate memory to any pointer members here
  	 because deserializer will allocate memory anyway. */
  }
  
  DivByZeroStruct::~DivByZeroStruct()
  {
  	/*delete any pointer and array members here*/
  }
  
  
  
  1.1                  ws-axis/c/samples/server/rpcfault/DivByZeroStruct.h
  
  Index: DivByZeroStruct.h
  ===================================================================
  /*
   *This file is automatically generated by the Axis C++ Wrapper Class Generator
   *Web service wrapper class's implementation generated by Axis WCG
   *Parameters and wrapper methos to manipulate DivByZeroStruct
   */
  
  #if !defined(__DIVBYZEROSTRUCT_PARAM_H__INCLUDED_)
  #define __DIVBYZEROSTRUCT_PARAM_H__INCLUDED_
  
  #include <axis/server/AxisUserAPI.h>
  
  /*Local name and the URI for the type*/
  static const char* Axis_URI_DivByZeroStruct = "http://soapinterop.org/types";
  static const char* Axis_TypeName_DivByZeroStruct = "DivByZeroStruct";
  
  class DivByZeroStruct
  {
  public:
  	xsd__string varString;
  	int varInt;
  	float varFloat;
  	DivByZeroStruct();
  	virtual ~DivByZeroStruct();
  };
  
  #endif /* !defined(__DIVBYZEROSTRUCT_PARAM_H__INCLUDED_)*/