The ServletParameter component is used to specify an input parameter name and value for use by the Transport command, which performs one of these functions: adds a document, checks in a document, or saves content. A list of ServletParameter components is passed as an input argument to the Transport command and serves as the input arguments to be used for the specified function.
coclass ServletParameter {
[default] interface IServletParameter;
};
DLL | FnAppIntCmdComponents.dll |
See Also | Transport command |
The IServletParameter interface defines one method:
Method | Description |
---|---|
Initialize | Initializes the ServletParameter component with an input parameter name and value for use by the Transport command. |
The following is a fragment from the complete example for the Transport command, which utilizes the ServletParameter component.
...
// Initialize the custom Transport command component
// with the method name and required input parameters.
_bstr_t bstrMethodName(_T("getEntryTemplates"));
const DWORD cNumElements = 2;
long lCount = 0;
COleSafeArray saParameters(VT_DISPATCH, cNumElements);
{
// Instantiate a ServletParameter component
IServletParameterPtr spIServletParameter(__uuidof(ServletParameter));
_ASSERTE(spIServletParameter != 0);
// Initialize the ServletParameter component to hold the input parameter
spIServletParameter->Initialize(_T("objectstoreid"), _T("DEV1 FS"));
saParameters.PutElement(&lCount, spIServletParameter);
}
{
lCount++;
// Instantiate a ServletParameter component
IServletParameterPtr spIServletParameter(__uuidof(ServletParameter));
_ASSERTE(spIServletParameter != 0);
// Initialize the ServletParameter component to hold the input parameter
spIServletParameter->Initialize(_T("objecttype"), _T("1"));
saParameters.PutElement(&lCount, spIServletParameter);
}
_variant_t vParameterList(saParameters);
std::cout << "Initializing the Transport command component..." << std::endl;
spITransportCmd->Initialize(bstrMethodName, vParameterList);
...