VirtualBox

source: vbox/trunk/src/VBox/Main/webservice/websrv-cpp.xsl@ 45662

Last change on this file since 45662 was 45483, checked in by vboxsync, 12 years ago

Main/glue+idl+webservice: move the type mapping XSLT include file to a central place, it is not webservice specific, and extend it slightly

  • Property svn:eol-style set to native
File size: 65.3 KB
Line 
1<?xml version="1.0"?>
2
3<!--
4 websrv-cpp.xsl:
5 XSLT stylesheet that generates methodmaps.cpp from
6 VirtualBox.xidl. This generated C++ code contains
7 all the service implementations that one would
8 normally have to implement manually to create a
9 web service; our generated code automatically maps
10 all SOAP calls into COM/XPCOM method calls.
11 See webservice/Makefile.kmk for an overview of all the things
12 generated for the webservice.
13
14 Copyright (C) 2007-2013 Oracle Corporation
15
16 This file is part of VirtualBox Open Source Edition (OSE), as
17 available from http://www.virtualbox.org. This file is free software;
18 you can redistribute it and/or modify it under the terms of the GNU
19 General Public License (GPL) as published by the Free Software
20 Foundation, in version 2 as it comes in the "COPYING" file of the
21 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
22 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
23-->
24
25<xsl:stylesheet
26 version="1.0"
27 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
29 xmlns:exsl="http://exslt.org/common"
30 extension-element-prefixes="exsl">
31
32 <xsl:output method="text"/>
33
34 <xsl:strip-space elements="*"/>
35
36<!-- - - - - - - - - - - - - - - - - - - - - - -
37 global XSLT variables
38 - - - - - - - - - - - - - - - - - - - - - - -->
39
40<xsl:variable name="G_xsltFilename" select="'websrv-cpp.xsl'" />
41
42<xsl:include href="../idl/typemap-shared.inc.xsl" />
43
44<!-- collect all interfaces with "wsmap='suppress'" in a global variable for
45 quick lookup -->
46<xsl:variable name="G_setSuppressedInterfaces"
47 select="//interface[@wsmap='suppress']" />
48
49<!-- - - - - - - - - - - - - - - - - - - - - - -
50 root match
51 - - - - - - - - - - - - - - - - - - - - - - -->
52
53<xsl:template match="/idl">
54 <xsl:text><![CDATA[
55/* DO NOT EDIT! This is a generated file.
56 * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
57 * Generator: src/VBox/Main/webservice/websrv-cpp.xsl
58 */
59
60// shared webservice header
61#include "vboxweb.h"
62
63// vbox headers
64#include <VBox/com/com.h>
65#include <VBox/com/array.h>
66#include <VBox/com/ErrorInfo.h>
67#include <VBox/com/errorprint.h>
68#include <VBox/com/EventQueue.h>
69#include <VBox/VBoxAuth.h>
70
71#include <iprt/assert.h>
72#include <iprt/initterm.h>
73#include <iprt/stream.h>
74#include <iprt/string.h>
75
76// gSOAP headers (must come after vbox includes because it checks for conflicting defs)
77#include "soapH.h"
78
79// standard headers
80#include <map>
81#include <sstream>
82
83// shared strings for debug output
84const char *g_pcszCallingComMethod = " calling COM method %s\n";
85const char *g_pcszDoneCallingComMethod = " done calling COM method\n";
86const char *g_pcszConvertComOutputBack = " convert COM output \"%s\" back to caller format\n";
87const char *g_pcszDoneConvertingComOutputBack = " done converting COM output \"%s\" back to caller format\n";
88const char *g_pcszEntering = "-- entering %s\n";
89const char *g_pcszLeaving = "-- leaving %s, rc: %#lx (%d)\n";
90
91// generated string constants for all interface names
92const char *g_pcszIUnknown = "IUnknown";
93]]></xsl:text>
94
95 <xsl:for-each select="//interface">
96 <xsl:variable name="ifname" select="@name" />
97 <xsl:value-of select="concat('const char *g_pcsz', $ifname, ' = &quot;', $ifname, '&quot;;')" />
98 <xsl:call-template name="emitNewline" />
99 </xsl:for-each>
100 <xsl:apply-templates />
101</xsl:template>
102
103<!-- - - - - - - - - - - - - - - - - - - - - - -
104 if
105 - - - - - - - - - - - - - - - - - - - - - - -->
106
107<!--
108 * ignore all |if|s except those for WSDL target
109-->
110<xsl:template match="if">
111 <xsl:if test="@target='wsdl'">
112 <xsl:apply-templates/>
113 </xsl:if>
114</xsl:template>
115
116<!-- - - - - - - - - - - - - - - - - - - - - - -
117 cpp
118 - - - - - - - - - - - - - - - - - - - - - - -->
119
120<xsl:template match="cpp">
121<!-- ignore this -->
122</xsl:template>
123
124<!-- - - - - - - - - - - - - - - - - - - - - - -
125 library
126 - - - - - - - - - - - - - - - - - - - - - - -->
127
128<xsl:template match="library">
129 <xsl:text>
130/****************************************************************************
131 *
132 * types: enum converter helper functions
133 *
134 ****************************************************************************/
135 </xsl:text>
136 <!--
137 enum converter functions at top of file
138 -->
139 <xsl:for-each select="//enum">
140 <xsl:variable name="enumname" select="@name" />
141 <!-- generate enum converter for COM-to-SOAP -->
142 <xsl:call-template name="emitNewline" />
143 <xsl:value-of select="concat('vbox__', $enumname, ' ', $G_funcPrefixOutputEnumConverter, $enumname, '(', $enumname, '_T e)')" />
144 <xsl:call-template name="emitNewline" />
145 <xsl:text>{</xsl:text>
146 <xsl:call-template name="emitNewline" />
147 <xsl:value-of select="concat(' vbox__', $enumname, ' v;')" />
148 <xsl:call-template name="emitNewline" />
149 <xsl:call-template name="emitNewline" />
150 <xsl:text> switch(e)</xsl:text>
151 <xsl:call-template name="emitNewline" />
152 <xsl:text> {</xsl:text>
153 <xsl:call-template name="emitNewline" />
154 <xsl:for-each select="const[not(@wsmap='suppress')]">
155 <xsl:variable name="enumconst" select="@name" />
156 <xsl:value-of select="concat(' case ', $enumname, '_', $enumconst, ':')" />
157 <xsl:call-template name="emitNewlineIndent8" />
158 <xsl:value-of select="concat(' v = vbox__', $enumname, '__')" />
159 <!-- escape all "_" in $enumconst -->
160 <xsl:call-template name="escapeUnderscores">
161 <xsl:with-param name="string" select="$enumconst" />
162 </xsl:call-template>
163 <xsl:value-of select="';'" />
164 <xsl:call-template name="emitNewlineIndent8" />
165 <xsl:text>break;</xsl:text>
166 <xsl:call-template name="emitNewline" />
167 </xsl:for-each>
168 <!-- Add a default case so gcc gives us a rest, esp. on darwin. -->
169 <xsl:call-template name="emitNewlineIndent8" />
170 <xsl:text>default:</xsl:text>
171 <xsl:call-template name="emitNewlineIndent8" />
172 <xsl:text> AssertMsgFailed(("e=%d\n", (int)e));</xsl:text>
173 <xsl:call-template name="emitNewlineIndent8" />
174 <xsl:value-of select="concat(' v = (vbox__', $enumname, ')0x7fffdead;')" />
175 <xsl:call-template name="emitNewlineIndent8" />
176 <xsl:text>break; </xsl:text>
177 <xsl:call-template name="emitNewline" />
178 <xsl:text> }</xsl:text>
179 <xsl:call-template name="emitNewline" />
180 <xsl:call-template name="emitNewline" />
181 <xsl:text> return v;</xsl:text>
182 <xsl:call-template name="emitNewline" />
183 <xsl:text>}</xsl:text>
184 <xsl:call-template name="emitNewline" />
185 <!-- generate enum converter for SOAP-to-COM -->
186 <xsl:call-template name="emitNewline" />
187 <xsl:value-of select="concat($enumname, '_T ', $G_funcPrefixInputEnumConverter, $enumname, '(vbox__', $enumname, ' v)')" />
188 <xsl:call-template name="emitNewline" />
189 <xsl:text>{</xsl:text>
190 <xsl:call-template name="emitNewline" />
191 <xsl:value-of select="concat(' ', $enumname, '_T e;')" />
192 <xsl:call-template name="emitNewline" />
193 <xsl:call-template name="emitNewline" />
194 <xsl:text> switch(v)</xsl:text>
195 <xsl:call-template name="emitNewline" />
196 <xsl:text> {</xsl:text>
197 <xsl:call-template name="emitNewline" />
198 <xsl:for-each select="const[not(@wsmap='suppress')]">
199 <xsl:variable name="enumconst" select="@name" />
200 <xsl:value-of select="concat(' case vbox__', $enumname, '__')" />
201 <!-- escape all "_" in $enumconst -->
202 <xsl:call-template name="escapeUnderscores">
203 <xsl:with-param name="string" select="$enumconst" />
204 </xsl:call-template>
205 <xsl:value-of select="':'" />
206 <xsl:call-template name="emitNewlineIndent8" />
207 <xsl:value-of select="concat(' e = ', $enumname, '_', $enumconst, ';')" />
208 <xsl:call-template name="emitNewlineIndent8" />
209 <xsl:text>break;</xsl:text>
210 <xsl:call-template name="emitNewline" />
211 </xsl:for-each>
212 <!-- Insert a default case so gcc gives us a rest, esp. on darwin. -->
213 <xsl:call-template name="emitNewlineIndent8" />
214 <xsl:text>default:</xsl:text>
215 <xsl:call-template name="emitNewlineIndent8" />
216 <xsl:text> AssertMsgFailed(("v=%d\n", (int)v));</xsl:text>
217 <xsl:call-template name="emitNewlineIndent8" />
218 <xsl:value-of select="concat(' e = (', $enumname, '_T)0x7fffbeef;')" />
219 <xsl:call-template name="emitNewlineIndent8" />
220 <xsl:text>break; </xsl:text>
221 <xsl:call-template name="emitNewline" />
222 <xsl:text> }</xsl:text>
223 <xsl:call-template name="emitNewline" />
224 <xsl:call-template name="emitNewline" />
225 <xsl:text> return e;</xsl:text>
226 <xsl:call-template name="emitNewline" />
227 <xsl:text>}</xsl:text>
228 <xsl:call-template name="emitNewline" />
229 </xsl:for-each>
230
231 <xsl:text>
232/****************************************************************************
233 *
234 * types: struct converter helper functions
235 *
236 ****************************************************************************/
237 </xsl:text>
238
239 <xsl:for-each select="//interface[@wsmap='struct']">
240 <xsl:variable name="structname" select="@name" />
241
242 <xsl:call-template name="emitNewline" />
243 <xsl:value-of select="concat('// ', $structname, ' converter: called from method mappers to convert data from')" />
244 <xsl:call-template name="emitNewline" />
245 <xsl:value-of select="concat('// COM interface ', $structname, ', which has wsmap=&quot;struct&quot;, to SOAP structures')" />
246 <xsl:call-template name="emitNewline" />
247 <xsl:value-of select="concat('vbox__', $structname, '* ', $G_funcPrefixOutputStructConverter, $structname, '(')" />
248 <xsl:call-template name="emitNewline" />
249 <xsl:value-of select="' struct soap *soap,'" />
250 <xsl:call-template name="emitNewline" />
251 <xsl:value-of select="' const WSDLT_ID &amp;idThis,'" />
252 <xsl:call-template name="emitNewline" />
253 <xsl:value-of select="' HRESULT &amp;rc,'" />
254 <xsl:call-template name="emitNewline" />
255 <xsl:value-of select="concat(' ComPtr&lt;', $structname, '&gt; &amp;in)')" />
256 <xsl:call-template name="emitNewline" />
257 <xsl:text>{</xsl:text>
258 <xsl:call-template name="emitNewline" />
259
260 <xsl:value-of select="concat(' vbox__', $structname, ' *resp = NULL;')" />
261 <xsl:call-template name="emitNewline" />
262
263 <xsl:call-template name="emitPrologue"><xsl:with-param name="fSkipHRESULT" select="'1'"/></xsl:call-template>
264
265 <xsl:value-of select="concat(' resp = soap_new_vbox__', $structname, '(soap, -1);')" />
266 <xsl:call-template name="emitNewline" />
267 <xsl:text> if (!in)&#10;</xsl:text>
268 <xsl:text> {&#10;</xsl:text>
269 <xsl:text> // @todo ambiguous. Problem is the MOR for the object converted to struct&#10;</xsl:text>
270 <xsl:text> RaiseSoapInvalidObjectFault(soap, "");&#10;</xsl:text>
271 <xsl:text> break;&#10;</xsl:text>
272 <xsl:text> }&#10;</xsl:text>
273 <xsl:call-template name="emitNewline" />
274
275 <xsl:for-each select="//interface[@name=$structname]/attribute">
276 <xsl:value-of select="concat(' // -- ', $structname, '.', @name)" />
277 <xsl:call-template name="emitNewline" />
278 <!-- recurse! -->
279 <xsl:call-template name="emitGetAttributeComCall">
280 <xsl:with-param name="ifname" select="$structname" />
281 <xsl:with-param name="object" select="'in'" />
282 <xsl:with-param name="attrname" select="@name" />
283 <xsl:with-param name="attrtype" select="@type" />
284 <xsl:with-param name="callerprefix" select="concat('out', '.')" />
285 </xsl:call-template>
286 <xsl:call-template name="emitNewline" />
287 </xsl:for-each>
288
289 <xsl:call-template name="emitEpilogue"><xsl:with-param name="fSkipHRESULT" select="'1'"/></xsl:call-template>
290
291 </xsl:for-each>
292
293 <xsl:apply-templates />
294</xsl:template>
295
296<!-- - - - - - - - - - - - - - - - - - - - - - -
297 class
298 - - - - - - - - - - - - - - - - - - - - - - -->
299
300<xsl:template match="module/class">
301<!-- TODO swallow for now -->
302</xsl:template>
303
304<!-- - - - - - - - - - - - - - - - - - - - - - -
305 enum
306 - - - - - - - - - - - - - - - - - - - - - - -->
307
308<xsl:template match="enum">
309</xsl:template>
310
311<!-- - - - - - - - - - - - - - - - - - - - - - -
312 const
313 - - - - - - - - - - - - - - - - - - - - - - -->
314
315<!--
316<xsl:template match="const">
317 <xsl:apply-templates />
318</xsl:template>
319-->
320
321<!-- - - - - - - - - - - - - - - - - - - - - - -
322 desc
323 - - - - - - - - - - - - - - - - - - - - - - -->
324
325<xsl:template match="desc">
326<!-- TODO swallow for now -->
327</xsl:template>
328
329<!-- - - - - - - - - - - - - - - - - - - - - - -
330 note
331 - - - - - - - - - - - - - - - - - - - - - - -->
332
333<xsl:template match="note">
334<!-- TODO -->
335 <xsl:apply-templates />
336</xsl:template>
337
338<!--
339 emitBeginOfFunctionHeader:
340-->
341
342<xsl:template name="emitBeginOfFunctionHeader">
343 <xsl:param name="ifname" />
344 <xsl:param name="method" />
345
346 <xsl:call-template name="emitNewline" />
347 <xsl:value-of select="concat('int __vbox__', $ifname, '_USCORE', $method, '(')" />
348 <xsl:call-template name="emitNewline" />
349 <xsl:text> struct soap *soap</xsl:text>
350</xsl:template>
351
352<!--
353 emitCppTypeForIDLType:
354 emits the C++ type that corresponds to the given WSDL type in $type.
355 -->
356<xsl:template name="emitCppTypeForIDLType">
357 <xsl:param name="method" />
358 <xsl:param name="type" />
359 <xsl:param name="safearray" />
360 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
361 <xsl:param name="inptr" /> <!-- whether to add INPTR to BSTR (Dmitry template magic) -->
362
363 <!-- look up C++ glue type from IDL type from table array in typemap-shared.inc.xsl -->
364 <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
365
366 <xsl:choose>
367 <xsl:when test="$type='wstring' or $type='uuid'">
368 <xsl:choose>
369 <xsl:when test="$safearray='yes'">
370 <xsl:choose>
371 <xsl:when test="$inptr='yes'">
372 <xsl:value-of select="'com::SafeArray&lt;IN_BSTR&gt;'" /> <!-- input string arrays must use IN_BSTR (see com/array.h) -->
373 </xsl:when>
374 <xsl:otherwise>
375 <xsl:value-of select="'com::SafeArray&lt;BSTR&gt;'" /> <!-- output string arrays use raw BSTR -->
376 </xsl:otherwise>
377 </xsl:choose>
378 </xsl:when>
379 <xsl:otherwise>
380 <xsl:value-of select="'com::Bstr'" />
381 </xsl:otherwise>
382 </xsl:choose>
383 </xsl:when>
384 <!-- if above lookup in table succeeded, use that type -->
385 <xsl:when test="string-length($gluetypefield)">
386 <xsl:call-template name="emitTypeOrArray">
387 <xsl:with-param name="type" select="$gluetypefield"/>
388 <xsl:with-param name="safearray" select="$safearray"/>
389 </xsl:call-template>
390 </xsl:when>
391 <xsl:when test="//enum[@name=$type]">
392 <xsl:call-template name="emitTypeOrArray">
393 <xsl:with-param name="type" select="concat($type, '_T ')"/>
394 <xsl:with-param name="safearray" select="$safearray"/>
395 </xsl:call-template>
396 </xsl:when>
397 <xsl:when test="$type='$unknown'">
398 <xsl:choose>
399 <xsl:when test="$safearray='yes'">
400 <xsl:value-of select="'com::SafeIfaceArray&lt;IUnknown&gt;'" />
401 </xsl:when>
402 <xsl:otherwise>
403 <xsl:value-of select="'ComPtr&lt;IUnknown&gt;'" />
404 </xsl:otherwise>
405 </xsl:choose>
406 </xsl:when>
407 <xsl:when test="//interface[@name=$type]">
408 <xsl:variable name="thatif" select="//interface[@name=$type]" />
409 <xsl:variable name="thatifname" select="$thatif/@name" />
410 <xsl:choose>
411 <xsl:when test="$safearray='yes'">
412 <xsl:value-of select="concat('com::SafeIfaceArray&lt;', $thatifname, '&gt;')" />
413 </xsl:when>
414 <xsl:otherwise>
415 <xsl:value-of select="concat('ComPtr&lt;', $thatifname, '&gt;')" />
416 </xsl:otherwise>
417 </xsl:choose>
418 </xsl:when>
419 <xsl:otherwise>
420 <xsl:call-template name="fatalError">
421 <xsl:with-param name="msg" select="concat('emitCppTypeForIDLType: Type &quot;', $type, '&quot; in method &quot;', $method, '&quot; is not supported.')" />
422 </xsl:call-template>
423 </xsl:otherwise>
424 </xsl:choose>
425</xsl:template>
426
427
428<!--
429 emitDocumentStyleArgStructs:
430 with WSDL "document" style only, emits those lengthy structs for
431 the input and output argument in the function header.
432-->
433<xsl:template name="emitDocumentStyleArgStructs">
434 <xsl:param name="ifname" />
435 <xsl:param name="methodname" />
436 <xsl:param name="fOutputs" /> <!-- if 1, emit output struct as well -->
437
438 <xsl:text>,</xsl:text>
439 <xsl:call-template name="emitNewline" />
440 <xsl:value-of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_requestMessageElementSuffix, ' *', $G_requestElementVarName)" />
441 <xsl:if test="$fOutputs">
442 <xsl:text>,</xsl:text>
443 <xsl:call-template name="emitNewline" />
444 <xsl:value-of select="concat(' _vbox__', $ifname, '_USCORE', $methodname, $G_responseMessageElementSuffix, ' *', $G_responseElementVarName)" />
445 <!-- <xsl:value-of select="concat(' struct ', $ifname, '__', $methodname, 'Response &amp;', $G_result)" /> -->
446 </xsl:if>
447
448</xsl:template>
449
450<!--
451 emitPrologue:
452 emits the closing ")" for the parameter list and the beginning
453 of the function body.
454 -->
455<xsl:template name="emitPrologue">
456 <xsl:text> WEBDEBUG((g_pcszEntering, __FUNCTION__));
457
458 do {</xsl:text>
459 <xsl:call-template name="emitNewline" />
460</xsl:template>
461
462<!--
463 emitEpilogue
464 -->
465<xsl:template name="emitEpilogue">
466 <xsl:param name="fSkipHRESULT" />
467
468 <xsl:text> } while (0);</xsl:text>
469 <xsl:call-template name="emitNewline" />
470 <xsl:call-template name="emitNewline" />
471 <xsl:text> WEBDEBUG((g_pcszLeaving, __FUNCTION__, rc, rc));</xsl:text>
472 <xsl:call-template name="emitNewline" />
473 <xsl:if test="not($fSkipHRESULT)">
474 <xsl:text>
475 if (FAILED(rc))
476 return SOAP_FAULT;
477 return SOAP_OK;</xsl:text>
478 </xsl:if>
479 <xsl:if test="$fSkipHRESULT">
480 <xsl:text> return resp;</xsl:text>
481 </xsl:if>
482 <xsl:call-template name="emitNewline" />
483 <xsl:text>}</xsl:text>
484 <xsl:call-template name="emitNewline" />
485</xsl:template>
486
487<!--
488 emitObjForMethod:
489 after the function prologue, emit a "pObj" object that
490 specifies the object upon which the method should be invoked.
491-->
492<xsl:template name="emitObjForMethod">
493 <xsl:param name="ifname" />
494 <xsl:param name="wsmap" />
495 <xsl:param name="structprefix" /> <!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" -->
496
497 <xsl:choose>
498 <xsl:when test="$wsmap='global'">
499 <xsl:choose>
500 <xsl:when test="$ifname='IVirtualBox'">
501 <xsl:text> // invoke method on global IVirtualBox instance</xsl:text>
502 <xsl:call-template name="emitNewlineIndent8" />
503 <xsl:text>ComPtr&lt;IVirtualBox&gt; pObj = G_pVirtualBox;</xsl:text>
504 <xsl:call-template name="emitNewline" />
505 </xsl:when>
506 <xsl:otherwise>
507 <xsl:call-template name="fatalError">
508 <xsl:with-param name="msg" select="concat('emitObjForMethod: Unknown interface &quot;', $ifname, '&quot; with wsmap=global in XIDL.')" />
509 </xsl:call-template>
510 </xsl:otherwise>
511 </xsl:choose>
512 </xsl:when>
513 <xsl:when test="($wsmap='managed')">
514 <xsl:text> // look up managed object reference for method call&#10;</xsl:text>
515 <xsl:value-of select="concat(' ComPtr&lt;', $ifname, '&gt; pObj;&#10;')" />
516 <xsl:value-of select="concat(' if (!', $G_requestElementVarName, ')&#10;')" />
517 <xsl:text> {&#10;</xsl:text>
518 <xsl:text> RaiseSoapInvalidObjectFault(soap, "");&#10;</xsl:text>
519 <xsl:text> break;&#10;</xsl:text>
520 <xsl:text> }&#10;</xsl:text>
521 <xsl:value-of select="concat(' const WSDLT_ID &amp;idThis = ', $structprefix, $G_nameObjectRefEncoded, ';&#10;')" />
522 <xsl:value-of select="' if ((rc = findComPtrFromId(soap, idThis, pObj, false)))&#10;'" />
523 <xsl:text> break;&#10;</xsl:text>
524 </xsl:when>
525 </xsl:choose>
526</xsl:template>
527
528<!--
529 emitInputArgConverter:
530 another type converter (from wsdl type to COM types),
531 that generates temporary variables on the stack with
532 the WSDL input parameters converted to the COM types,
533 so we can then pass them to the actual COM method call.
534-->
535<xsl:template name="emitInputArgConverter">
536 <xsl:param name="ifname" />
537 <xsl:param name="object" /> <!-- normally "pObj" -->
538 <xsl:param name="method" />
539 <xsl:param name="methodname" />
540 <xsl:param name="structprefix" /> <!-- with WSDL document style: req element prefix, like "vbox__IVirtualBox_USCOREcreateMachineRequestElement->" -->
541 <xsl:param name="name" />
542 <xsl:param name="type" />
543 <xsl:param name="safearray" />
544
545 <xsl:value-of select="concat(' // convert input arg ', $name, '(safearray: ', $safearray, ')')" />
546 <xsl:call-template name="emitNewlineIndent8" />
547
548 <xsl:choose>
549 <xsl:when test="$safearray='yes' and $type='octet'">
550 <xsl:value-of select="concat('com::SafeArray&lt;BYTE&gt; comcall_',$name, ';')" />
551 <xsl:call-template name="emitNewlineIndent8" />
552 <xsl:value-of select="concat('Base64DecodeByteArray(soap, ',$structprefix,$name,', ComSafeArrayAsOutParam(comcall_',$name, '), &quot;', $ifname, '::', $methodname, '&quot;, ', $object, ', COM_IIDOF(', $ifname, '));')" />
553 </xsl:when>
554
555 <xsl:when test="$safearray='yes'">
556 <xsl:value-of select="concat('size_t c', $name, ' = ', $structprefix, $name, '.size();')" />
557 <xsl:call-template name="emitNewlineIndent8" />
558 <xsl:call-template name="emitCppTypeForIDLType">
559 <xsl:with-param name="method" select="$method"/>
560 <xsl:with-param name="type" select="$type"/>
561 <xsl:with-param name="safearray" select="$safearray"/>
562 <xsl:with-param name="inptr" select="'yes'"/>
563 </xsl:call-template>
564 <xsl:value-of select="concat(' comcall_', $name, '(c', $name, ');')" />
565 <xsl:call-template name="emitNewlineIndent8" />
566 <xsl:value-of select="concat('for (size_t i = 0; i &lt; c', $name, '; ++i)')" />
567 <xsl:call-template name="emitNewlineIndent8" />
568 <xsl:value-of select="'{'" />
569 <xsl:call-template name="emitNewlineIndent8" />
570 <xsl:choose>
571 <xsl:when test="$type='$unknown'">
572 <xsl:value-of select="' ComPtr&lt;IUnknown&gt; tmpObject;'" />
573 <xsl:call-template name="emitNewlineIndent8" />
574 <xsl:value-of select="concat(' if ((rc = findComPtrFromId(soap, ', $structprefix, $name, '[i], tmpObject, true)))')" />
575 <xsl:call-template name="emitNewlineIndent8" />
576 <xsl:text> break;</xsl:text>
577 <xsl:call-template name="emitNewlineIndent8" />
578 <xsl:value-of select="concat(' IUnknown *tmpObject2(tmpObject); tmpObject2->AddRef(); comcall_', $name, '[i] = tmpObject;')" />
579 </xsl:when>
580 <xsl:when test="//interface[@name=$type]">
581 <xsl:value-of select="concat(' ComPtr&lt;', $type, '&gt; tmpObject;')" />
582 <xsl:call-template name="emitNewlineIndent8" />
583 <xsl:value-of select="concat(' if ((rc = findComPtrFromId(soap, ', $structprefix, $name, '[i], tmpObject, true)))')" />
584 <xsl:call-template name="emitNewlineIndent8" />
585 <xsl:text> break;</xsl:text>
586 <xsl:call-template name="emitNewlineIndent8" />
587 <xsl:value-of select="concat(' ', $type, ' *tmpObject2(tmpObject); tmpObject2->AddRef(); comcall_', $name, '[i] = tmpObject;')" />
588 </xsl:when>
589 <xsl:when test="$type='wstring'">
590 <xsl:value-of select="concat(' com::Bstr tmpObject(', $structprefix, $name, '[i].c_str());')" />
591 <xsl:call-template name="emitNewlineIndent8" />
592 <xsl:value-of select="' BSTR tmpObjectB;'" />
593 <xsl:call-template name="emitNewlineIndent8" />
594 <xsl:value-of select="' tmpObject.detachTo(&amp;tmpObjectB);'" />
595 <xsl:call-template name="emitNewlineIndent8" />
596 <xsl:value-of select="concat(' comcall_', $name, '[i] = tmpObjectB;')" />
597 </xsl:when>
598 <xsl:when test="$type='long'">
599 <xsl:call-template name="emitNewlineIndent8" />
600 <xsl:value-of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
601 </xsl:when>
602 <xsl:when test="$type='boolean'">
603 <xsl:call-template name="emitNewlineIndent8" />
604 <xsl:value-of select="concat(' comcall_', $name, '[i] = ', $structprefix, $name, '[i];')" />
605 </xsl:when>
606 <xsl:when test="//enum[@name=$type]">
607 <xsl:call-template name="emitNewlineIndent8" />
608 <xsl:value-of select="concat(' comcall_', $name, '[i] = ', $G_funcPrefixInputEnumConverter, $type, '(', $structprefix, $name, '[i]);')" />
609 </xsl:when>
610 <xsl:otherwise>
611 <xsl:call-template name="fatalError">
612 <xsl:with-param name="msg" select="concat('emitInputArgConverter Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not yet supported in safearrays.')" />
613 </xsl:call-template>
614 </xsl:otherwise>
615 </xsl:choose>
616 <xsl:call-template name="emitNewlineIndent8" />
617 <xsl:value-of select="'}'" />
618 <xsl:call-template name="emitNewline" />
619 </xsl:when>
620 <xsl:otherwise>
621 <xsl:call-template name="emitCppTypeForIDLType">
622 <xsl:with-param name="method" select="$method"/>
623 <xsl:with-param name="type" select="$type"/>
624 <xsl:with-param name="safearray" select="$safearray"/>
625 <xsl:with-param name="inptr" select="'yes'"/>
626 </xsl:call-template>
627 <xsl:choose>
628 <xsl:when test="$type='wstring' or $type='uuid'">
629 <xsl:value-of select="concat(' comcall_', $name, '(', $structprefix, $name, '.c_str())')" />
630 </xsl:when>
631 <xsl:when test="//enum[@name=$type]">
632 <xsl:value-of select="concat(' comcall_', $name, ' = ', $G_funcPrefixInputEnumConverter, $type, '(', $structprefix, $name, ')')" />
633 </xsl:when>
634 <xsl:when test="$type='$unknown'">
635 <xsl:value-of select="concat(' comcall_', $name, ';')" />
636 <xsl:call-template name="emitNewlineIndent8" />
637 <xsl:value-of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
638 <xsl:call-template name="emitNewlineIndent8" />
639 <xsl:text> break</xsl:text>
640 </xsl:when>
641 <xsl:when test="//interface[@name=$type]">
642 <!-- the type is one of our own interfaces: then it must have a wsmap attr -->
643 <xsl:variable name="thatif" select="//interface[@name=$type]" />
644 <xsl:variable name="wsmap" select="$thatif/@wsmap" />
645 <xsl:variable name="thatifname" select="$thatif/@name" />
646 <xsl:choose>
647 <xsl:when test="not($wsmap)">
648 <xsl:call-template name="fatalError">
649 <xsl:with-param name="msg" select="concat('emitInputArgConverter: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; lacks wsmap attribute in XIDL.')" />
650 </xsl:call-template>
651 </xsl:when>
652 <xsl:when test="($wsmap='managed')">
653 <xsl:value-of select="concat(' comcall_', $name, ';')" />
654 <xsl:call-template name="emitNewlineIndent8" />
655 <xsl:value-of select="concat('if ((rc = findComPtrFromId(soap, ', $structprefix, $name, ', comcall_', $name,', true)))')" />
656 <xsl:call-template name="emitNewlineIndent8" />
657 <xsl:text> break</xsl:text>
658 </xsl:when>
659 <xsl:otherwise>
660 <xsl:call-template name="fatalError">
661 <xsl:with-param name="msg" select="concat('emitInputArgConverter: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; has unsupported wsmap attribute value &quot;', $wsmap, '&quot; in XIDL.')" />
662 </xsl:call-template>
663 </xsl:otherwise>
664 </xsl:choose>
665 </xsl:when>
666 <xsl:otherwise>
667 <xsl:value-of select="concat(' comcall_', $name, ' = ', $structprefix, $name)" />
668 </xsl:otherwise>
669 </xsl:choose>
670 <xsl:text>;
671</xsl:text>
672 </xsl:otherwise>
673 </xsl:choose>
674
675</xsl:template>
676
677<!--
678 emitTypeOrArray
679-->
680
681<xsl:template name="emitTypeOrArray">
682 <xsl:param name="type" />
683 <xsl:param name="safearray" />
684
685 <xsl:choose>
686 <xsl:when test="$safearray='yes'">
687 <xsl:value-of select="concat('com::SafeArray&lt;', $type, '&gt;')" />
688 </xsl:when>
689 <xsl:otherwise>
690 <xsl:value-of select="$type" />
691 </xsl:otherwise>
692 </xsl:choose>
693</xsl:template>
694
695<!--
696 emitOutputArgBuffer:
697 another type converter (from wsdl type to COM types)
698 that generates a buffer variable which receives the
699 data from 'out' and 'return' parameters of the COM method call.
700-->
701<xsl:template name="emitOutputArgBuffer">
702 <xsl:param name="method" />
703 <xsl:param name="name" />
704 <xsl:param name="type" />
705 <xsl:param name="safearray" />
706 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
707
708 <xsl:text> // com output arg for </xsl:text><xsl:value-of select="concat($name, ' (safearray: ', $safearray, ')')" /><xsl:text>
709 </xsl:text>
710 <xsl:call-template name="emitCppTypeForIDLType">
711 <xsl:with-param name="method" select="$method" />
712 <xsl:with-param name="type" select="$type" />
713 <xsl:with-param name="safearray" select="$safearray" />
714 </xsl:call-template>
715 <xsl:value-of select="concat(' comcall_', $varprefix, $name, ';')" />
716 <xsl:call-template name="emitNewline" />
717</xsl:template>
718
719<!--
720 emitInParam:
721-->
722<xsl:template name="emitInParam">
723 <xsl:param name="name" />
724 <xsl:param name="type" />
725 <xsl:param name="safearray" />
726 <xsl:param name="varprefix" /> <!-- only with nested set-attribute calls -->
727
728 <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
729
730 <xsl:choose>
731 <xsl:when test="@safearray='yes'">
732 <xsl:value-of select="concat('ComSafeArrayAsInParam(', $varname, ')')" />
733 </xsl:when>
734 <xsl:otherwise>
735 <xsl:value-of select="$varname" />
736 <xsl:if test="@type='wstring' or @type='uuid'">
737 <xsl:text>.raw()</xsl:text>
738 </xsl:if>
739 </xsl:otherwise>
740 </xsl:choose>
741</xsl:template>
742
743<!--
744 emitOutParam:
745-->
746<xsl:template name="emitOutParam">
747 <xsl:param name="name" />
748 <xsl:param name="type" />
749 <xsl:param name="safearray" />
750 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
751
752 <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
753
754 <xsl:choose>
755 <xsl:when test="$safearray='yes'">
756 <xsl:value-of select="concat('ComSafeArrayAsOutParam(', $varname, ')')" />
757 </xsl:when>
758 <xsl:otherwise>
759 <xsl:choose>
760 <xsl:when test=" ($type='boolean')
761 or ($type='short')
762 or ($type='unsigned short')
763 or ($type='long')
764 or ($type='unsigned long')
765 or ($type='long long')
766 or ($type='unsigned long long')
767 or ($type='result')
768 or (//enum[@name=$type])">
769 <xsl:text>&amp;</xsl:text><xsl:value-of select="$varname" />
770 </xsl:when>
771 <xsl:otherwise>
772 <xsl:value-of select="$varname" /><xsl:text>.asOutParam()</xsl:text>
773 </xsl:otherwise>
774 </xsl:choose>
775 </xsl:otherwise>
776 </xsl:choose>
777</xsl:template>
778
779<!--
780 emitComCall:
781 emits the actual method call with the arguments.
782-->
783<xsl:template name="emitComCall">
784 <xsl:param name="ifname" />
785 <xsl:param name="object" /> <!-- normally "pObj" -->
786 <xsl:param name="methodname" />
787 <xsl:param name="attrname" /> <!-- with attributes only -->
788 <xsl:param name="attrtype" /> <!-- with attributes only -->
789 <xsl:param name="attrsafearray" /> <!-- with attributes only -->
790 <xsl:param name="attrdir" /> <!-- with attributes only: "in" or "return" -->
791 <xsl:param name="varprefix" /> <!-- only with nested get-attribute calls -->
792
793 <xsl:call-template name="emitNewlineIndent8" />
794 <xsl:value-of select="concat('WEBDEBUG((g_pcszCallingComMethod, &quot;', $methodname, '&quot;));')" />
795 <xsl:call-template name="emitNewlineIndent8" />
796 <xsl:value-of select="concat('rc = ', $object, '-&gt;', $methodname, '(')" />
797 <xsl:if test="$attrtype">
798 <xsl:choose>
799 <xsl:when test="$attrdir='in'">
800 <xsl:call-template name="emitInParam">
801 <xsl:with-param name="name" select="$attrname" />
802 <xsl:with-param name="type" select="$attrtype" />
803 <xsl:with-param name="safearray" select="$attrsafearray" />
804 <xsl:with-param name="varprefix" select="$varprefix" />
805 </xsl:call-template>
806 </xsl:when>
807 <xsl:when test="$attrdir='return'">
808 <xsl:call-template name="emitOutParam">
809 <xsl:with-param name="name" select="$attrname" />
810 <xsl:with-param name="type" select="$attrtype" />
811 <xsl:with-param name="safearray" select="$attrsafearray" />
812 <xsl:with-param name="varprefix" select="$varprefix" />
813 </xsl:call-template>
814 </xsl:when>
815 </xsl:choose>
816 </xsl:if>
817 <xsl:for-each select="param">
818 <xsl:if test="position()=1">
819 <xsl:call-template name="emitNewline" />
820 </xsl:if>
821 <xsl:if test="position() > 1">
822 <xsl:text>,</xsl:text>
823 <xsl:call-template name="emitNewline" />
824 </xsl:if>
825 <xsl:text> </xsl:text>
826 <xsl:choose>
827 <xsl:when test="@dir='in'">
828 <xsl:call-template name="emitInParam">
829 <xsl:with-param name="name" select="@name" />
830 <xsl:with-param name="type" select="@type" />
831 <xsl:with-param name="safearray" select="@safearray" />
832 <xsl:with-param name="varprefix" select="$varprefix" />
833 </xsl:call-template>
834 </xsl:when>
835 <xsl:when test="@dir='out'">
836 <xsl:call-template name="emitOutParam">
837 <xsl:with-param name="name" select="@name" />
838 <xsl:with-param name="type" select="@type" />
839 <xsl:with-param name="safearray" select="@safearray" />
840 <xsl:with-param name="varprefix" select="$varprefix" />
841 </xsl:call-template>
842 </xsl:when>
843 <xsl:when test="@dir='return'">
844 <xsl:call-template name="emitOutParam">
845 <xsl:with-param name="name" select="$G_result" />
846 <xsl:with-param name="type" select="@type" />
847 <xsl:with-param name="safearray" select="@safearray" />
848 <xsl:with-param name="varprefix" select="$varprefix" />
849 </xsl:call-template>
850 </xsl:when>
851 </xsl:choose>
852 </xsl:for-each>
853 <xsl:text>);</xsl:text>
854 <xsl:call-template name="emitNewlineIndent8" />
855 <xsl:text>if (FAILED(rc))</xsl:text>
856 <xsl:call-template name="emitNewlineIndent8" />
857 <xsl:text>{</xsl:text>
858 <xsl:call-template name="emitNewlineIndent8" />
859 <xsl:value-of select="concat(' RaiseSoapRuntimeFault(soap, &quot;', $ifname, '::', $methodname,'&quot;, rc, ', $object, ', COM_IIDOF(', $ifname, '));')" />
860 <xsl:call-template name="emitNewlineIndent8" />
861 <xsl:text> break;</xsl:text>
862 <xsl:call-template name="emitNewlineIndent8" />
863 <xsl:text>}</xsl:text>
864 <xsl:call-template name="emitNewlineIndent8" />
865 <xsl:text>WEBDEBUG((g_pcszDoneCallingComMethod));</xsl:text>
866 <xsl:call-template name="emitNewline" />
867</xsl:template>
868
869<!--
870 emitOutputArgBackConverter2: implementation details of emitOutputArgBackConverter.
871 -->
872
873<xsl:template name="emitOutputArgBackConverter2">
874 <xsl:param name="name" />
875 <xsl:param name="varname" />
876 <xsl:param name="type" />
877 <xsl:param name="callerprefix" />
878
879 <xsl:choose>
880 <xsl:when test="$type='wstring' or $type='uuid'">
881 <xsl:value-of select="concat('ConvertComString(', $varname, ')')" />
882 </xsl:when>
883 <xsl:when test="$type='boolean'">
884 <!-- the "!!" avoids a microsoft compiler warning -->
885 <xsl:value-of select="concat('!!', $varname)" />
886 </xsl:when>
887 <xsl:when test=" ($type='octet')
888 or ($type='short')
889 or ($type='unsigned short')
890 or ($type='long')
891 or ($type='unsigned long')
892 or ($type='long long')
893 or ($type='unsigned long long')
894 or ($type='result')">
895 <xsl:value-of select="$varname" />
896 </xsl:when>
897 <xsl:when test="//enum[@name=$type]">
898 <xsl:value-of select="concat($G_funcPrefixOutputEnumConverter, $type, '(', $varname, ')')" />
899 </xsl:when>
900 <xsl:when test="$type='$unknown'">
901 <xsl:value-of select="concat('createOrFindRefFromComPtr(idThis, g_pcszIUnknown, ', $varname, ')')" />
902 </xsl:when>
903 <xsl:when test="//interface[@name=$type]">
904 <!-- the type is one of our own interfaces: then it must have a wsmap attr -->
905 <xsl:variable name="thatif" select="//interface[@name=$type]" />
906 <xsl:variable name="wsmap" select="$thatif/@wsmap" />
907 <xsl:variable name="thatifname" select="$thatif/@name" />
908 <xsl:choose>
909 <xsl:when test=" ($wsmap='managed') or ($wsmap='global')">
910 <xsl:value-of select="concat('createOrFindRefFromComPtr(idThis, g_pcsz', $thatifname, ', ', $varname, ')')" />
911 </xsl:when>
912 <xsl:when test="$wsmap='struct'">
913 <!-- prevent infinite recursion -->
914 <!-- <xsl:call-template name="fatalError"><xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: attempted infinite recursion for type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $ifname, '::', $method)" /></xsl:call-template> -->
915 <xsl:if test="not($callerprefix)">
916 <xsl:value-of select="concat('/* convert COM interface to struct */ ', $G_funcPrefixOutputStructConverter, $type, '(soap, idThis, rc, ', $varname, ')')" />
917 </xsl:if>
918 </xsl:when>
919 <xsl:otherwise>
920 <xsl:call-template name="fatalError">
921 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $ifname, '::', $method, '&quot; has invalid wsmap attribute value &quot;', $wsmap, '&quot; in XIDL.')" />
922 </xsl:call-template>
923 </xsl:otherwise>
924 </xsl:choose>
925 </xsl:when>
926 <xsl:otherwise>
927 <xsl:call-template name="fatalError">
928 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter2: Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not supported.')" />
929 </xsl:call-template>
930 </xsl:otherwise>
931 </xsl:choose>
932
933</xsl:template>
934
935<!--
936 emitOutputArgBackConverter:
937 another type converter (from COM type back to WSDL)
938 which converts the output argument from the COM
939 method call back to the WSDL type passed in by the
940 caller.
941-->
942<xsl:template name="emitOutputArgBackConverter">
943 <xsl:param name="ifname" />
944 <xsl:param name="method" />
945 <xsl:param name="name" />
946 <xsl:param name="type" />
947 <xsl:param name="safearray" />
948 <xsl:param name="varprefix" /> <!-- only when called recursively from emitGetAttributeComCall -->
949 <xsl:param name="callerprefix" /> <!-- only for out params or when called recursively from emitGetAttributeComCall -->
950
951 <xsl:variable name="topname" select="$name" />
952 <xsl:variable name="varname" select="concat('comcall_', $varprefix, $name)" />
953
954 <xsl:call-template name="emitNewlineIndent8" />
955 <xsl:value-of select="concat('WEBDEBUG((g_pcszConvertComOutputBack, &quot;', $name, '&quot;));')" />
956 <xsl:call-template name="emitNewlineIndent8" />
957
958 <xsl:variable name="receiverVariable">
959 <xsl:choose>
960 <xsl:when test="(not($varprefix))">
961 <xsl:choose>
962 <xsl:when test="$callerprefix"> <!-- callerprefix set but varprefix not: then this is an out parameter :-) -->
963 <xsl:value-of select="concat($G_responseElementVarName, '-&gt;', $name)" />
964 </xsl:when>
965 <xsl:otherwise>
966 <xsl:value-of select="concat($G_responseElementVarName, '-&gt;', $G_result)" />
967 </xsl:otherwise>
968 </xsl:choose>
969 </xsl:when>
970 <xsl:otherwise>
971 <xsl:value-of select="concat($callerprefix, $G_result, '-&gt;', $name)" />
972 </xsl:otherwise>
973 </xsl:choose>
974 </xsl:variable>
975
976 <xsl:choose>
977 <xsl:when test="$safearray='yes' and $type='octet'">
978 <xsl:value-of select="concat($receiverVariable, ' = Base64EncodeByteArray(ComSafeArrayAsInParam(', $varname,'));')" />
979 <xsl:call-template name="emitNewlineIndent8" />
980 </xsl:when>
981
982 <xsl:when test="$safearray='yes'">
983 <xsl:value-of select="concat('for (size_t i = 0; i &lt; ', $varname, '.size(); ++i)')" />
984 <xsl:call-template name="emitNewlineIndent8" />
985 <xsl:value-of select="'{'" />
986 <xsl:call-template name="emitNewlineIndent8" />
987 <!-- look up C++ glue type from IDL type from table array in typemap-shared.inc.xsl -->
988 <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
989 <xsl:choose>
990 <xsl:when test="//interface[@name=$type]">
991 <xsl:value-of select="concat(' ComPtr&lt;', $type, '&gt; tmpObject(', $varname, '[i]);')" />
992 </xsl:when>
993 <xsl:when test="//enum[@name=$type]">
994 <xsl:value-of select="concat(' ', $type, '_T tmpObject(', $varname, '[i]);')" />
995 </xsl:when>
996 <xsl:when test="$type='$unknown'">
997 <xsl:value-of select="concat(' ComPtr&lt;IUnknown&gt; tmpObject(', $varname, '[i]);')" />
998 </xsl:when>
999 <xsl:when test="$type='wstring' or $type='uuid'">
1000 <xsl:value-of select="concat(' com::Bstr tmpObject(', $varname, '[i]);')" />
1001 </xsl:when>
1002 <xsl:when test="$gluetypefield">
1003 <xsl:value-of select="concat(' ', $gluetypefield, ' tmpObject(', $varname, '[i]);')" />
1004 </xsl:when>
1005 <xsl:otherwise>
1006 <xsl:call-template name="fatalError">
1007 <xsl:with-param name="msg" select="concat('emitOutputArgBackConverter (1): Type &quot;', $type, '&quot; in arg &quot;', $name, '&quot; of method &quot;', $method, '&quot; is not yet supported in safearrays.')" />
1008 </xsl:call-template>
1009
1010 </xsl:otherwise>
1011 </xsl:choose>
1012 <xsl:call-template name="emitNewlineIndent8" />
1013 <xsl:value-of select="concat(' ', $receiverVariable, '.push_back(')" />
1014 <xsl:call-template name="emitOutputArgBackConverter2">
1015 <xsl:with-param name="name" select="$name"/>
1016 <xsl:with-param name="varname" select="'tmpObject'"/>
1017 <xsl:with-param name="type" select="$type"/>
1018 <xsl:with-param name="callerprefix" select="$callerprefix"/>
1019 </xsl:call-template>
1020 <xsl:value-of select="');'" />
1021 <xsl:call-template name="emitNewlineIndent8" />
1022 <xsl:value-of select="'}'" />
1023 <xsl:call-template name="emitNewline" />
1024 </xsl:when>
1025 <xsl:otherwise>
1026 <!-- emit variable name: "resp->retval = " -->
1027 <xsl:value-of select="$receiverVariable" />
1028
1029 <xsl:value-of select="' = '" />
1030 <xsl:call-template name="emitOutputArgBackConverter2">
1031 <xsl:with-param name="name" select="$name"/>
1032 <xsl:with-param name="varname" select="$varname"/>
1033 <xsl:with-param name="type" select="$type"/>
1034 <xsl:with-param name="callerprefix" select="$callerprefix"/>
1035 </xsl:call-template>
1036 <xsl:value-of select="';'" />
1037 <xsl:call-template name="emitNewline" />
1038
1039 </xsl:otherwise>
1040 </xsl:choose>
1041
1042 <xsl:value-of select="concat(' WEBDEBUG((g_pcszDoneConvertingComOutputBack, &quot;', $name, '&quot;));')" />
1043 <xsl:call-template name="emitNewline" />
1044</xsl:template>
1045
1046<!--
1047 emitGetAttributeComCall
1048 -->
1049<xsl:template name="emitGetAttributeComCall">
1050 <xsl:param name="ifname" />
1051 <xsl:param name="object" /> <!-- normally "pObj->" -->
1052 <xsl:param name="attrname" />
1053 <xsl:param name="attrtype" />
1054 <xsl:param name="attrsafearray" />
1055 <xsl:param name="varprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1056 <xsl:param name="callerprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1057
1058 <xsl:variable name="gettername"><xsl:call-template name="makeGetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1059 <xsl:call-template name="emitOutputArgBuffer">
1060 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1061 <xsl:with-param name="method"><xsl:value-of select="$gettername" /></xsl:with-param>
1062 <xsl:with-param name="name" select="$attrname" />
1063 <xsl:with-param name="type" select="$attrtype" />
1064 <xsl:with-param name="safearray" select="$attrsafearray" />
1065 <xsl:with-param name="varprefix" select="$varprefix" />
1066 </xsl:call-template>
1067 <xsl:variable name="upperattrname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
1068 <!-- actual COM method call -->
1069 <xsl:call-template name="emitComCall">
1070 <xsl:with-param name="ifname" select="$ifname" />
1071 <xsl:with-param name="methodname" select="concat('COMGETTER(', $upperattrname, ')')" />
1072 <xsl:with-param name="object" select="$object" />
1073 <xsl:with-param name="attrname" select="$attrname" />
1074 <xsl:with-param name="attrtype" select="$attrtype" />
1075 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1076 <xsl:with-param name="attrdir" select="'return'" />
1077 <xsl:with-param name="varprefix" select="$varprefix" />
1078 </xsl:call-template>
1079 <!-- convert back the output data -->
1080 <xsl:call-template name="emitOutputArgBackConverter">
1081 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1082 <xsl:with-param name="method"><xsl:value-of select="$gettername" /></xsl:with-param>
1083 <xsl:with-param name="name" select="$attrname" />
1084 <xsl:with-param name="type" select="$attrtype" />
1085 <xsl:with-param name="safearray" select="$attrsafearray" />
1086 <xsl:with-param name="varprefix" select="$varprefix" />
1087 <xsl:with-param name="callerprefix" select="$callerprefix" />
1088 </xsl:call-template>
1089</xsl:template>
1090
1091<!--
1092 emitSetAttributeComCall
1093 -->
1094<xsl:template name="emitSetAttributeComCall">
1095 <xsl:param name="ifname" />
1096 <xsl:param name="object" /> <!-- normally "pObj->" -->
1097 <xsl:param name="attrname" />
1098 <xsl:param name="attrtype" />
1099 <xsl:param name="attrsafearray" />
1100 <xsl:param name="callerprefix" /> <!-- only when called recursively from emitOutputArgBackConverter-->
1101
1102 <xsl:variable name="settername"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1103 <xsl:variable name="upperattrname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
1104
1105 <xsl:call-template name="emitInputArgConverter">
1106 <xsl:with-param name="ifname" select="$ifname" />
1107 <xsl:with-param name="method" select="concat($ifname, '::', $settername)" />
1108 <xsl:with-param name="methodname" select="concat('COMSETTER(', $upperattrname, ')')" />
1109 <xsl:with-param name="object" select="$object" />
1110 <xsl:with-param name="name" select="$attrname" />
1111 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1112 <xsl:with-param name="type" select="$attrtype" />
1113 <xsl:with-param name="safearray" select="$attrsafearray" />
1114 </xsl:call-template>
1115 <xsl:call-template name="emitComCall">
1116 <xsl:with-param name="ifname" select="$ifname" />
1117 <xsl:with-param name="methodname" select="concat('COMSETTER(', $upperattrname, ')')" />
1118 <xsl:with-param name="object" select="$object" />
1119 <xsl:with-param name="attrname" select="$attrname" />
1120 <xsl:with-param name="attrtype" select="$attrtype" />
1121 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1122 <xsl:with-param name="attrdir" select="'in'" />
1123 </xsl:call-template>
1124</xsl:template>
1125
1126<!--
1127 emitGetAttributeMapper
1128 -->
1129<xsl:template name="emitGetAttributeMapper">
1130 <xsl:param name="ifname" />
1131 <xsl:param name="wsmap" />
1132 <xsl:param name="attrname" />
1133 <xsl:param name="attrtype" />
1134 <xsl:param name="attrreadonly" />
1135 <xsl:param name="attrsafearray" />
1136
1137 <xsl:variable name="gettername"><xsl:call-template name="makeGetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1138
1139 <xsl:call-template name="emitBeginOfFunctionHeader">
1140 <xsl:with-param name="ifname" select="$ifname" />
1141 <xsl:with-param name="method" select="$gettername" />
1142 </xsl:call-template>
1143
1144 <xsl:call-template name="emitDocumentStyleArgStructs">
1145 <xsl:with-param name="ifname" select="$ifname" />
1146 <xsl:with-param name="methodname" select="$gettername" />
1147 <xsl:with-param name="fOutputs" select="$attrtype" />
1148 </xsl:call-template>
1149
1150 <xsl:text>)</xsl:text>
1151 <xsl:call-template name="emitNewline" />
1152 <xsl:text>{</xsl:text>
1153 <xsl:call-template name="emitNewline" />
1154
1155 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1156 <xsl:call-template name="emitNewline" />
1157
1158 <xsl:call-template name="emitPrologue" />
1159
1160 <!-- actual COM method call -->
1161 <!-- <xsl:choose>
1162 array attributes/parameters are not supported yet...
1163 <xsl:when test="@array or @safearray='yes'">
1164 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for &quot;', $attrname, '&quot; because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1165 </xsl:when>
1166 <xsl:otherwise> -->
1167 <xsl:call-template name="emitObjForMethod">
1168 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1169 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1170 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1171 </xsl:call-template>
1172
1173 <xsl:call-template name="emitGetAttributeComCall">
1174 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1175 <xsl:with-param name="object" select='"pObj"' />
1176 <xsl:with-param name="attrname"><xsl:value-of select="$attrname" /></xsl:with-param>
1177 <xsl:with-param name="attrtype"><xsl:value-of select="$attrtype" /></xsl:with-param>
1178 <xsl:with-param name="attrsafearray"><xsl:value-of select="$attrsafearray" /></xsl:with-param>
1179 </xsl:call-template>
1180 <!-- </xsl:otherwise>
1181 </xsl:choose> -->
1182
1183 <xsl:call-template name="emitEpilogue" />
1184</xsl:template>
1185
1186<!--
1187 emitSetAttributeMapper:
1188 -->
1189<xsl:template name="emitSetAttributeMapper">
1190 <xsl:param name="ifname" select="$ifname" />
1191 <xsl:param name="wsmap" select="$wsmap" />
1192 <xsl:param name="attrname" select="$attrname" />
1193 <xsl:param name="attrtype" select="$attrtype" />
1194 <xsl:param name="attrreadonly" select="$attrreadonly" />
1195 <xsl:param name="attrsafearray" select="$attrsafearray" />
1196
1197 <xsl:variable name="settername"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname" /></xsl:call-template></xsl:variable>
1198
1199 <xsl:call-template name="emitBeginOfFunctionHeader">
1200 <xsl:with-param name="ifname" select="$ifname" />
1201 <xsl:with-param name="method" select="$settername" />
1202 </xsl:call-template>
1203
1204 <xsl:call-template name="emitDocumentStyleArgStructs">
1205 <xsl:with-param name="ifname" select="$ifname" />
1206 <xsl:with-param name="methodname" select="$settername" />
1207 <xsl:with-param name="fOutputs" select="1" />
1208 </xsl:call-template>
1209
1210 <xsl:text>)</xsl:text>
1211 <xsl:call-template name="emitNewline" />
1212 <xsl:text>{</xsl:text>
1213 <xsl:call-template name="emitNewline" />
1214 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1215 <xsl:value-of select="concat(concat(' NOREF(', $G_responseElementVarName),');')" />
1216 <xsl:call-template name="emitNewline" />
1217 <xsl:call-template name="emitPrologue" />
1218
1219 <!-- actual COM method call -->
1220 <!-- <xsl:choose>
1221 array attributes/parameters are not supported yet...
1222 <xsl:when test="@array or @safearray='yes'">
1223 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING ATTRIBUTE IMPLEMENTATION for &quot;', $attrname, '&quot; because it has array type. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1224 </xsl:when>
1225 <xsl:otherwise> -->
1226 <xsl:call-template name="emitObjForMethod">
1227 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1228 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1229 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1230 </xsl:call-template>
1231 <xsl:call-template name="emitSetAttributeComCall">
1232 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1233 <xsl:with-param name="object" select='"pObj"' />
1234 <xsl:with-param name="attrname"><xsl:value-of select="$attrname" /></xsl:with-param>
1235 <xsl:with-param name="attrtype"><xsl:value-of select="$attrtype" /></xsl:with-param>
1236 <xsl:with-param name="attrsafearray"><xsl:value-of select="$attrsafearray" /></xsl:with-param>
1237 </xsl:call-template>
1238 <!-- </xsl:otherwise>
1239 </xsl:choose> -->
1240
1241 <xsl:call-template name="emitEpilogue" />
1242</xsl:template>
1243
1244<!-- - - - - - - - - - - - - - - - - - - - - - -
1245 interface
1246 - - - - - - - - - - - - - - - - - - - - - - -->
1247
1248<xsl:template match="interface">
1249 <!-- remember the interface name in local variables -->
1250 <xsl:variable name="ifname"><xsl:value-of select="@name" /></xsl:variable>
1251 <xsl:variable name="wsmap"><xsl:value-of select="@wsmap" /></xsl:variable>
1252 <xsl:variable name="wscpp"><xsl:value-of select="@wscpp" /></xsl:variable>
1253
1254 <!-- we can save ourselves verifying the interface here as it's already
1255 done in the WSDL converter -->
1256
1257 <xsl:if test='not( ($wsmap="suppress") or ($wsmap="struct") or ($wscpp="hardcoded") )'>
1258 <xsl:text>
1259/****************************************************************************
1260 *
1261 * interface </xsl:text>
1262<xsl:copy-of select="$ifname" />
1263<xsl:text>
1264 *
1265 ****************************************************************************/
1266</xsl:text>
1267
1268 <!--
1269 here come the attributes
1270 -->
1271 <xsl:for-each select="attribute">
1272 <xsl:variable name="attrname"><xsl:value-of select="@name" /></xsl:variable>
1273 <xsl:variable name="attrtype"><xsl:value-of select="@type" /></xsl:variable>
1274 <xsl:variable name="attrreadonly"><xsl:value-of select="@readonly" /></xsl:variable>
1275 <xsl:variable name="attrsafearray"><xsl:value-of select="@safearray" /></xsl:variable>
1276 <xsl:call-template name="emitNewline" />
1277 <!-- skip this attribute if it has parameters of a type that has wsmap="suppress" -->
1278 <xsl:choose>
1279 <xsl:when test="( $attrtype=($G_setSuppressedInterfaces/@name) )">
1280 <xsl:value-of select="concat('// Skipping attribute ', $attrtype, ' for it is of suppressed type ', $attrtype)" />
1281 </xsl:when>
1282 <xsl:otherwise>
1283 <xsl:choose>
1284 <xsl:when test="@readonly='yes'">
1285 <xsl:value-of select="concat('// read-only attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
1286 </xsl:when>
1287 <xsl:otherwise>
1288 <xsl:value-of select="concat('// read/write attribute ', $ifname, '::', $attrname, ' of type ', $attrtype)" />
1289 </xsl:otherwise>
1290 </xsl:choose>
1291 <xsl:value-of select="concat(' (safearray: ', $attrsafearray, ')')" />
1292 <!-- emit getter method -->
1293 <xsl:call-template name="emitGetAttributeMapper">
1294 <xsl:with-param name="ifname" select="$ifname" />
1295 <xsl:with-param name="wsmap" select="$wsmap" />
1296 <xsl:with-param name="attrname" select="$attrname" />
1297 <xsl:with-param name="attrtype" select="$attrtype" />
1298 <xsl:with-param name="attrreadonly" select="$attrreadonly" />
1299 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1300 </xsl:call-template>
1301 <!-- for read-write attributes, emit setter method -->
1302 <xsl:if test="not(@readonly='yes')">
1303 <xsl:call-template name="emitSetAttributeMapper">
1304 <xsl:with-param name="ifname" select="$ifname" />
1305 <xsl:with-param name="wsmap" select="$wsmap" />
1306 <xsl:with-param name="attrname" select="$attrname" />
1307 <xsl:with-param name="attrtype" select="$attrtype" />
1308 <xsl:with-param name="attrreadonly" select="$attrreadonly" />
1309 <xsl:with-param name="attrsafearray" select="$attrsafearray" />
1310 </xsl:call-template>
1311 </xsl:if>
1312 </xsl:otherwise> <!-- not wsmap=suppress -->
1313 </xsl:choose>
1314 </xsl:for-each>
1315
1316 <!--
1317 here come the real methods
1318 -->
1319
1320 <xsl:for-each select="method">
1321 <xsl:variable name="methodname"><xsl:value-of select="@name" /></xsl:variable>
1322 <!-- method header: return value "int", method name, soap arguments -->
1323 <!-- skip this method if it has parameters of a type that has wsmap="suppress" -->
1324 <xsl:choose>
1325 <xsl:when test=" (param[@type=($G_setSuppressedInterfaces/@name)])
1326 or (param[@mod='ptr'])" >
1327 <xsl:comment><xsl:value-of select="concat('Skipping method ', $methodname, ' for it has parameters with suppressed types')" /></xsl:comment>
1328 </xsl:when>
1329 <xsl:otherwise>
1330 <xsl:variable name="fHasReturnParms" select="param[@dir='return']" />
1331 <xsl:variable name="fHasOutParms" select="param[@dir='out']" />
1332
1333 <xsl:call-template name="emitNewline" />
1334 <xsl:value-of select="concat('/* method ', $ifname, '::', $methodname, '(')" />
1335 <xsl:for-each select="param">
1336 <xsl:call-template name="emitNewline" />
1337 <xsl:value-of select="concat(' [', @dir, '] ', @type, ' ', @name)" />
1338 <xsl:if test="@safearray='yes'">
1339 <xsl:text>[]</xsl:text>
1340 </xsl:if>
1341 <xsl:if test="not(position()=last())">
1342 <xsl:text>,</xsl:text>
1343 </xsl:if>
1344 </xsl:for-each>
1345 <xsl:text>)</xsl:text>
1346 <xsl:call-template name="emitNewline" />
1347 <xsl:text> */</xsl:text>
1348
1349 <xsl:call-template name="emitBeginOfFunctionHeader">
1350 <xsl:with-param name="ifname" select="$ifname" />
1351 <xsl:with-param name="method" select="$methodname" />
1352 </xsl:call-template>
1353
1354 <xsl:call-template name="emitDocumentStyleArgStructs">
1355 <xsl:with-param name="ifname" select="$ifname" />
1356 <xsl:with-param name="methodname" select="$methodname" />
1357 <xsl:with-param name="fOutputs" select="1" />
1358 </xsl:call-template>
1359 <xsl:text>)</xsl:text>
1360 <xsl:call-template name="emitNewline" />
1361 <xsl:text>{</xsl:text>
1362 <xsl:call-template name="emitNewline" />
1363 <xsl:value-of select="' HRESULT rc = S_OK;'" />
1364 <xsl:value-of select="concat(concat(' NOREF(', $G_responseElementVarName),');')" />
1365 <xsl:call-template name="emitNewline" />
1366 <xsl:call-template name="emitPrologue" />
1367
1368 <xsl:choose>
1369 <xsl:when test="param[@array]">
1370 <xsl:call-template name="warning"><xsl:with-param name="msg" select="concat('emitComCall: SKIPPING METHOD IMPLEMENTATION for &quot;', $methodname, '&quot; because it has arguments with &quot;array&quot; types. THIS SOAP METHOD WILL NOT DO ANYTHING!')" /></xsl:call-template>
1371 </xsl:when>
1372 <xsl:otherwise>
1373 <!-- emit the object upon which to invoke the method -->
1374 <xsl:call-template name="emitObjForMethod">
1375 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1376 <xsl:with-param name="wsmap"><xsl:value-of select="$wsmap" /></xsl:with-param>
1377 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1378 </xsl:call-template>
1379 <!-- next, emit storage variables to convert the SOAP/C++ arguments to COM types -->
1380 <xsl:for-each select="param">
1381 <xsl:variable name="dir" select="@dir" />
1382 <xsl:choose>
1383 <xsl:when test="$dir='in'">
1384 <xsl:call-template name="emitInputArgConverter">
1385 <xsl:with-param name="ifname" select="$ifname" />
1386 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1387 <xsl:with-param name="methodname">
1388 <xsl:call-template name="capitalize">
1389 <xsl:with-param name="str" select="$methodname" />
1390 </xsl:call-template>
1391 </xsl:with-param>
1392 <xsl:with-param name="object" select='"pObj"' />
1393 <xsl:with-param name="structprefix" select="concat($G_requestElementVarName, '-&gt;')" />
1394 <xsl:with-param name="name" select="@name" />
1395 <xsl:with-param name="type" select="@type" />
1396 <xsl:with-param name="safearray" select="@safearray" />
1397 </xsl:call-template>
1398 </xsl:when>
1399 <xsl:when test="$dir='out'">
1400 <xsl:call-template name="emitOutputArgBuffer">
1401 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1402 <xsl:with-param name="name" select="@name" />
1403 <xsl:with-param name="type" select="@type" />
1404 <xsl:with-param name="safearray" select="@safearray" />
1405 </xsl:call-template>
1406 </xsl:when>
1407 <xsl:when test="$dir='return'">
1408 <xsl:call-template name="emitOutputArgBuffer">
1409 <xsl:with-param name="method" select="concat($ifname, '::', $methodname)" />
1410 <xsl:with-param name="name" select="$G_result" />
1411 <xsl:with-param name="type" select="@type" />
1412 <xsl:with-param name="safearray" select="@safearray" />
1413 </xsl:call-template>
1414 </xsl:when>
1415 </xsl:choose>
1416 </xsl:for-each>
1417 <!-- actual COM method call -->
1418 <xsl:call-template name="emitComCall">
1419 <xsl:with-param name="ifname" select="$ifname" />
1420 <xsl:with-param name="object" select='"pObj"' />
1421 <xsl:with-param name="methodname">
1422 <xsl:call-template name="capitalize">
1423 <xsl:with-param name="str" select="$methodname" />
1424 </xsl:call-template>
1425 </xsl:with-param>
1426 </xsl:call-template>
1427 <!-- convert back the output data -->
1428 <xsl:for-each select="param">
1429 <xsl:variable name="dir" select="@dir" />
1430 <xsl:if test="$dir='out'">
1431 <xsl:call-template name="emitOutputArgBackConverter">
1432 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1433 <xsl:with-param name="method" select="$methodname" />
1434 <xsl:with-param name="name"><xsl:value-of select="@name" /></xsl:with-param>
1435 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1436 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1437 <xsl:with-param name="callerprefix" select="'outparms.'"/>
1438 </xsl:call-template>
1439 </xsl:if>
1440 <xsl:if test="$dir='return'">
1441 <!-- return values _normally_ should convert to the input arg from the function prototype,
1442 except when there are both return and out params; in that case gsoap squeezes them all
1443 into the output args structure and the return thing is called "retval" -->
1444 <xsl:choose>
1445 <xsl:when test="$fHasOutParms">
1446 <xsl:call-template name="emitOutputArgBackConverter">
1447 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1448 <xsl:with-param name="method" select="$methodname" />
1449 <xsl:with-param name="name"><xsl:value-of select="$G_result" /></xsl:with-param>
1450 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1451 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1452 <xsl:with-param name="callerprefix" select="'outparms.'"/>
1453 </xsl:call-template>
1454 </xsl:when>
1455 <xsl:otherwise>
1456 <xsl:call-template name="emitOutputArgBackConverter">
1457 <xsl:with-param name="ifname"><xsl:value-of select="$ifname" /></xsl:with-param>
1458 <xsl:with-param name="method" select="$methodname" />
1459 <xsl:with-param name="name"><xsl:value-of select="$G_result" /></xsl:with-param>
1460 <xsl:with-param name="type"><xsl:value-of select="@type" /></xsl:with-param>
1461 <xsl:with-param name="safearray"><xsl:value-of select="@safearray" /></xsl:with-param>
1462 </xsl:call-template>
1463 </xsl:otherwise>
1464 </xsl:choose>
1465 </xsl:if>
1466 </xsl:for-each>
1467 </xsl:otherwise>
1468 </xsl:choose>
1469 <xsl:call-template name="emitEpilogue" />
1470 </xsl:otherwise>
1471 </xsl:choose>
1472 </xsl:for-each>
1473 </xsl:if>
1474
1475</xsl:template>
1476
1477
1478</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette