blob: 93ba880c65c03badb4a5fc2c11dad1060de85ae4 [file] [log] [blame]
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub implementation for remote web service.
*/
#include "ArrayTestPortType.hpp"
#include <axis/AxisWrapperAPI.hpp>
#include <axis/Axis.hpp>
extern int Axis_DeSerialize_intArrayType(intArrayType* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_intArrayType(intArrayType *Obj, bool bArray = false, int nSize=0);
extern void Axis_Delete_intArrayType(intArrayType* param, bool bArray = false, int nSize=0);
extern int Axis_Serialize_intArrayType(intArrayType* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_intArrayType();
ArrayTestPortType::ArrayTestPortType(const char* pcEndpointUri, AXIS_PROTOCOL_TYPE eProtocol):Stub(pcEndpointUri, eProtocol)
{
}
ArrayTestPortType::ArrayTestPortType()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("http://localhost/axis/array");
}
ArrayTestPortType::~ArrayTestPortType()
{
}
/*Methods corresponding to the web service methods*/
/*
* This method wrap the service methodechoIntArray
*/
intArrayType* ArrayTestPortType::echoIntArray(intArrayType* Value0)
{
intArrayType* pReturn = NULL;
const char* pcCmplxFaultName;
pcCmplxFaultName = NULL;
try
{ if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER)) return pReturn;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
{
m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
}
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("echoIntArray", "http://soapinterop.org");
includeSecure();
applyUserPreferences();
char cPrefixAndParamName0[17];
sprintf( cPrefixAndParamName0, "%s:arg_0_0", m_pCall->getNamespacePrefix("http://soapinterop.org"));
m_pCall->addCmplxParameter(Value0, (void*)Axis_Serialize_intArrayType, (void*)Axis_Delete_intArrayType, cPrefixAndParamName0, Axis_URI_intArrayType);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("echoIntArrayResponse", "http://soapinterop.org"))
{
pReturn = (intArrayType*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_intArrayType, (void*) Axis_Create_intArrayType, (void*) Axis_Delete_intArrayType,"echoIntArrayReturn", 0);
}
}
m_pCall->unInitialize();
return pReturn;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
m_pCall->unInitialize();
throw;
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://localhost/axis/array" );
if(pSoapFault)
{
const char *detail = pSoapFault->getSimpleFaultDetail();
bool deleteDetail=false;
if (NULL==detail || 0==strlen(detail))
{
detail=m_pCall->getFaultAsXMLString();
if (NULL==detail)
{
detail="";
}
else
{
deleteDetail=true;
}
}
OtherFaultException ofe(pSoapFault->getFaultcode(),
pSoapFault->getFaultstring(), pSoapFault->getFaultactor(),
detail, iExceptionCode);
if (deleteDetail && NULL!=detail)
{
delete [] const_cast<char*>(detail);
}
m_pCall->unInitialize();
delete pSoapFault;
throw ofe;
}
else
{
m_pCall->unInitialize();
delete pSoapFault;
throw;
}
}
}