<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat('vbox__', $structname, '* ', $G_funcPrefixOutputStructConverter, $structname, '(')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' struct soap *soap,'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' const WSDLT_ID &idThis,'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' HRESULT &rc,'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' ComPtr<', $structname, '> &in)')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' vbox__', $structname, ' *resp = NULL;')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitPrologue"><
xsl:
with-
param name="fSkipHRESULT" select="'1'"/></
xsl:
call-
template>
<
xsl:
value-
of select="concat(' resp = soap_new_vbox__', $structname, '(soap, -1);')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
text> if (!in) </
xsl:
text>
<
xsl:
text> { </
xsl:
text>
<
xsl:
text> // @todo ambiguous. Problem is the MOR for the object converted to struct </
xsl:
text>
<
xsl:
text> RaiseSoapInvalidObjectFault(soap, ""); </
xsl:
text>
<
xsl:
text> break; </
xsl:
text>
<
xsl:
text> } </
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
<
xsl:
for-
each select="//interface[@name=$structname]/attribute">
<
xsl:
value-
of select="concat(' // -- ', $structname, '.', @name)" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitGetAttributeComCall">
<
xsl:
with-
param name="ifname" select="$structname" />
<
xsl:
with-
param name="object" select="'in'" />
<
xsl:
with-
param name="attrname" select="@name" />
<
xsl:
with-
param name="attrtype" select="@type" />
<
xsl:
with-
param name="callerprefix" select="concat('out', '.')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitEpilogue"><
xsl:
with-
param name="fSkipHRESULT" select="'1'"/></
xsl:
call-
template>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- TODO swallow for now --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <
xsl:
template match="enum">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <xsl:template match="const"> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <
xsl:
template match="desc">
<!-- TODO swallow for now --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <
xsl:
template match="note">
emitBeginOfFunctionHeader: <
xsl:
template name="emitBeginOfFunctionHeader">
<
xsl:
param name="ifname" />
<
xsl:
param name="method" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat('int __vbox__', $ifname, '_USCORE', $method, '(')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
text> struct soap *soap</
xsl:
text>
emits the C++ type that corresponds to the given WSDL type in $type. <
xsl:
template name="emitCppTypeForIDLType">
<
xsl:
param name="method" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
param name="varprefix" />
<!-- only with nested get-attribute calls --> <
xsl:
param name="inptr" />
<!-- whether to add INPTR to BSTR (Dmitry template magic) --> <
xsl:
variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
<
xsl:
when test="$type='wstring' or $type='uuid'">
<
xsl:
when test="$safearray='yes'">
<
xsl:
when test="$inptr='yes'">
<
xsl:
value-
of select="'com::SafeArray<IN_BSTR>'" />
<!-- input string arrays must use IN_BSTR (see com/array.h) --> <
xsl:
value-
of select="'com::SafeArray<BSTR>'" />
<!-- output string arrays use raw BSTR --> <
xsl:
value-
of select="'com::Bstr'" />
<!-- if above lookup in table succeeded, use that type --> <
xsl:
when test="string-length($gluetypefield)">
<
xsl:
call-
template name="emitTypeOrArray">
<
xsl:
with-
param name="type" select="$gluetypefield"/>
<
xsl:
with-
param name="safearray" select="$safearray"/>
<
xsl:
when test="//enum[@name=$type]">
<
xsl:
call-
template name="emitTypeOrArray">
<
xsl:
with-
param name="type" select="concat($type, '_T ')"/>
<
xsl:
with-
param name="safearray" select="$safearray"/>
<
xsl:
when test="$type='$unknown'">
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="'com::SafeIfaceArray<IUnknown>'" />
<
xsl:
value-
of select="'ComPtr<IUnknown>'" />
<
xsl:
when test="//interface[@name=$type]">
<
xsl:
variable name="thatif" select="//interface[@name=$type]" />
<
xsl:
variable name="thatifname" select="$thatif/@name" />
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="concat('com::SafeIfaceArray<', $thatifname, '>')" />
<
xsl:
value-
of select="concat('ComPtr<', $thatifname, '>')" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitCppTypeForIDLType: Type "', $type, '" in method "', $method, '" is not supported.')" />
emitDocumentStyleArgStructs: with WSDL "document" style only, emits those lengthy structs for the input and output argument in the function header. <
xsl:
template name="emitDocumentStyleArgStructs">
<
xsl:
param name="ifname" />
<
xsl:
param name="methodname" />
<
xsl:
param name="fOutputs" />
<!-- if 1, emit output struct as well --> <
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_requestMessageElementSuffix, ' *', $G_requestElementVarName)" />
<
xsl:
if test="$fOutputs">
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_responseMessageElementSuffix, ' *', $G_responseElementVarName)" />
<!-- <xsl:value-of select="concat(' struct ', $ifname, '__', $methodname, 'Response &', $G_result)" /> --> emits the closing ")" for the parameter list and the beginning <
xsl:
template name="emitPrologue">
<
xsl:
text> WEBDEBUG((g_pcszEntering, __FUNCTION__));
<
xsl:
call-
template name="emitNewline" />
<
xsl:
template name="emitEpilogue">
<
xsl:
param name="fSkipHRESULT" />
<
xsl:
text> } while (0);</
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
text> WEBDEBUG((g_pcszLeaving, __FUNCTION__, rc, rc));</
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
<
xsl:
if test="not($fSkipHRESULT)">
return SOAP_OK;</
xsl:
text>
<
xsl:
if test="$fSkipHRESULT">
<
xsl:
text> return resp;</
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
after the function prologue, emit a "pObj" object that specifies the object upon which the method should be invoked. <
xsl:
template name="emitObjForMethod">
<
xsl:
param name="ifname" />
<
xsl:
param name="wsmap" />
<
xsl:
param name="structprefix" />
<!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" --> <
xsl:
when test="$wsmap='global'">
<
xsl:
when test="$ifname='IVirtualBox'">
<
xsl:
text> // invoke method on global IVirtualBox instance</
xsl:
text>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text>ComPtr<IVirtualBox> pObj = G_pVirtualBox;</
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitObjForMethod: Unknown interface "', $ifname, '" with wsmap=global in XIDL.')" />
<
xsl:
when test="($wsmap='managed')">
<
xsl:
text> // look up managed object reference for method call </
xsl:
text>
<
xsl:
value-
of select="concat(' ComPtr<', $ifname, '> pObj; ')" />
<
xsl:
value-
of select="concat(' if (!', $G_requestElementVarName, ') ')" />
<
xsl:
text> { </
xsl:
text>
<
xsl:
text> RaiseSoapInvalidObjectFault(soap, ""); </
xsl:
text>
<
xsl:
text> break; </
xsl:
text>
<
xsl:
text> } </
xsl:
text>
<
xsl:
value-
of select="concat(' const WSDLT_ID &idThis = ', $structprefix, $G_nameObjectRefEncoded, '; ')" />
<
xsl:
value-
of select="' if ((rc = findComPtrFromId(soap, idThis, pObj, false))) '" />
<
xsl:
text> break; </
xsl:
text>
another type converter (from wsdl type to COM types), that generates temporary variables on the stack with the WSDL input parameters converted to the COM types, so we can then pass them to the actual COM method call. <
xsl:
template name="emitInputArgConverter">
<
xsl:
param name="method" />
<
xsl:
param name="structprefix" />
<!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" --> <
xsl:
param name="name" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
value-
of select="concat(' // convert input arg ', $name, '(safearray: ', $safearray, ')')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
when test="$safearray='yes' and $type='octet'">
<
xsl:
value-
of select="concat('com::SafeArray<BYTE> comcall_',$name, ';')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('Base64DecodeByteArray(',$structprefix,$name,', ComSafeArrayAsOutParam(comcall_',$name, '));')" />
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="concat('size_t c', $name, ' = ', $structprefix, $name, '.size();')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
call-
template name="emitCppTypeForIDLType">
<
xsl:
with-
param name="method" select="$method"/>
<
xsl:
with-
param name="type" select="$type"/>
<
xsl:
with-
param name="safearray" select="$safearray"/>
<
xsl:
with-
param name="inptr" select="'yes'"/>
<
xsl:
value-
of select="concat(' comcall_', $name, '(c', $name, ');')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('for (size_t i = 0; i < c', $name, '; ++i)')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="'{'" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
when test="$type='$unknown'">
<
xsl:
value-
of select="' ComPtr<IUnknown> tmpObject;'" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' if ((rc = findComPtrFromId(soap, ', $structprefix, $name, '[i], tmpObject, true)))')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text> break;</
xsl:
text>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' IUnknown *tmpObject2(tmpObject); tmpObject2->AddRef(); comcall_', $name, '[i] = tmpObject;')" />
<
xsl:
when test="//interface[@name=$type]">
<
xsl:
value-
of select="concat(' ComPtr<', $type, '> tmpObject;')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' if ((rc = findComPtrFromId(soap, ', $structprefix, $name, '[i], tmpObject, true)))')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text> break;</
xsl:
text>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' ', $type, ' *tmpObject2(tmpObject); tmpObject2->AddRef(); comcall_', $name, '[i] = tmpObject;')" />
<
xsl:
when test="$type='wstring'">
<
xsl:
value-
of select="concat(' com::Bstr tmpObject(', $structprefix, $name, '[i].c_str());')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="' BSTR tmpObjectB;'" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' comcall_', $name, '[i] = tmpObjectB;')" />
<
xsl:
when test="$type='long'">
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
<
xsl:
when test="$type='boolean'">
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
<
xsl:
when test="//enum[@name=$type]">
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' comcall_', $name, '[i] = ', $G_funcPrefixInputEnumConverter, $type, '(', $structprefix, $name, '[i]);')" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitInputArgConverter Type "', $type, '" in arg "', $name, '" of method "', $method, '" is not yet supported in safearrays.')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="'}'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitCppTypeForIDLType">
<
xsl:
with-
param name="method" select="$method"/>
<
xsl:
with-
param name="type" select="$type"/>
<
xsl:
with-
param name="safearray" select="$safearray"/>
<
xsl:
with-
param name="inptr" select="'yes'"/>
<
xsl:
when test="$type='wstring' or $type='uuid'">
<
xsl:
value-
of select="concat(' comcall_', $name, '(', $structprefix, $name, '.c_str())')" />
<
xsl:
when test="//enum[@name=$type]">
<
xsl:
value-
of select="concat(' comcall_', $name, ' = ', $G_funcPrefixInputEnumConverter, $type, '(', $structprefix, $name, ')')" />
<
xsl:
when test="$type='$unknown'">
<
xsl:
value-
of select="concat(' comcall_', $name, ';')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text> break</
xsl:
text>
<
xsl:
when test="//interface[@name=$type]">
<!-- the type is one of our own interfaces: then it must have a wsmap attr --> <
xsl:
variable name="thatif" select="//interface[@name=$type]" />
<
xsl:
variable name="wsmap" select="$thatif/@wsmap" />
<
xsl:
variable name="thatifname" select="$thatif/@name" />
<
xsl:
when test="not($wsmap)">
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitInputArgConverter: Type "', $type, '" in arg "', $name, '" of method "', $method, '" lacks wsmap attribute in XIDL.')" />
<
xsl:
when test="($wsmap='managed')">
<
xsl:
value-
of select="concat(' comcall_', $name, ';')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text> break</
xsl:
text>
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitInputArgConverter: Type "', $type, '" in arg "', $name, '" of method "', $method, '" has unsupported wsmap attribute value "', $wsmap, '" in XIDL.')" />
<
xsl:
value-
of select="concat(' comcall_', $name, ' = ', $structprefix, $name)" />
<
xsl:
template name="emitTypeOrArray">
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="concat('com::SafeArray<', $type, '>')" />
<
xsl:
value-
of select="$type" />
another type converter (from wsdl type to COM types) that generates a buffer variable which receives the data from 'out' and 'return' parameters of the COM method call. <
xsl:
template name="emitOutputArgBuffer">
<
xsl:
param name="method" />
<
xsl:
param name="name" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
param name="varprefix" />
<!-- only with nested get-attribute calls --> <
xsl:
text> // com output arg for </
xsl:
text><
xsl:
value-
of select="concat($name, ' (safearray: ', $safearray, ')')" /><
xsl:
text>
<
xsl:
call-
template name="emitCppTypeForIDLType">
<
xsl:
with-
param name="method" select="$method" />
<
xsl:
with-
param name="type" select="$type" />
<
xsl:
with-
param name="safearray" select="$safearray" />
<
xsl:
value-
of select="concat(' comcall_', $varprefix, $name, ';')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
template name="emitInParam">
<
xsl:
param name="name" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
param name="varprefix" />
<!-- only with nested set-attribute calls --> <
xsl:
variable name="varname" select="concat('comcall_', $varprefix, $name)" />
<
xsl:
when test="@safearray='yes'">
<
xsl:
value-
of select="concat('ComSafeArrayAsInParam(', $varname, ')')" />
<
xsl:
value-
of select="$varname" />
<
xsl:
if test="@type='wstring' or @type='uuid'">
<
xsl:
text>.raw()</
xsl:
text>
<
xsl:
template name="emitOutParam">
<
xsl:
param name="name" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
param name="varprefix" />
<!-- only with nested get-attribute calls --> <
xsl:
variable name="varname" select="concat('comcall_', $varprefix, $name)" />
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="concat('ComSafeArrayAsOutParam(', $varname, ')')" />
<
xsl:
when test=" ($type='boolean') or ($type='unsigned short') or ($type='unsigned long') or ($type='unsigned long long') or (//enum[@name=$type])">
<
xsl:
text>&</
xsl:
text><
xsl:
value-
of select="$varname" />
<
xsl:
value-
of select="$varname" /><
xsl:
text>.asOutParam()</
xsl:
text>
emits the actual method call with the arguments. <
xsl:
template name="emitComCall">
<
xsl:
param name="object" />
<!-- normally "pObj->" --> <
xsl:
param name="methodname" />
<
xsl:
param name="attrname" />
<!-- with attributes only --> <
xsl:
param name="attrtype" />
<!-- with attributes only --> <
xsl:
param name="attrsafearray" />
<!-- with attributes only --> <
xsl:
param name="attrdir" />
<!-- with attributes only: "in" or "return" --> <
xsl:
param name="varprefix" />
<!-- only with nested get-attribute calls --> <
xsl:
variable name="comMethodName">
<
xsl:
call-
template name="capitalize"><
xsl:
with-
param name="str" select="$methodname" /></
xsl:
call-
template>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('WEBDEBUG((g_pcszCallingComMethod, "', $comMethodName, '"));')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('rc = ', $object, '->', $comMethodName, '(')" />
<
xsl:
if test="$attrtype">
<
xsl:
when test="$attrdir='in'">
<
xsl:
call-
template name="emitInParam">
<
xsl:
with-
param name="name" select="$attrname" />
<
xsl:
with-
param name="type" select="$attrtype" />
<
xsl:
with-
param name="safearray" select="$attrsafearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
when test="$attrdir='return'">
<
xsl:
call-
template name="emitOutParam">
<
xsl:
with-
param name="name" select="$attrname" />
<
xsl:
with-
param name="type" select="$attrtype" />
<
xsl:
with-
param name="safearray" select="$attrsafearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
for-
each select="param">
<
xsl:
if test="position()=1">
<
xsl:
call-
template name="emitNewline" />
<
xsl:
if test="position() > 1">
<
xsl:
call-
template name="emitNewline" />
<
xsl:
when test="@dir='in'">
<
xsl:
call-
template name="emitInParam">
<
xsl:
with-
param name="name" select="@name" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
when test="@dir='out'">
<
xsl:
call-
template name="emitOutParam">
<
xsl:
with-
param name="name" select="@name" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
when test="@dir='return'">
<
xsl:
call-
template name="emitOutParam">
<
xsl:
with-
param name="name" select="$G_result" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text>if (FAILED(rc))</
xsl:
text>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' RaiseSoapRuntimeFault(soap, rc, ', $object, ');')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text> break;</
xsl:
text>
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
text>WEBDEBUG((g_pcszDoneCallingComMethod));</
xsl:
text>
<
xsl:
call-
template name="emitNewline" />
emitOutputArgBackConverter2: implementation details of emitOutputArgBackConverter. <
xsl:
template name="emitOutputArgBackConverter2">
<
xsl:
param name="name" />
<
xsl:
param name="varname" />
<
xsl:
param name="type" />
<
xsl:
param name="callerprefix" />
<
xsl:
when test="$type='wstring' or $type='uuid'">
<
xsl:
value-
of select="concat('ConvertComString(', $varname, ')')" />
<
xsl:
when test="$type='boolean'">
<!-- the "!!" avoids a microsoft compiler warning --> <
xsl:
value-
of select="concat('!!', $varname)" />
<
xsl:
when test=" ($type='octet') or ($type='unsigned short') or ($type='unsigned long') or ($type='unsigned long long') <
xsl:
value-
of select="$varname" />
<
xsl:
when test="//enum[@name=$type]">
<
xsl:
value-
of select="concat($G_funcPrefixOutputEnumConverter, $type, '(', $varname, ')')" />
<
xsl:
when test="$type='$unknown'">
<
xsl:
value-
of select="concat('createOrFindRefFromComPtr(idThis, g_pcszIUnknown, ', $varname, ')')" />
<
xsl:
when test="//interface[@name=$type]">
<!-- the type is one of our own interfaces: then it must have a wsmap attr --> <
xsl:
variable name="thatif" select="//interface[@name=$type]" />
<
xsl:
variable name="wsmap" select="$thatif/@wsmap" />
<
xsl:
variable name="thatifname" select="$thatif/@name" />
<
xsl:
when test=" ($wsmap='managed') or ($wsmap='global')">
<
xsl:
value-
of select="concat('createOrFindRefFromComPtr(idThis, g_pcsz', $thatifname, ', ', $varname, ')')" />
<
xsl:
when test="$wsmap='struct'">
<!-- prevent infinite recursion --> <!-- <xsl:call-template name="fatalError"><xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: attempted infinite recursion for type "', $type, '" in arg "', $name, '" of method "', $ifname, '::', $method)" /></xsl:call-template> --> <
xsl:
if test="not($callerprefix)">
<
xsl:
value-
of select="concat('/* convert COM interface to struct */ ', $G_funcPrefixOutputStructConverter, $type, '(soap, idThis, rc, ', $varname, ')')" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitOutputArgBackConverter2: Type "', $type, '" in arg "', $name, '" of method "', $ifname, '::', $method, '" has invalid wsmap attribute value "', $wsmap, '" in XIDL.')" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitOutputArgBackConverter2: Type "', $type, '" in arg "', $name, '" of method "', $method, '" is not supported.')" />
emitOutputArgBackConverter: another type converter (from COM type back to WSDL) which converts the output argument from the COM method call back to the WSDL type passed in by the <
xsl:
template name="emitOutputArgBackConverter">
<
xsl:
param name="ifname" />
<
xsl:
param name="method" />
<
xsl:
param name="name" />
<
xsl:
param name="type" />
<
xsl:
param name="safearray" />
<
xsl:
param name="varprefix" />
<!-- only when called recursively from emitGetAttributeComCall --> <
xsl:
param name="callerprefix" />
<!-- only for out params or when called recursively from emitGetAttributeComCall --> <
xsl:
variable name="topname" select="$name" />
<
xsl:
variable name="varname" select="concat('comcall_', $varprefix, $name)" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat('WEBDEBUG((g_pcszConvertComOutputBack, "', $name, '"));')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
variable name="receiverVariable">
<
xsl:
when test="(not($varprefix))">
<
xsl:
when test="$callerprefix">
<!-- callerprefix set but varprefix not: then this is an out parameter :-) --> <
xsl:
value-
of select="concat($G_responseElementVarName, '->', $name)" />
<
xsl:
value-
of select="concat($G_responseElementVarName, '->', $G_result)" />
<
xsl:
value-
of select="concat($callerprefix, $G_result, '->', $name)" />
<
xsl:
when test="$safearray='yes' and $type='octet'">
<
xsl:
value-
of select="concat($receiverVariable, ' = Base64EncodeByteArray(ComSafeArrayAsInParam(', $varname,'));')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
when test="$safearray='yes'">
<
xsl:
value-
of select="concat('for (size_t i = 0; i < ', $varname, '.size(); ++i)')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="'{'" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
<
xsl:
when test="//interface[@name=$type]">
<
xsl:
value-
of select="concat(' ComPtr<', $type, '> tmpObject(', $varname, '[i]);')" />
<
xsl:
when test="//enum[@name=$type]">
<
xsl:
value-
of select="concat(' ', $type, '_T tmpObject(', $varname, '[i]);')" />
<
xsl:
when test="$type='$unknown'">
<
xsl:
value-
of select="concat(' ComPtr<IUnknown> tmpObject(', $varname, '[i]);')" />
<
xsl:
when test="$type='wstring' or $type='uuid'">
<
xsl:
value-
of select="concat(' com::Bstr tmpObject(', $varname, '[i]);')" />
<
xsl:
when test="$gluetypefield">
<
xsl:
value-
of select="concat(' ', $gluetypefield, ' tmpObject(', $varname, '[i]);')" />
<
xsl:
call-
template name="fatalError">
<
xsl:
with-
param name="msg" select="concat('emitOutputArgBackConverter (1): Type "', $type, '" in arg "', $name, '" of method "', $method, '" is not yet supported in safearrays.')" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="concat(' ', $receiverVariable, '.push_back(')" />
<
xsl:
call-
template name="emitOutputArgBackConverter2">
<
xsl:
with-
param name="name" select="$name"/>
<
xsl:
with-
param name="varname" select="'tmpObject'"/>
<
xsl:
with-
param name="type" select="$type"/>
<
xsl:
with-
param name="callerprefix" select="$callerprefix"/>
<
xsl:
value-
of select="');'" />
<
xsl:
call-
template name="emitNewlineIndent8" />
<
xsl:
value-
of select="'}'" />
<
xsl:
call-
template name="emitNewline" />
<!-- emit variable name: "resp->retval = " --> <
xsl:
value-
of select="$receiverVariable" />
<
xsl:
value-
of select="' = '" />
<
xsl:
call-
template name="emitOutputArgBackConverter2">
<
xsl:
with-
param name="name" select="$name"/>
<
xsl:
with-
param name="varname" select="$varname"/>
<
xsl:
with-
param name="type" select="$type"/>
<
xsl:
with-
param name="callerprefix" select="$callerprefix"/>
<
xsl:
value-
of select="';'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' WEBDEBUG((g_pcszDoneConvertingComOutputBack, "', $name, '"));')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
template name="emitGetAttributeComCall">
<
xsl:
param name="ifname" />
<
xsl:
param name="object" />
<!-- normally "pObj->" --> <
xsl:
param name="attrname" />
<
xsl:
param name="attrtype" />
<
xsl:
param name="attrsafearray" />
<
xsl:
param name="varprefix" />
<!-- only when called recursively from emitOutputArgBackConverter--> <
xsl:
param name="callerprefix" />
<!-- only when called recursively from emitOutputArgBackConverter--> <
xsl:
variable name="gettername"><
xsl:
call-
template name="makeGetterName"><
xsl:
with-
param name="attrname" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<
xsl:
call-
template name="emitOutputArgBuffer">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="method"><
xsl:
value-
of select="$gettername" /></
xsl:
with-
param>
<
xsl:
with-
param name="name" select="$attrname" />
<
xsl:
with-
param name="type" select="$attrtype" />
<
xsl:
with-
param name="safearray" select="$attrsafearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
variable name="upperattrname"><
xsl:
call-
template name="capitalize"><
xsl:
with-
param name="str" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<!-- actual COM method call --> <
xsl:
call-
template name="emitComCall">
<
xsl:
with-
param name="methodname" select="concat('COMGETTER(', $upperattrname, ')')" />
<
xsl:
with-
param name="object" select="$object" />
<
xsl:
with-
param name="attrname" select="$attrname" />
<
xsl:
with-
param name="attrtype" select="$attrtype" />
<
xsl:
with-
param name="attrsafearray" select="$attrsafearray" />
<
xsl:
with-
param name="attrdir" select="'return'" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<!-- convert back the output data --> <
xsl:
call-
template name="emitOutputArgBackConverter">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="method"><
xsl:
value-
of select="$gettername" /></
xsl:
with-
param>
<
xsl:
with-
param name="name" select="$attrname" />
<
xsl:
with-
param name="type" select="$attrtype" />
<
xsl:
with-
param name="safearray" select="$attrsafearray" />
<
xsl:
with-
param name="varprefix" select="$varprefix" />
<
xsl:
with-
param name="callerprefix" select="$callerprefix" />
<
xsl:
template name="emitSetAttributeComCall">
<
xsl:
param name="ifname" />
<
xsl:
param name="object" />
<!-- normally "pObj->" --> <
xsl:
param name="attrname" />
<
xsl:
param name="attrtype" />
<
xsl:
param name="attrsafearray" />
<
xsl:
param name="callerprefix" />
<!-- only when called recursively from emitOutputArgBackConverter--> <
xsl:
variable name="settername"><
xsl:
call-
template name="makeSetterName"><
xsl:
with-
param name="attrname" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<
xsl:
variable name="upperattrname"><
xsl:
call-
template name="capitalize"><
xsl:
with-
param name="str" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<
xsl:
call-
template name="emitInputArgConverter">
<
xsl:
with-
param name="method" select="concat($ifname, '::', $settername)" />
<
xsl:
with-
param name="name" select="$attrname" />
<
xsl:
with-
param name="structprefix" select="concat($G_requestElementVarName, '->')" />
<
xsl:
with-
param name="type" select="$attrtype" />
<
xsl:
with-
param name="safearray" select="$attrsafearray" />
<
xsl:
call-
template name="emitComCall">
<
xsl:
with-
param name="methodname" select="concat('COMSETTER(', $upperattrname, ')')" />
<
xsl:
with-
param name="object" select="$object" />
<
xsl:
with-
param name="attrname" select="$attrname" />
<
xsl:
with-
param name="attrtype" select="$attrtype" />
<
xsl:
with-
param name="attrsafearray" select="$attrsafearray" />
<
xsl:
with-
param name="attrdir" select="'in'" />
<
xsl:
template name="emitGetAttributeMapper">
<
xsl:
param name="ifname" />
<
xsl:
param name="wsmap" />
<
xsl:
param name="attrname" />
<
xsl:
param name="attrtype" />
<
xsl:
param name="attrreadonly" />
<
xsl:
param name="attrsafearray" />
<
xsl:
variable name="gettername"><
xsl:
call-
template name="makeGetterName"><
xsl:
with-
param name="attrname" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<
xsl:
call-
template name="emitBeginOfFunctionHeader">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="method" select="$gettername" />
<
xsl:
call-
template name="emitDocumentStyleArgStructs">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="methodname" select="$gettername" />
<
xsl:
with-
param name="fOutputs" select="$attrtype" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' HRESULT rc = S_OK;'" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitPrologue" />
<!-- actual COM method call --> <xsl:when test="@array or @safearray='yes'"> <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for "', $attrname, '" because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template> <
xsl:
call-
template name="emitObjForMethod">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="wsmap"><
xsl:
value-
of select="$wsmap" /></
xsl:
with-
param>
<
xsl:
with-
param name="structprefix" select="concat($G_requestElementVarName, '->')" />
<
xsl:
call-
template name="emitGetAttributeComCall">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="object" select='"pObj"' />
<
xsl:
with-
param name="attrname"><
xsl:
value-
of select="$attrname" /></
xsl:
with-
param>
<
xsl:
with-
param name="attrtype"><
xsl:
value-
of select="$attrtype" /></
xsl:
with-
param>
<
xsl:
with-
param name="attrsafearray"><
xsl:
value-
of select="$attrsafearray" /></
xsl:
with-
param>
<
xsl:
call-
template name="emitEpilogue" />
<
xsl:
template name="emitSetAttributeMapper">
<
xsl:
param name="ifname" select="$ifname" />
<
xsl:
param name="wsmap" select="$wsmap" />
<
xsl:
param name="attrname" select="$attrname" />
<
xsl:
param name="attrtype" select="$attrtype" />
<
xsl:
param name="attrreadonly" select="$attrreadonly" />
<
xsl:
param name="attrsafearray" select="$attrsafearray" />
<
xsl:
variable name="settername"><
xsl:
call-
template name="makeSetterName"><
xsl:
with-
param name="attrname" select="$attrname" /></
xsl:
call-
template></
xsl:
variable>
<
xsl:
call-
template name="emitBeginOfFunctionHeader">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="method" select="$settername" />
<
xsl:
call-
template name="emitDocumentStyleArgStructs">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="methodname" select="$settername" />
<
xsl:
with-
param name="fOutputs" select="1" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' HRESULT rc = S_OK;'" />
<
xsl:
value-
of select="concat(concat(' NOREF(', $G_responseElementVarName),');')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitPrologue" />
<!-- actual COM method call --> <xsl:when test="@array or @safearray='yes'"> <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for "', $attrname, '" because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template> <
xsl:
call-
template name="emitObjForMethod">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="wsmap"><
xsl:
value-
of select="$wsmap" /></
xsl:
with-
param>
<
xsl:
with-
param name="structprefix" select="concat($G_requestElementVarName, '->')" />
<
xsl:
call-
template name="emitSetAttributeComCall">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="object" select='"pObj"' />
<
xsl:
with-
param name="attrname"><
xsl:
value-
of select="$attrname" /></
xsl:
with-
param>
<
xsl:
with-
param name="attrtype"><
xsl:
value-
of select="$attrtype" /></
xsl:
with-
param>
<
xsl:
with-
param name="attrsafearray"><
xsl:
value-
of select="$attrsafearray" /></
xsl:
with-
param>
<
xsl:
call-
template name="emitEpilogue" />
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <
xsl:
template match="interface">
<!-- remember the interface name in local variables --> <
xsl:
variable name="ifname"><
xsl:
value-
of select="@name" /></
xsl:
variable>
<
xsl:
variable name="wsmap"><
xsl:
value-
of select="@wsmap" /></
xsl:
variable>
<
xsl:
variable name="wscpp"><
xsl:
value-
of select="@wscpp" /></
xsl:
variable>
<!-- we can save ourselves verifying the interface here as it's already done in the WSDL converter --> <
xsl:
if test='not( ($wsmap="suppress") or ($wsmap="struct") or ($wscpp="hardcoded") )'>
/****************************************************************************
<
xsl:
copy-
of select="$ifname" />
****************************************************************************/
<
xsl:
for-
each select="attribute">
<
xsl:
variable name="attrname"><
xsl:
value-
of select="@name" /></
xsl:
variable>
<
xsl:
variable name="attrtype"><
xsl:
value-
of select="@type" /></
xsl:
variable>
<
xsl:
variable name="attrreadonly"><
xsl:
value-
of select="@readonly" /></
xsl:
variable>
<
xsl:
variable name="attrsafearray"><
xsl:
value-
of select="@safearray" /></
xsl:
variable>
<
xsl:
call-
template name="emitNewline" />
<!-- skip this attribute if it has parameters of a type that has wsmap="suppress" --> <
xsl:
when test="( $attrtype=($G_setSuppressedInterfaces/@name) )">
<
xsl:
value-
of select="concat('// Skipping attribute ', $attrtype, ' for it is of suppressed type ', $attrtype)" />
<
xsl:
when test="@readonly='yes'">
<
xsl:
value-
of select="concat('// read-only attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
<
xsl:
value-
of select="concat('// read/write attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
<
xsl:
value-
of select="concat(' (safearray: ', $attrsafearray, ')')" />
<!-- emit getter method --> <
xsl:
call-
template name="emitGetAttributeMapper">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="wsmap" select="$wsmap" />
<
xsl:
with-
param name="attrname" select="$attrname" />
<
xsl:
with-
param name="attrtype" select="$attrtype" />
<
xsl:
with-
param name="attrreadonly" select="$attrreadonly" />
<
xsl:
with-
param name="attrsafearray" select="$attrsafearray" />
<!-- for read-write attributes, emit setter method --> <
xsl:
if test="not(@readonly='yes')">
<
xsl:
call-
template name="emitSetAttributeMapper">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="wsmap" select="$wsmap" />
<
xsl:
with-
param name="attrname" select="$attrname" />
<
xsl:
with-
param name="attrtype" select="$attrtype" />
<
xsl:
with-
param name="attrreadonly" select="$attrreadonly" />
<
xsl:
with-
param name="attrsafearray" select="$attrsafearray" />
</
xsl:
otherwise>
<!-- not wsmap=suppress --> here come the real methods <
xsl:
for-
each select="method">
<
xsl:
variable name="methodname"><
xsl:
value-
of select="@name" /></
xsl:
variable>
<!-- method header: return value "int", method name, soap arguments --> <!-- skip this method if it has parameters of a type that has wsmap="suppress" --> <
xsl:
when test=" (param[@type=($G_setSuppressedInterfaces/@name)]) or (param[@mod='ptr'])" >
<
xsl:
comment><
xsl:
value-
of select="concat('Skipping method ', $methodname, ' for it has parameters with suppressed types')" /></
xsl:
comment>
<
xsl:
variable name="fHasReturnParms" select="param[@dir='return']" />
<
xsl:
variable name="fHasOutParms" select="param[@dir='out']" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat('/* method ', $ifname, '::', $methodname, '(')" />
<
xsl:
for-
each select="param">
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="concat(' [', @dir, '] ', @type, ' ', @name)" />
<
xsl:
if test="@safearray='yes'">
<
xsl:
if test="not(position()=last())">
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitBeginOfFunctionHeader">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="method" select="$methodname" />
<
xsl:
call-
template name="emitDocumentStyleArgStructs">
<
xsl:
with-
param name="ifname" select="$ifname" />
<
xsl:
with-
param name="methodname" select="$methodname" />
<
xsl:
with-
param name="fOutputs" select="1" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
value-
of select="' HRESULT rc = S_OK;'" />
<
xsl:
value-
of select="concat(concat(' NOREF(', $G_responseElementVarName),');')" />
<
xsl:
call-
template name="emitNewline" />
<
xsl:
call-
template name="emitPrologue" />
<
xsl:
when test="param[@array]">
<
xsl:
call-
template name="warning"><
xsl:
with-
param name="msg" select="concat('emitComCall: SKIPPING METHOD IMPLEMENTATION for "', $methodname, '" because it has arguments with "array" types. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></
xsl:
call-
template>
<!-- emit the object upon which to invoke the method --> <
xsl:
call-
template name="emitObjForMethod">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="wsmap"><
xsl:
value-
of select="$wsmap" /></
xsl:
with-
param>
<
xsl:
with-
param name="structprefix" select="concat($G_requestElementVarName, '->')" />
<!-- next, emit storage variables to convert the SOAP/C++ arguments to COM types --> <
xsl:
for-
each select="param">
<
xsl:
variable name="dir" select="@dir" />
<
xsl:
when test="$dir='in'">
<
xsl:
call-
template name="emitInputArgConverter">
<
xsl:
with-
param name="method" select="concat($ifname, '::', $methodname)" />
<
xsl:
with-
param name="structprefix" select="concat($G_requestElementVarName, '->')" />
<
xsl:
with-
param name="name" select="@name" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<
xsl:
when test="$dir='out'">
<
xsl:
call-
template name="emitOutputArgBuffer">
<
xsl:
with-
param name="method" select="concat($ifname, '::', $methodname)" />
<
xsl:
with-
param name="name" select="@name" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<
xsl:
when test="$dir='return'">
<
xsl:
call-
template name="emitOutputArgBuffer">
<
xsl:
with-
param name="method" select="concat($ifname, '::', $methodname)" />
<
xsl:
with-
param name="name" select="$G_result" />
<
xsl:
with-
param name="type" select="@type" />
<
xsl:
with-
param name="safearray" select="@safearray" />
<!-- actual COM method call --> <
xsl:
call-
template name="emitComCall">
<
xsl:
with-
param name="object" select='"pObj"' />
<
xsl:
with-
param name="methodname">
<
xsl:
call-
template name="capitalize">
<
xsl:
with-
param name="str" select="$methodname" />
<!-- convert back the output data --> <
xsl:
for-
each select="param">
<
xsl:
variable name="dir" select="@dir" />
<
xsl:
if test="$dir='out'">
<
xsl:
call-
template name="emitOutputArgBackConverter">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="method" select="$methodname" />
<
xsl:
with-
param name="name"><
xsl:
value-
of select="@name" /></
xsl:
with-
param>
<
xsl:
with-
param name="type"><
xsl:
value-
of select="@type" /></
xsl:
with-
param>
<
xsl:
with-
param name="safearray"><
xsl:
value-
of select="@safearray" /></
xsl:
with-
param>
<
xsl:
with-
param name="callerprefix" select="'outparms.'"/>
<
xsl:
if test="$dir='return'">
<!-- return values _normally_ should convert to the input arg from the function prototype, except when there are both return and out params; in that case gsoap squeezes them all into the output args structure and the return thing is called "retval" --> <
xsl:
when test="$fHasOutParms">
<
xsl:
call-
template name="emitOutputArgBackConverter">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="method" select="$methodname" />
<
xsl:
with-
param name="name"><
xsl:
value-
of select="$G_result" /></
xsl:
with-
param>
<
xsl:
with-
param name="type"><
xsl:
value-
of select="@type" /></
xsl:
with-
param>
<
xsl:
with-
param name="safearray"><
xsl:
value-
of select="@safearray" /></
xsl:
with-
param>
<
xsl:
with-
param name="callerprefix" select="'outparms.'"/>
<
xsl:
call-
template name="emitOutputArgBackConverter">
<
xsl:
with-
param name="ifname"><
xsl:
value-
of select="$ifname" /></
xsl:
with-
param>
<
xsl:
with-
param name="method" select="$methodname" />
<
xsl:
with-
param name="name"><
xsl:
value-
of select="$G_result" /></
xsl:
with-
param>
<
xsl:
with-
param name="type"><
xsl:
value-
of select="@type" /></
xsl:
with-
param>
<
xsl:
with-
param name="safearray"><
xsl:
value-
of select="@safearray" /></
xsl:
with-
param>
<
xsl:
call-
template name="emitEpilogue" />