Changeset 59486 in vbox
- Timestamp:
- Jan 26, 2016 7:38:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/websrv-python.xsl
r53932 r59486 10 10 web service API. Depends on WSDL file for actual SOAP bindings. 11 11 12 Copyright (C) 2008-201 5Oracle Corporation12 Copyright (C) 2008-2016 Oracle Corporation 13 13 14 14 This file is part of VirtualBox Open Source Edition (OSE), as … … 95 95 req._this=self.handle 96 96 val=self.mgr.getPort().<xsl:value-of select="$ifname"/>_<xsl:value-of select="$fname"/>(req) 97 <xsl:text>return 97 <xsl:text>return </xsl:text> 98 98 <xsl:call-template name="emitOutParam"> 99 99 <xsl:with-param name="ifname" select="$ifname" /> … … 101 101 <xsl:with-param name="type" select="$attrtype" /> 102 102 <xsl:with-param name="value" select="concat('val.','_returnval')" /> 103 <xsl:with-param name="safearray" select=" @safearray"/>103 <xsl:with-param name="safearray" select="$attrsafearray"/> 104 104 </xsl:call-template> 105 105 </xsl:template> … … 114 114 req=<xsl:value-of select="$ifname"/>_<xsl:value-of select="$fname"/>RequestMsg() 115 115 req._this=self.handle 116 if type(value) in [int, bool, basestring, str]: 117 req._<xsl:value-of select="$attrname"/> = value 116 <xsl:choose> 117 <xsl:when test="$attrsafearray='yes'"> 118 <xsl:text>req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value</xsl:text> 119 </xsl:when> 120 <xsl:otherwise> 121 <xsl:text>if type(value) in [int, bool, basestring, str]: 122 req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value 118 123 else: 119 req._<xsl:value-of select="$attrname"/> = value.handle 124 req._</xsl:text><xsl:value-of select="$attrname"/><xsl:text> = value.handle</xsl:text> 125 </xsl:otherwise> 126 </xsl:choose> 120 127 self.mgr.getPort().<xsl:value-of select="$ifname"/>_<xsl:value-of select="$fname"/>(req) 121 128 </xsl:template> … … 241 248 <xsl:variable name="attrtype"><xsl:value-of select="@type" /></xsl:variable> 242 249 <xsl:variable name="attrreadonly"><xsl:value-of select="@readonly" /></xsl:variable> 250 <xsl:variable name="attrsafearray"><xsl:value-of select="@safearray" /></xsl:variable> 243 251 <!-- skip this attribute if it has parameters of a type that has wsmap="suppress" --> 244 252 <xsl:choose> … … 260 268 <xsl:with-param name="attrname" select="$attrname" /> 261 269 <xsl:with-param name="attrtype" select="$attrtype" /> 270 <xsl:with-param name="attrsafearray" select="$attrsafearray" /> 262 271 </xsl:call-template> 263 272 <!-- bb) emit a set method if the attribute is read/write --> … … 267 276 <xsl:with-param name="attrname" select="$attrname" /> 268 277 <xsl:with-param name="attrtype" select="$attrtype" /> 278 <xsl:with-param name="attrsafearray" select="$attrsafearray" /> 269 279 </xsl:call-template> 270 280 </xsl:if> … … 468 478 469 479 <xsl:template match="/"> 470 <xsl:text># Copyright (C) 2008-201 5Oracle Corporation480 <xsl:text># Copyright (C) 2008-2016 Oracle Corporation 471 481 # 472 482 # This file is part of a free software library; you can redistribute
Note:
See TracChangeset
for help on using the changeset viewer.