Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 436246 | Differences between
and this patch

Collapse All | Expand All

(-)/var/tmp/VirtualBox-4.2.4_orig/src/VBox/Main/webservice/websrv-wsdl.xsl (-39 / +39 lines)
Lines 93-98 Link Here
93
  targetNamespace="http://schemas.xmlsoap.org/wsdl/"
93
  targetNamespace="http://schemas.xmlsoap.org/wsdl/"
94
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
94
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
95
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
95
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
96
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
96
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
97
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
97
  xmlns:vbox="http://www.virtualbox.org/"
98
  xmlns:vbox="http://www.virtualbox.org/"
98
  xmlns:exsl="http://exslt.org/common"
99
  xmlns:exsl="http://exslt.org/common"
Lines 460-466 Link Here
460
  <xsl:param name="_params" />
461
  <xsl:param name="_params" />
461
  <xsl:param name="_valuetype" />       <!-- optional, for attribute setter messages -->
462
  <xsl:param name="_valuetype" />       <!-- optional, for attribute setter messages -->
462
463
463
  <message>
464
  <wsdl:message>
464
    <xsl:attribute name="name"><xsl:value-of select="concat($_ifname, $G_classSeparator, $_methodname, $G_methodRequest)" /></xsl:attribute>
465
    <xsl:attribute name="name"><xsl:value-of select="concat($_ifname, $G_classSeparator, $_methodname, $G_methodRequest)" /></xsl:attribute>
465
466
466
    <xsl:call-template name="convertTypeAndEmitPartOrElement">
467
    <xsl:call-template name="convertTypeAndEmitPartOrElement">
Lines 469-478 Link Here
469
      <xsl:with-param name="name" select="'parameters'" />
470
      <xsl:with-param name="name" select="'parameters'" />
470
      <xsl:with-param name="type" select="$G_typeIsGlobalRequestElementMarker" />
471
      <xsl:with-param name="type" select="$G_typeIsGlobalRequestElementMarker" />
471
      <xsl:with-param name="safearray" select="'no'" />
472
      <xsl:with-param name="safearray" select="'no'" />
472
      <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
473
      <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
473
      <xsl:with-param name="attrname" select="'element'" />   <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
474
      <xsl:with-param name="attrname" select="'element'" />   <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
474
    </xsl:call-template>
475
    </xsl:call-template>
475
  </message>
476
  </wsdl:message>
476
</xsl:template>
477
</xsl:template>
477
478
478
<!--
479
<!--
Lines 485-491 Link Here
485
  <xsl:param name="_params" />          <!-- set of parameter elements -->
486
  <xsl:param name="_params" />          <!-- set of parameter elements -->
486
  <xsl:param name="_resulttype" />      <!-- for attribute getter methods only -->
487
  <xsl:param name="_resulttype" />      <!-- for attribute getter methods only -->
487
488
488
  <message>
489
  <wsdl:message>
489
    <xsl:attribute name="name"><xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
490
    <xsl:attribute name="name"><xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
490
491
491
    <!-- <xsl:variable name="cOutParams" select="count($_params[@dir='out']) + count($_params[@dir='return'])" /> -->
492
    <!-- <xsl:variable name="cOutParams" select="count($_params[@dir='out']) + count($_params[@dir='return'])" /> -->
Lines 495-504 Link Here
495
      <xsl:with-param name="name" select="'parameters'" />
496
      <xsl:with-param name="name" select="'parameters'" />
496
      <xsl:with-param name="type" select="$G_typeIsGlobalResponseElementMarker" />
497
      <xsl:with-param name="type" select="$G_typeIsGlobalResponseElementMarker" />
497
      <xsl:with-param name="safearray" select="'no'" />
498
      <xsl:with-param name="safearray" select="'no'" />
498
      <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
499
      <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
499
      <xsl:with-param name="attrname" select="'element'" />   <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
500
      <xsl:with-param name="attrname" select="'element'" />   <!-- attrib of part of element: <part type=...> or <part element=...> or <element type=...> -->
500
    </xsl:call-template>
501
    </xsl:call-template>
501
  </message>
502
  </wsdl:message>
502
</xsl:template>
503
</xsl:template>
503
504
504
<!--
505
<!--
Lines 543-555 Link Here
543
    <xsl:with-param name="_methodname" select="$attrSetter" />
544
    <xsl:with-param name="_methodname" select="$attrSetter" />
