blob: 07d0c247dec294245301812fe0a0695cf87f0cd9 [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 "SimpleTypeArrayWS.hpp"
#include <axis/AxisWrapperAPI.hpp>
#include <axis/Axis.hpp>
extern int Axis_DeSerialize_Type(Type* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_Type(Type *Obj, bool bArray = false, int nSize=0);
extern void Axis_Delete_Type(Type* param, bool bArray = false, int nSize=0);
extern int Axis_Serialize_Type(Type* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_Type();
SimpleTypeArrayWS::SimpleTypeArrayWS(const char* pcEndpointUri, AXIS_PROTOCOL_TYPE eProtocol):Stub(pcEndpointUri, eProtocol)
{
}
SimpleTypeArrayWS::SimpleTypeArrayWS()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("http://localhost:9080/SimpleTypeArray/services/sampleWS");
}
SimpleTypeArrayWS::~SimpleTypeArrayWS()
{
}
/*Methods corresponding to the web service methods*/
/*
* This method wrap the service methodgetInput
*/
Type* SimpleTypeArrayWS::getInput(Type* Value0)
{
Type* 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 , "null");
}
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("getInput", "http://simpletypearray.test.apache.org");
includeSecure();
applyUserPreferences();
char cPrefixAndParamName0[] = "input";
m_pCall->addCmplxParameter(Value0, (void*)Axis_Serialize_Type, (void*)Axis_Delete_Type, cPrefixAndParamName0, Axis_URI_Type);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("getInputResponse", "http://simpletypearray.test.apache.org"))
{
pReturn = (Type*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_Type, (void*) Axis_Create_Type, (void*) Axis_Delete_Type,"input", 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:9080/SimpleTypeArray/services/sampleWS" );
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;
}
}
}