// CwmwsdlclientObj.cpp : Implementation of CwmwsdlclientObj

#include "stdafx.h"
#include "wmwsdlclientObj.h"
#include "..\soap_source\charencode.h"

// CwmwsdlclientObj

STDMETHODIMP CwmwsdlclientObj::ReadServiceDesc(BSTR bstrSvcName, BSTR bstrPortName, BSTR bstrFileURL, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	string strFileURL;
	WideStringToUTF8(wstring(bstrFileURL), strFileURL);
	bool bRtn = m_pWSDLClient->ReadServiceDesc(wstring(bstrSvcName), wstring(bstrPortName), strFileURL);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetMethodSOAPAction(BSTR bstrMethod, BSTR *bstrSOAPAction, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrSOAPAction;
	bool bRtn = m_pWSDLClient->GetMethodSOAPAction(wstring(bstrMethod), wstrSOAPAction);
	if (bRtn == true)
	{
		*bstrSOAPAction = SysAllocString(wstrSOAPAction.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::SOAPActionRequired(BSTR bstrOpName, VARIANT_BOOL *bIsRequired, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrSOAPAction;
    bool bValue = false;
	bool bRtn = m_pWSDLClient->SOAPActionRequired(wstring(bstrOpName), bValue);
	if (bRtn == true)
	{
        *bIsRequired = (bValue == true ? VARIANT_TRUE : VARIANT_FALSE);
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetMethodNamespaceURI(BSTR bstrMethod, BSTR *bstrMethodNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrNS;
	bool bRtn = m_pWSDLClient->GetMethodNamespaceURI(wstring(bstrMethod), wstrNS);
	if (bRtn == true)
	{
		*bstrMethodNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPAddress(BSTR *bstrHost, BSTR *bstrURI, int *nPortNbr, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	*nPortNbr = m_pWSDLClient->GetSOAPSvcPortNbr();
	*bstrHost = SysAllocString(m_pWSDLClient->GetSOAPSvcHost().c_str());
	*bstrURI = SysAllocString(m_pWSDLClient->GetSOAPSvcURI().c_str());
	*pResult = VARIANT_TRUE;
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPInputBodyUse(BSTR bstrOpName, BSTR *bstrUse, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrUse;
	bool bRtn = m_pWSDLClient->GetSOAPInputBodyUse(wstring(bstrOpName), wstrUse);
	if (bRtn == true)
	{
		*bstrUse = SysAllocString(wstrUse.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPOutputBodyUse(BSTR bstrOpName, BSTR *bstrUse, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrUse;
	bool bRtn = m_pWSDLClient->GetSOAPOutputBodyUse(wstring(bstrOpName), wstrUse);
	if (bRtn == true)
	{
		*bstrUse = SysAllocString(wstrUse.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPInputBodyEncStyle(BSTR bstrOpName, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetSOAPInputBodyEncStyle(wstring(bstrOpName), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPOutputBodyEncStyle(BSTR bstrOpName, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetSOAPOutputBodyEncStyle(wstring(bstrOpName), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPBindingStyle(BSTR *bstrStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrStyle;
	bool bRtn = m_pWSDLClient->GetSOAPBindingStyle(wstrStyle);
	if (bRtn == true)
	{
		*bstrStyle = SysAllocString(wstrStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPBindingTransport(BSTR *bstrTransport, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrTransport;
	bool bRtn = m_pWSDLClient->GetSOAPBindingTransport(wstrTransport);
	if (bRtn == true)
	{
		*bstrTransport = SysAllocString(wstrTransport.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetSOAPBindingVersion(BSTR *bstrVersionURI, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrVersion;
	bool bRtn = m_pWSDLClient->GetSOAPBindingVersion(wstrVersion);
	if (bRtn == true)
	{
		*bstrVersionURI = SysAllocString(wstrVersion.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetMethodNamesBySOAPAction(BSTR bstrSOAPAction, BSTR *bstrMethod, BSTR *bstrMethodNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrMethod, wstrNS;
	bool bRtn = m_pWSDLClient->GetOpNamesBySOAPAction(wstring(bstrSOAPAction), wstrMethod, wstrNS);
	if (bRtn == true)
	{
		*bstrMethod = SysAllocString(wstrMethod.c_str());
		*bstrMethodNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::IsMethodParam(BSTR bstrMethod, BSTR bstrParam, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pWSDLClient->IsOperationParam(wstring(bstrMethod), wstring(bstrParam));
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetInputMsgPartType(BSTR bstrMethod, BSTR bstrPartName, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetInputMsgPartType(wstring(bstrMethod), wstring(bstrPartName), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOutputMsgPartType(BSTR bstrMethod, BSTR bstrPartName, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetOutputMsgPartType(wstring(bstrMethod), wstring(bstrPartName), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOperationReturnType(BSTR bstrMethod, BSTR bstrPartName, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetOperationReturnType(wstring(bstrMethod), wstring(bstrPartName), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::IsInputMsgPart(BSTR bstrMethod, BSTR bstrPartName, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	bool bRtn = m_pWSDLClient->IsInputMsgPart(wstring(bstrMethod), wstring(bstrPartName));
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::IsOutputMsgPart(BSTR bstrMethod, BSTR bstrPartName, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	bool bRtn = m_pWSDLClient->IsOutputMsgPart(wstring(bstrMethod), wstring(bstrPartName));
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetFirstInParamName(BSTR bstrMethod, BSTR *bstrName, long *lPosition, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrName;
	long lPos;
	bool bRtn = m_pWSDLClient->GetFirstInParamName(wstring(bstrMethod), wstrName, lPos);
	if (bRtn == true)
	{
		*bstrName = SysAllocString(wstrName.c_str());
		*lPosition = lPos;
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetNextInParamName(BSTR bstrMethod, BSTR *bstrName, long *lPosition, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrName;
	long lPos = *lPosition;
	bool bRtn = m_pWSDLClient->GetNextInParamName(wstring(bstrMethod), wstrName, lPos);
	if (bRtn == true)
	{
		*bstrName = SysAllocString(wstrName.c_str());
		*lPosition = lPos;
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetFirstOutParamName(BSTR bstrMethod, BSTR *bstrName, long *lPosition, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrName;
	long lPos;
	bool bRtn = m_pWSDLClient->GetFirstOutParamName(wstring(bstrMethod), wstrName, lPos);
	if (bRtn == true)
	{
		*bstrName = SysAllocString(wstrName.c_str());
		*lPosition = lPos;
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetNextOutParamName(BSTR bstrMethod, BSTR *bstrName, long *lPosition, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrName;
	long lPos = *lPosition;
	bool bRtn = m_pWSDLClient->GetNextOutParamName(wstring(bstrMethod), wstrName, lPos);
	if (bRtn == true)
	{
		*bstrName = SysAllocString(wstrName.c_str());
		*lPosition = lPos;
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetHeaderElemType(BSTR bstrElemName, BSTR bstrElemNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetHeaderElemType(wstring(bstrElemName), wstring(bstrElemNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetDefinitionsTNS(BSTR *bstrTNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	*bstrTNS = SysAllocString(m_pWSDLClient->GetDefinitionsTNS().c_str());
	*pResult = VARIANT_TRUE;
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::SetUserAgent(BSTR bstrUserAgent, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	string strUserAgent;
	WideStringToUTF8(wstring(bstrUserAgent), strUserAgent);
	m_pWSDLClient->SetUserAgent(strUserAgent);
	*pResult = VARIANT_TRUE;
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetUserAgent(BSTR *bstrUserAgent, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrUserAgent;
	UTF8ToWideString(m_pWSDLClient->GetUserAgent(), wstrUserAgent);
	*bstrUserAgent = SysAllocString(wstrUserAgent.c_str());
	*pResult = VARIANT_TRUE;
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::SetHTTPTimeout(int nPeriod, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	m_pWSDLClient->SetHTTPTimeout(nPeriod);
	*pResult = VARIANT_TRUE;
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::SetHTTPHeaders(BSTR bstrHeaders, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	string strHeaders;
	WideStringToUTF8(wstring(bstrHeaders), strHeaders);
	m_pWSDLClient->SetHTTPHeaders(strHeaders);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetStructMemberType(BSTR bstrStructName, BSTR bstrStructNS, BSTR bstrMemberName, BSTR bstrMemberNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetStructMemberType(wstring(bstrStructName), wstring(bstrStructNS), wstring(bstrMemberName), wstring(bstrMemberNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetComplexBaseType(BSTR bstrName, BSTR bstrNS, BSTR *bstrBaseType, BSTR *bstrBaseTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrBaseType, wstrBaseTypeNS;
	bool bRtn = m_pWSDLClient->GetComplexBaseType(wstring(bstrName), wstring(bstrNS), wstrBaseType, wstrBaseTypeNS);
	if (bRtn == true)
	{
		*bstrBaseType = SysAllocString(wstrBaseType.c_str());
		*bstrBaseTypeNS = SysAllocString(wstrBaseTypeNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetArrayDims(BSTR bstrArrayName, BSTR bstrArrayNS, long *lDims, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	unsigned int nDims;
	bool bRtn = m_pWSDLClient->GetArrayDims(wstring(bstrArrayName), wstring(bstrArrayNS), nDims);
	if (bRtn == true)
	{
		*lDims = nDims;
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetArrayType(BSTR bstrArrayName, BSTR bstrArrayNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetArrayType(wstring(bstrArrayName), wstring(bstrArrayNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetInputHeaderPartType(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetInputHeaderPartType(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOutputHeaderPartType(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetOutputHeaderPartType(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetInHeaderFaultPartType(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetInHeaderFaultPartType(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOutHeaderFaultPartType(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetOutHeaderFaultPartType(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetFaultDetailPartType(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrType, BSTR *bstrTypeNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrType, wstrNS;
	bool bRtn = m_pWSDLClient->GetFaultDetailPartType(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrType, wstrNS);
	if (bRtn == true)
	{
		*bstrType = SysAllocString(wstrType.c_str());
		*bstrTypeNS = SysAllocString(wstrNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetFaultDetailEncStyle(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetFaultDetailEncStyle(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetFaultDetailUse(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrUse, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrUse;
	bool bRtn = m_pWSDLClient->GetFaultDetailUse(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrUse);
	if (bRtn == true)
	{
		*bstrUse = SysAllocString(wstrUse.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOperationBindingStyle(BSTR bstrOpName, BSTR *bstrStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrStyle;
	bool bRtn = m_pWSDLClient->GetOpBindingStyle(wstring(bstrOpName), wstrStyle);
	if (bRtn == true)
	{
		*bstrStyle = SysAllocString(wstrStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetMethodParamIndex(BSTR bstrMethod, BSTR bstrParam, long *lIndex, VARIANT_BOOL *pResult)
{
	bool bRtn = m_pWSDLClient->GetOperationParamIndex(wstring(bstrMethod), wstring(bstrParam), lIndex);
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetInputHeaderPartEncStyle(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetInputHeaderPartEncStyle(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOutputHeaderPartEncStyle(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetOutputHeaderPartEncStyle(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetInHeaderFaultPartEncStyle(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetInHeaderFaultPartEncStyle(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetOutHeaderFaultPartEncStyle(BSTR bstrOpName, BSTR bstrPartName, BSTR bstrPartNS, BSTR *bstrEncStyle, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrEncStyle;
	bool bRtn = m_pWSDLClient->GetOutHeaderFaultPartEncStyle(wstring(bstrOpName), wstring(bstrPartName), wstring(bstrPartNS), wstrEncStyle);
	if (bRtn == true)
	{
		*bstrEncStyle = SysAllocString(wstrEncStyle.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}

STDMETHODIMP CwmwsdlclientObj::GetArrayTypeLit(BSTR bstrArrayName, BSTR bstrArrayNS, BSTR *bstrItemType, BSTR *bstrItemTypeNS, BSTR *bstrItemName, BSTR *bstrItemNS, VARIANT_BOOL *pResult)
{
	if (m_pWSDLClient == NULL)
	{
		*pResult = VARIANT_FALSE;
		return S_OK;
	}
	wstring wstrItemType, wstrItemTypeNS, wstrItemName, wstrItemNS;
	bool bRtn = m_pWSDLClient->GetArrayTypeLit(wstring(bstrArrayName), wstring(bstrArrayNS), wstrItemType, wstrItemTypeNS, wstrItemName, wstrItemNS);
	if (bRtn == true)
	{
		*bstrItemType = SysAllocString(wstrItemType.c_str());
		*bstrItemTypeNS = SysAllocString(wstrItemTypeNS.c_str());
        *bstrItemName = SysAllocString(wstrItemName.c_str());
        *bstrItemNS = SysAllocString(wstrItemNS.c_str());
	}
	*pResult = (bRtn == true ? VARIANT_TRUE : VARIANT_FALSE);
	return S_OK;
}
