430 lines
14 KiB
XML
430 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<wsdcodegen ConfigFileVersion="1.3">
|
|
<LayerPrefix>StockQuote</LayerPrefix>
|
|
<LayerNumber>1</LayerNumber>
|
|
<!--************************************************************-->
|
|
<!--*** WSDLS TO BE INCLUDED ***-->
|
|
<!--************************************************************-->
|
|
<Wsdl PrefixMessageStructureNames="true">
|
|
<Path>StockQuote.wsdl</Path>
|
|
</Wsdl>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** METADATA CONFIGURATION ***-->
|
|
<!--Be sure to change all default fields in ThisModelMetadata!-->
|
|
<!--All fields except <manufacturer> and <modelName> are optional.-->
|
|
<!--************************************************************-->
|
|
<ThisModelMetadata>
|
|
<Manufacturer>Microsoft Corporation</Manufacturer>
|
|
<ManufacturerURL>http://www.microsoft.com</ManufacturerURL>
|
|
<ModelName>Microsoft StockQuote Device Emulator</ModelName>
|
|
<ModelNumber>MSQDE-0001</ModelNumber>
|
|
<ModelUrl>http://www.microsoft.com</ModelUrl>
|
|
</ThisModelMetadata>
|
|
|
|
<!--Hosts built with this metadata can support all of these services.-->
|
|
<RelationshipMetadata>
|
|
<HostMetadata>
|
|
<Host>
|
|
<Types>http://example.com/stockquote/definitions/:StockQuoteDeviceType</Types>
|
|
<ServiceId>http://example.com/stockquote/definitions/StockQuoteDevice</ServiceId>
|
|
</Host>
|
|
<Hosted>
|
|
<Types>http://example.com/stockquote/definitions/:StockQuotePortType</Types>
|
|
<ServiceId>http://example.com/stockquote/definitions/StockQuotePortType0</ServiceId>
|
|
</Hosted>
|
|
</HostMetadata>
|
|
</RelationshipMetadata>
|
|
|
|
<!--This Macro will be included in all header files.-->
|
|
<Macro Name="PragmaOnce">
|
|
<![CDATA[
|
|
#pragma once
|
|
]]>
|
|
</Macro>
|
|
<!--Additionally, the predefined "DoNotModify" macro will be included in all files.-->
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** TYPES HEADER FILE ***-->
|
|
<!--This file contains forward declarations and structure definitions.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuoteTypes.h">
|
|
<Include Macro="DoNotModify" />
|
|
<Include Macro="PragmaOnce" />
|
|
<NamespaceDeclarations />
|
|
<NamespaceNameMacros />
|
|
<StructDeclarations />
|
|
<StructDefinitions />
|
|
<EnumerationValueDeclarations />
|
|
<TypeTableDeclarations />
|
|
<MessageStructureDefinitions />
|
|
<PortTypeDeclarations />
|
|
<RelationshipMetadataDeclaration />
|
|
<ThisModelMetadataDeclaration />
|
|
<HostBuilderDeclaration>
|
|
<Interface>IStockQuote</Interface>
|
|
</HostBuilderDeclaration>
|
|
<StubDeclarations>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
</StubDeclarations>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** TYPES FILE ***-->
|
|
<!--This file contains type table and operation definitions.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuoteTypes.cpp">
|
|
<Include Macro="DoNotModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuote.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuoteTypes.h</LiteralInclude>
|
|
<NamespaceDefinitions />
|
|
<TypeTableDefinitions />
|
|
<MessageTypeDefinitions />
|
|
<PortTypeDefinitions>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<StubFunction>True</StubFunction>
|
|
</PortTypeDefinitions>
|
|
<RelationshipMetadataDefinition />
|
|
<ThisModelMetadataDefinition />
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** INTERFACE IDL ***-->
|
|
<!--This file defines the interfaces for the specified services.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuote.idl">
|
|
<Include Macro="DoNotModify" />
|
|
<![CDATA[
|
|
interface IStockQuote;
|
|
interface IStockQuoteProxy;
|
|
]]>
|
|
<LiteralInclude Language="IDL">oaidl.idl</LiteralInclude>
|
|
<LiteralInclude Language="IDL">ocidl.idl</LiteralInclude>
|
|
<LiteralInclude Language="IDL">wsdattachment.idl</LiteralInclude>
|
|
<LiteralInclude Language="IDL">wsdclient.idl</LiteralInclude>
|
|
<LiteralInclude Language="IDL">wsdhost.idl</LiteralInclude>
|
|
<LiteralInclude Language="IDL">StockQuoteTypes.h</LiteralInclude>
|
|
<![CDATA[
|
|
//
|
|
// IStockQuote Interface
|
|
//
|
|
[
|
|
object,
|
|
uuid(fb368bf5-f7f0-4071-9549-d1c567c74336),
|
|
helpstring("IStockQuote Interface"),
|
|
pointer_default(unique),
|
|
restricted,
|
|
local
|
|
]
|
|
interface IStockQuote : IUnknown
|
|
{
|
|
]]>
|
|
<IdlFunctionDeclarations>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
</IdlFunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
<![CDATA[
|
|
//
|
|
// IStockQuoteProxy Interface
|
|
//
|
|
[
|
|
object,
|
|
uuid(0c22359e-f0ae-43bf-8195-11cf207318b3),
|
|
helpstring("IStockQuoteProxy Interface"),
|
|
pointer_default(unique),
|
|
restricted,
|
|
local
|
|
]
|
|
interface IStockQuoteProxy : IStockQuote
|
|
{
|
|
HRESULT Init(IWSDServiceProxy* genericProxy);
|
|
]]>
|
|
<IdlFunctionDeclarations Async="True">
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<Operation>GetLastTradePrice</Operation>
|
|
</IdlFunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** PROXY HEADER FILES ***-->
|
|
<!--This file contains declarations for proxy classes and builder functions.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuoteProxy.h">
|
|
<Include Macro="DoNotModify" />
|
|
<Include Macro="PragmaOnce" />
|
|
<![CDATA[
|
|
class CStockQuoteProxy;
|
|
]]>
|
|
<ProxyBuilderDeclarations>
|
|
<ProxyClass>CStockQuoteProxy</ProxyClass>
|
|
</ProxyBuilderDeclarations>
|
|
<![CDATA[
|
|
class CStockQuoteProxy: public IStockQuoteProxy
|
|
{
|
|
protected:
|
|
~CStockQuoteProxy();
|
|
LONG m_cRef;
|
|
IWSDServiceProxy* m_genericProxy;
|
|
|
|
public:
|
|
HRESULT STDMETHODCALLTYPE Init(IWSDServiceProxy* genericProxy);
|
|
CStockQuoteProxy();
|
|
]]>
|
|
<IUnknownDeclarations />
|
|
<FunctionDeclarations>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
</FunctionDeclarations>
|
|
<FunctionDeclarations Async="True">
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<Operation>GetLastTradePrice</Operation>
|
|
</FunctionDeclarations>
|
|
<![CDATA[
|
|
};
|
|
]]>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** PROXY FILE ***-->
|
|
<!--This file contains code for proxy classes and functions.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuoteProxy.cpp">
|
|
<Include Macro="DoNotModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuote.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuoteTypes.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuoteProxy.h</LiteralInclude>
|
|
<ProxyBuilderImplementations>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<ProxyClass>CStockQuoteProxy</ProxyClass>
|
|
</ProxyBuilderImplementations>
|
|
<![CDATA[
|
|
CStockQuoteProxy::CStockQuoteProxy() :
|
|
m_cRef(1), m_genericProxy(NULL)
|
|
{
|
|
}
|
|
|
|
CStockQuoteProxy::~CStockQuoteProxy()
|
|
{
|
|
if ( NULL != m_genericProxy )
|
|
{
|
|
m_genericProxy->Release();
|
|
m_genericProxy = NULL;
|
|
}
|
|
};
|
|
|
|
HRESULT STDMETHODCALLTYPE CStockQuoteProxy::Init(
|
|
/* [in] */ IWSDServiceProxy* pIWSDServiceProxy )
|
|
{
|
|
if( NULL == pIWSDServiceProxy )
|
|
{
|
|
return E_INVALIDARG;
|
|
}
|
|
|
|
m_genericProxy = pIWSDServiceProxy;
|
|
m_genericProxy->AddRef();
|
|
|
|
return S_OK;
|
|
}
|
|
]]>
|
|
<IUnknownDefinitions>
|
|
<ProxyClass>CStockQuoteProxy</ProxyClass>
|
|
<RefCountVar>m_cRef</RefCountVar>
|
|
<Interface>IStockQuote</Interface>
|
|
<Interface>IStockQuoteProxy</Interface>
|
|
</IUnknownDefinitions>
|
|
<ProxyFunctionImplementations>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<ProxyClass>CStockQuoteProxy</ProxyClass>
|
|
</ProxyFunctionImplementations>
|
|
<ProxyFunctionImplementations Async="True">
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<ProxyClass>CStockQuoteProxy</ProxyClass>
|
|
<Operation>GetLastTradePrice</Operation>
|
|
</ProxyFunctionImplementations>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** STUB FILE ***-->
|
|
<!--This file contains stub function code.-->
|
|
<!--************************************************************-->
|
|
<File Name="StockQuoteStub.cpp">
|
|
<Include Macro="DoNotModify" />
|
|
<LiteralInclude Language="C" Local="False">wsdapi.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuote.h</LiteralInclude>
|
|
<LiteralInclude Language="C" Local="True">StockQuoteTypes.h</LiteralInclude>
|
|
<MessageTypeDeclarations />
|
|
<HostBuilderImplementation>
|
|
<HostedService>
|
|
<ServiceId>http://example.com/stockquote/definitions/StockQuotePortType0</ServiceId>
|
|
<CodeName>StockQuotePortType</CodeName>
|
|
<Interface>IStockQuote</Interface>
|
|
</HostedService>
|
|
</HostBuilderImplementation>
|
|
<StubDefinitions>
|
|
<PortType>http://example.com/stockquote/definitions/StockQuotePortType</PortType>
|
|
<ServerClass>IStockQuote</ServerClass>
|
|
<Deallocator>WSDFreeLinkedMemory</Deallocator>
|
|
</StubDefinitions>
|
|
</File>
|
|
|
|
|
|
<!--************************************************************-->
|
|
<!--*** README FILE ***-->
|
|
<!--This file contains readme text.-->
|
|
<!---->
|
|
<!--Changes made to the contents of the metadata section of this-->
|
|
<!--configuration file will not impact the accuracy of the Readme.txt-->
|
|
<!--file, but more significant changes may render the Readme.txt file-->
|
|
<!--inaccurate.-->
|
|
<!--************************************************************-->
|
|
<File Name="Readme.txt">
|
|
<![CDATA[=== Index ====================================================================
|
|
* Quick start guide
|
|
+ Client
|
|
+ Service
|
|
+ Compiling
|
|
* Generated files
|
|
* Generated interfaces
|
|
+ Base interfaces
|
|
+ Proxy interfaces
|
|
* Generated classes
|
|
+ Proxy classes
|
|
* Generated functions
|
|
+ Proxy builder functions
|
|
+ Host builder function
|
|
+ Stub functions
|
|
* Generated structures
|
|
+ Metadata structures
|
|
+ Parameter structures
|
|
|
|
|
|
|
|
|
|
=== Quick start guide ========================================================
|
|
--- Client ---------------------------
|
|
Your client application should use one of the proxy builder functions
|
|
CreateCStockQuoteProxy() and CreateCStockQuoteProxyById(), which will instantiate
|
|
a class of type CStockQuoteProxy. These functions are defined in StockQuoteTypes.h.
|
|
|
|
Once this class has been successfully created, it may be used to
|
|
issue service commands to a host.
|
|
|
|
Use CreateCStockQuoteProxy() when only the target type is known.
|
|
Use CreateCStockQuoteProxyById() when the service ID is known.
|
|
|
|
|
|
|
|
--- Service --------------------------
|
|
To build a host application, implement the IStockQuote service interface.
|
|
Then, pass this object into the host builder function,
|
|
CreateStockQuoteHost() (see below). Lastly, call Start()
|
|
on the resulting IWSDDeviceHost object.
|
|
|
|
|
|
|
|
--- Compiling -----------------------
|
|
All generated files must be compiled together into one static library,
|
|
executable, or DLL.
|
|
|
|
The generated IDL file (StockQuote.idl) may be compiled into
|
|
C++ files with the MIDL tool. The other generated files require that
|
|
StockQuote.idl will be compiled into StockQuote.h.
|
|
|
|
|
|
|
|
|
|
=== Generated files ==========================================================
|
|
* StockQuoteTypes.h Forward-declarations and struct definitions
|
|
* StockQuoteTypes.cpp Type table and operation structure definitions
|
|
* StockQuote.idl Defines the interfaces for the specified services
|
|
* StockQuoteProxy.h Declares proxy classes and builder functions
|
|
* StockQuoteProxy.cpp Proxy class and function implementations
|
|
* StockQuoteStub.cpp Stub function code
|
|
|
|
|
|
|
|
=== Generated interfaces =====================================================
|
|
--- Base interfaces ------------------
|
|
* IStockQuote
|
|
|
|
These base interfaces are generated directly by the WSDL, and are used to
|
|
implement your service. Clients should use the extended proxy classes,
|
|
below. No eventing operations are included in these base interfaces.
|
|
|
|
Your service objects should implement these interfaces.
|
|
|
|
|
|
|
|
--- Proxy interfaces -----------------
|
|
* IStockQuoteProxy
|
|
|
|
These proxy interfaces extend the base interfaces (listed above) by adding
|
|
client-only functionality such as asynchronous service calls for two-way
|
|
operations and subscribe/unsubscribe methods for eventing operations.
|
|
|
|
These interfaces should only be implemented by the generated client proxies.
|
|
Your client code should instantiate objects that expose these interfaces
|
|
using the proxy builder functions, and should call into the exposed methods.
|
|
|
|
|
|
|
|
|
|
=== Generated classes ========================================================
|
|
--- Proxy classes --------------------
|
|
* CStockQuoteProxy
|
|
|
|
These proxy classes can be called from your application, and will issue
|
|
messages to a service. To instantiate one of these classes, use a proxy
|
|
builder function (see below).
|
|
|
|
|
|
|
|
|
|
=== Generated functions ======================================================
|
|
--- Proxy builder functions ----------
|
|
* CreateCStockQuoteProxy()
|
|
|
|
Use these functions to generate proxy classes (see above).
|
|
|
|
|
|
|
|
--- Host builder function ------------
|
|
* CreateStockQuoteHost()
|
|
|
|
Use this function to create a host and register your service(s).
|
|
|
|
|
|
--- Stub functions -------------------
|
|
These functions receive calls from WSDAPI and dispatch them into your
|
|
service object. You should not call these functions from your application.
|
|
|
|
|
|
|
|
|
|
=== Generated structures =====================================================
|
|
--- Metadata structures --------------
|
|
* WSD_HOST_METADATA hostMetadata
|
|
* WSD_THIS_MODEL_METADATA thisModelMetadata
|
|
|
|
Pass these structures to your host builder function (see above).
|
|
|
|
|
|
|
|
--- Parameter structures -------------
|
|
All parameter structures are defined inside StockQuoteTypes.h.
|
|
]]>
|
|
</File>
|
|
</wsdcodegen> |