544
    <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
545
    <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
545
    <xsl:with-param name="_valuetype" select="$attrtype" />
546
    <xsl:with-param name="_valuetype" select="$attrtype" />
546
    <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
547
    <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
547
  </xsl:call-template>
548
  </xsl:call-template>
548
  <xsl:call-template name="emitResultMessage">
549
  <xsl:call-template name="emitResultMessage">
549
    <xsl:with-param name="_ifname" select="$ifname" />
550
    <xsl:with-param name="_ifname" select="$ifname" />
550
    <xsl:with-param name="_methodname" select="$attrSetter" />
551
    <xsl:with-param name="_methodname" select="$attrSetter" />
551
    <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
552
    <xsl:with-param name="_params" select="/.." /> <!-- empty set -->
552
    <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
553
    <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
553
  </xsl:call-template>
554
  </xsl:call-template>
554
</xsl:template>
555
</xsl:template>
555
556
Lines 566-572 Link Here
566
567
567
  <xsl:call-template name="debugMsg"><xsl:with-param name="msg" select="concat('....emitInOutOperation ', $_ifname, '::', $_methodname)" /></xsl:call-template>
568
  <xsl:call-template name="debugMsg"><xsl:with-param name="msg" select="concat('....emitInOutOperation ', $_ifname, '::', $_methodname)" /></xsl:call-template>
568
569
569
  <operation>
570
  <wsdl:operation>
570
    <xsl:attribute name="name">
571
    <xsl:attribute name="name">
571
      <xsl:value-of select="concat($_ifname, '_', $_methodname)" />
572
      <xsl:value-of select="concat($_ifname, '_', $_methodname)" />
572
    </xsl:attribute>
573
    </xsl:attribute>
Lines 577-583 Link Here
577
        <xsl:attribute name="style"><xsl:value-of select="$G_basefmt" /></xsl:attribute>
578
        <xsl:attribute name="style"><xsl:value-of select="$G_basefmt" /></xsl:attribute>
578
      </soap:operation>
579
      </soap:operation>
579
    </xsl:if>
580
    </xsl:if>
580
    <input>
581
    <wsdl:input>
581
      <xsl:choose>
582
      <xsl:choose>
582
        <xsl:when test="$_fSoap">
583
        <xsl:when test="$_fSoap">
583
          <soap:body>
584
          <soap:body>
Lines 589-598 Link Here
589
          <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodRequest" /></xsl:attribute>
590
          <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodRequest" /></xsl:attribute>
590
        </xsl:otherwise>
591
        </xsl:otherwise>
591
      </xsl:choose>
592
      </xsl:choose>
592
    </input>
593
    </wsdl:input>
593
    <xsl:choose>
594
    <xsl:choose>
594
      <xsl:when test="$_resulttype">
595
      <xsl:when test="$_resulttype">
595
        <output>
596
        <wsdl:output>
596
          <xsl:choose>
597
          <xsl:choose>
597
            <xsl:when test="$_fSoap">
598
            <xsl:when test="$_fSoap">
598
              <soap:body>
599
              <soap:body>
Lines 604-614 Link Here
604
              <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
605
              <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
605
            </xsl:otherwise>
606
            </xsl:otherwise>
606
          </xsl:choose>
607
          </xsl:choose>
607
        </output>
608
        </wsdl:output>
608
      </xsl:when>
609
      </xsl:when>
609
      <xsl:otherwise>
610
      <xsl:otherwise>
610
        <!-- <xsl:if test="count($_params[@dir='out'] | $_params[@dir='return']) > 0"> -->
611
        <!-- <xsl:if test="count($_params[@dir='out'] | $_params[@dir='return']) > 0"> -->
611
          <output>
612
          <wsdl:output>
612
            <xsl:choose>
613
            <xsl:choose>
613
              <xsl:when test="$_fSoap">
614
              <xsl:when test="$_fSoap">
614
                <soap:body>
615
                <soap:body>
Lines 620-648 Link Here
620
                <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
621
                <xsl:attribute name="message">vbox:<xsl:copy-of select="$_ifname" /><xsl:value-of select="$G_classSeparator" /><xsl:value-of select="$_methodname" /><xsl:copy-of select="$G_methodResponse" /></xsl:attribute>
621
              </xsl:otherwise>
622
              </xsl:otherwise>
622
            </xsl:choose>
623
            </xsl:choose>
