// wmwsdlclientObj.h : Declaration of the CwmwsdlclientObj

#pragma once
#include "resource.h"       // main symbols

#include "wmwsdlclient.h"
#include "..\soap_source\wmsoapwsdlclient.h"

// CwmwsdlclientObj

class ATL_NO_VTABLE CwmwsdlclientObj : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CwmwsdlclientObj, &CLSID_wmwsdlclient2>,
	public IDispatchImpl<Iwmwsdlclient2, &IID_Iwmwsdlclient2, &LIBID_wmwsdlclientLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
	CwmwsdlclientObj()
	{
        m_pWSDLClient = NULL;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_WMWSDLCLIENTOBJ)


BEGIN_COM_MAP(CwmwsdlclientObj)
	COM_INTERFACE_ENTRY(Iwmwsdlclient2)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()


	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		m_pWSDLClient = new WMSOAPWSDLClient();
        if (m_pWSDLClient == NULL)
            return E_FAIL;
		return S_OK;
	}
	
	void FinalRelease() 
	{
		if (m_pWSDLClient != NULL)
			delete m_pWSDLClient;
	}

public:
	STDMETHOD(GetMethodParamIndex)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrParam, /*[out]*/ long* lIndex, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOperationBindingStyle)(/*[in]*/ BSTR bstrOpName, /*[out]*/ BSTR *bstrStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOperationReturnType)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrPartName, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetArrayDims)(/*[in]*/ BSTR bstrArrayName, /*[in]*/ BSTR bstrArrayNS, /*[out]*/ long *lDims, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetFaultDetailPartType)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetFaultDetailEncStyle)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetFaultDetailUse)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrUse, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOutHeaderFaultPartType)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetInHeaderFaultPartType)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOutputHeaderPartType)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetInputHeaderPartType)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetArrayType)(/*[in]*/ BSTR bstrArrayName, /*[in]*/ BSTR bstrArrayNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetComplexBaseType)(/*[in]*/ BSTR bstrName, /*[in]*/ BSTR bstrNS, /*[out]*/ BSTR *bstrBaseType, /*[out]*/ BSTR *bstrBaseTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetStructMemberType)(/*[in]*/ BSTR bstrStructName, /*[in]*/ BSTR bstrStructNS, /*[in]*/ BSTR bstrMemberName, /*[in]*/ BSTR bstrMemberNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(SetHTTPHeaders)(/*[in]*/ BSTR bstrHeaders, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(SetHTTPTimeout)(/*[in]*/ int nPeriod, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetUserAgent)(/*[out]*/ BSTR *bstrUserAgent, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(SetUserAgent)(/*[in]*/ BSTR bstrUserAgent, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetDefinitionsTNS)(/*[out]*/ BSTR *bstrTNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetHeaderElemType)(/*[in]*/ BSTR bstrElemName, /*[in]*/ BSTR bstrElemNS, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetNextOutParamName)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrName, /*[in, out]*/ long *lPosition, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetFirstOutParamName)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrName, /*[out]*/ long *lPosition, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetNextInParamName)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrName, /*[in, out]*/ long *lPosition, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetFirstInParamName)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrName, /*[out]*/ long *lPosition, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(IsOutputMsgPart)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrPartName, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(IsInputMsgPart)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrPartName, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOutputMsgPartType)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrPartName, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetInputMsgPartType)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrPartName, /*[out]*/ BSTR *bstrType, /*[out]*/ BSTR *bstrTypeNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(IsMethodParam)(/*[in]*/ BSTR bstrMethod, /*[in]*/ BSTR bstrParam, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetMethodNamesBySOAPAction)(/*[in]*/ BSTR bstrSOAPAction, /*[out]*/ BSTR *bstrMethod, /*[out]*/ BSTR *bstrMethodNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPBindingVersion)(/*[out]*/ BSTR *bstrVersionURI, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPBindingTransport)(/*[out]*/ BSTR *bstrTransport, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPBindingStyle)(/*[out]*/ BSTR *bstrStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPOutputBodyEncStyle)(/*[in]*/ BSTR bstrOpName, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPInputBodyEncStyle)(/*[in]*/ BSTR bstrOpName, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPOutputBodyUse)(/*[in]*/ BSTR bstrOpName, /*[out]*/ BSTR *bstrUse, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPInputBodyUse)(/*[in]*/ BSTR bstrOpName, /*[out]*/ BSTR *bstrUse, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetSOAPAddress)(/*[out]*/ BSTR *bstrHost, /*[out]*/ BSTR *bstrURI, /*[out]*/ int *nPortNbr, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetMethodNamespaceURI)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrMethodNS, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetMethodSOAPAction)(/*[in]*/ BSTR bstrMethod, /*[out]*/ BSTR *bstrSOAPAction, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(ReadServiceDesc)(/*[in]*/ BSTR bstrSvcName, /*[in]*/ BSTR bstrPortName, /*[in]*/ BSTR bstrFileURL, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOutputHeaderPartEncStyle)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetInputHeaderPartEncStyle)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetOutHeaderFaultPartEncStyle)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetInHeaderFaultPartEncStyle)(/*[in]*/ BSTR bstrOpName, /*[in]*/ BSTR bstrPartName, /*[in]*/ BSTR bstrPartNS, /*[out]*/ BSTR *bstrEncStyle, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(SOAPActionRequired)(/*[in]*/ BSTR bstrOpName, /*[out]*/ VARIANT_BOOL *bIsRequired, /*[out, retval]*/ VARIANT_BOOL *pResult);
	STDMETHOD(GetArrayTypeLit)(/*[in]*/ BSTR bstrArrayName, /*[in]*/ BSTR bstrArrayNS, /*[out]*/ BSTR *bstrItemType, /*[out]*/ BSTR *bstrItemTypeNS, /*[out]*/ BSTR *bstrItemName, /*[out]*/ BSTR *bstrItemNS, /*[out, retval]*/ VARIANT_BOOL *pResult);

private:
	WMSOAPWSDLClient	*m_pWSDLClient;
};

OBJECT_ENTRY_AUTO(__uuidof(wmwsdlclient2), CwmwsdlclientObj)