623
          </output>
624
          </wsdl:output>
624
        <!-- </xsl:if> -->
625
        <!-- </xsl:if> -->
625
      </xsl:otherwise>
626
      </xsl:otherwise>
626
    </xsl:choose>
627
    </xsl:choose>
627
    <xsl:choose>
628
    <xsl:choose>
628
      <xsl:when test="not($_fSoap)">
629
      <xsl:when test="not($_fSoap)">
629
        <fault name="InvalidObjectFault" message="vbox:InvalidObjectFaultMsg" />
630
        <wsdl:fault name="InvalidObjectFault" message="vbox:InvalidObjectFaultMsg" />
630
        <fault name="RuntimeFault" message="vbox:RuntimeFaultMsg" />
631
        <wsdl:fault name="RuntimeFault" message="vbox:RuntimeFaultMsg" />
631
      </xsl:when>
632
      </xsl:when>
632
      <xsl:otherwise>
633
      <xsl:otherwise>
633
        <fault name="InvalidObjectFault">
634
        <wsdl:fault name="InvalidObjectFault">
634
          <soap:fault name="InvalidObjectFault">
635
          <soap:fault name="InvalidObjectFault">
635
            <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
636
            <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
636
          </soap:fault>
637
          </soap:fault>
637
        </fault>
638
        </wsdl:fault>
638
        <fault name="RuntimeFault">
639
        <wsdl:fault name="RuntimeFault">
639
          <soap:fault name="RuntimeFault">
640
          <soap:fault name="RuntimeFault">
640
            <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
641
            <xsl:attribute name="use"><xsl:value-of select="$G_parmfmt" /></xsl:attribute>
641
          </soap:fault>
642
          </soap:fault>
642
        </fault>
643
        </wsdl:fault>
643
      </xsl:otherwise>
644
      </xsl:otherwise>
644
    </xsl:choose>
645
    </xsl:choose>
645
  </operation>
646
  </wsdl:operation>
646
</xsl:template>
647
</xsl:template>
647
648
648
<!--
649
<!--
Lines 742-748 Link Here
742
            <xsl:with-param name="_wsmap" select="$wsmap" />
743
            <xsl:with-param name="_wsmap" select="$wsmap" />
743
            <xsl:with-param name="_methodname" select="$methodname" />
744
            <xsl:with-param name="_methodname" select="$methodname" />
744
            <xsl:with-param name="_params" select="param" />
745
            <xsl:with-param name="_params" select="param" />
745
            <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
746
            <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
746
          </xsl:call-template>
747
          </xsl:call-template>
747
          <!-- emit a second "result" message only if the method has "out" arguments or a return value -->
748
          <!-- emit a second "result" message only if the method has "out" arguments or a return value -->
748
          <!-- <xsl:if test="(count(param[@dir='out'] | param[@dir='return']) > 0)"> -->
749
          <!-- <xsl:if test="(count(param[@dir='out'] | param[@dir='return']) > 0)"> -->
Lines 751-757 Link Here
751
              <xsl:with-param name="_wsmap" select="$wsmap" />
752
              <xsl:with-param name="_wsmap" select="$wsmap" />
752
              <xsl:with-param name="_methodname" select="@name" />
753
              <xsl:with-param name="_methodname" select="@name" />
753
              <xsl:with-param name="_params" select="param" />
754
              <xsl:with-param name="_params" select="param" />
754
              <xsl:with-param name="elname" select="'part'" /> <!-- "part" or "element" -->
755
              <xsl:with-param name="elname" select="'wsdl:part'" /> <!-- "part" or "element" -->
755
            </xsl:call-template>
756
            </xsl:call-template>
756
          <!-- </xsl:if> -->
757
          <!-- </xsl:if> -->
757
        </xsl:otherwise>
758
        </xsl:otherwise>
Lines 956-965 Link Here
956
    and emit complexTypes for all method arguments and return values.
957
    and emit complexTypes for all method arguments and return values.
957
-->
958
-->
958
<xsl:template match="library">
959
<xsl:template match="library">
959
  <definitions
960
  <wsdl:definitions
960
        name="VirtualBox"
961
        name="VirtualBox"
961
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
962
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
962
    <xsl:attribute name="xmlns">http://schemas.xmlsoap.org/wsdl/</xsl:attribute>
963
    <xsl:attribute name="targetNamespace"><xsl:value-of select="$G_targetNamespace" /></xsl:attribute>
963
    <xsl:attribute name="targetNamespace"><xsl:value-of select="$G_targetNamespace" /></xsl:attribute>
964
    <!-- at top of WSDL file, dump a <types> section with user-defined types -->
964
    <!-- at top of WSDL file, dump a <types> section with user-defined types -->
965
      <xsl:comment>
965
      <xsl:comment>
Lines 969-975 Link Here
969
  *
969
  *
970
  ******************************************************
970
  ******************************************************
971
</xsl:comment>
971
</xsl:comment>
972
    <types>
972
    <wsdl:types>
973
      <xsd:schema>
973
      <xsd:schema>
974
        <xsl:attribute name="targetNamespace"><xsl:value-of select='$G_targetNamespace' /></xsl:attribute>
974
        <xsl:attribute name="targetNamespace"><xsl:value-of select='$G_targetNamespace' /></xsl:attribute>
975
975
Lines 1193-1206 Link Here
1193
      </xsd:schema>
1193
      </xsd:schema>
1194
1194
1195
1195
1196
    </types>
1196
    </wsdl:types>
1197
1197
1198
    <message name="InvalidObjectFaultMsg">
1198
    <wsdl:message name="InvalidObjectFaultMsg">
1199
      <part name="fault" element="vbox:InvalidObjectFault" />
1199
      <wsdl:part name="fault" element="vbox:InvalidObjectFault" />
1200
    </message>
1200
    </wsdl:message>
1201
    <message name="RuntimeFaultMsg">
1201
    <wsdl:message name="RuntimeFaultMsg">
1202
      <part name="fault" element="vbox:RuntimeFault" />
1202
      <wsdl:part name="fault" element="vbox:RuntimeFault" />
1203
    </message>
1203
    </wsdl:message>
1204
1204
1205
    <xsl:comment>
1205
    <xsl:comment>
1206
  ******************************************************
1206
  ******************************************************
Lines 1241-1247 Link Here
1241
      ******************************************************
1241
      ******************************************************
1242
    </xsl:comment>
1242
    </xsl:comment>
1243
1243
1244
    <portType>
1244
    <wsdl:portType>
1245
      <xsl:attribute name="name"><xsl:copy-of select="'vbox'" /><xsl:value-of select="$G_portTypeSuffix" /></xsl:attribute>
1245
      <xsl:attribute name="name"><xsl:copy-of select="'vbox'" /><xsl:value-of select="$G_portTypeSuffix" /></xsl:attribute>
1246
1246
1247
      <xsl:for-each select="//interface">
1247
      <xsl:for-each select="//interface">
Lines 1261-1267 Link Here
1261
          </xsl:call-template>
1261
          </xsl:call-template>
1262
        </xsl:if>
1262
        </xsl:if>
1263
      </xsl:for-each>
1263
      </xsl:for-each>
1264
    </portType>
1264
    </wsdl:portType>
1265
1265
1266
    <xsl:comment>
1266
    <xsl:comment>
1267
      ******************************************************
1267
      ******************************************************
Lines 1271-1277 Link Here
1271
      ******************************************************
1271
      ******************************************************
1272
    </xsl:comment>
1272
    </xsl:comment>
1273
1273
1274
    <binding>
1274
    <wsdl:binding>
1275
      <xsl:attribute name="name"><xsl:value-of select="concat('vbox', $G_bindingSuffix)" /></xsl:attribute>
1275
      <xsl:attribute name="name"><xsl:value-of select="concat('vbox', $G_bindingSuffix)" /></xsl:attribute>
1276
      <xsl:attribute name="type"><xsl:value-of select="concat('vbox:vbox', $G_portTypeSuffix)" /></xsl:attribute>
1276
      <xsl:attribute name="type"><xsl:value-of select="concat('vbox:vbox', $G_portTypeSuffix)" /></xsl:attribute>
1277
1277
Lines 1297-1305 Link Here
1297
          </xsl:call-template>
1297
          </xsl:call-template>
1298
        </xsl:if>
1298
        </xsl:if>
1299
      </xsl:for-each>
1299
      </xsl:for-each>
1300
    </binding>
1300
    </wsdl:binding>
1301
1301
1302
  </definitions>
1302
  </wsdl:definitions>
1303
</xsl:template>
1303
</xsl:template>
1304
1304
1305
1305

Return to bug 436246