1 | <?xml version="1.0"?>
|
---|
2 |
|
---|
3 | <!--
|
---|
4 | websrv-wsdl.xsl:
|
---|
5 | XSLT stylesheet that generates vboxwebService.wsdl from
|
---|
6 | VirtualBox.xidl. That extra WSDL file includes the big
|
---|
7 | vboxweb.wsdl file and adds a "service" section.
|
---|
8 | See webservice/Makefile.kmk for an overview of all the things
|
---|
9 | generated for the webservice.
|
---|
10 | -->
|
---|
11 | <!--
|
---|
12 | Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
13 |
|
---|
14 | This file is part of VirtualBox base platform packages, as
|
---|
15 | available from https://www.virtualbox.org.
|
---|
16 |
|
---|
17 | This program is free software; you can redistribute it and/or
|
---|
18 | modify it under the terms of the GNU General Public License
|
---|
19 | as published by the Free Software Foundation, in version 3 of the
|
---|
20 | License.
|
---|
21 |
|
---|
22 | This program is distributed in the hope that it will be useful, but
|
---|
23 | WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
25 | General Public License for more details.
|
---|
26 |
|
---|
27 | You should have received a copy of the GNU General Public License
|
---|
28 | along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
29 |
|
---|
30 | SPDX-License-Identifier: GPL-3.0-only
|
---|
31 | -->
|
---|
32 |
|
---|
33 | <xsl:stylesheet
|
---|
34 | version="1.0"
|
---|
35 | targetNamespace="http://schemas.xmlsoap.org/wsdl/"
|
---|
36 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
37 | xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
---|
38 |
|
---|
39 | <xsl:param name="G_argDebug" />
|
---|
40 |
|
---|
41 | <xsl:output
|
---|
42 | method="xml"
|
---|
43 | version="1.0"
|
---|
44 | encoding="utf-8"
|
---|
45 | indent="yes"/>
|
---|
46 |
|
---|
47 | <xsl:strip-space
|
---|
48 | elements="*" />
|
---|
49 |
|
---|
50 | <!--**********************************************************************
|
---|
51 | *
|
---|
52 | * global XSLT variables
|
---|
53 | *
|
---|
54 | **********************************************************************-->
|
---|
55 |
|
---|
56 | <xsl:variable name="G_xsltFilename" select="'websrv-wsdl-service.xsl'" />
|
---|
57 |
|
---|
58 | <xsl:include href="../idl/typemap-shared.inc.xsl" />
|
---|
59 |
|
---|
60 | <!-- collect all interfaces with "wsmap='suppress'" in a global variable for
|
---|
61 | quick lookup -->
|
---|
62 | <xsl:variable name="G_setSuppressedInterfaces"
|
---|
63 | select="//interface[@wsmap='suppress']" />
|
---|
64 |
|
---|
65 | <!--**********************************************************************
|
---|
66 | *
|
---|
67 | * shared helpers
|
---|
68 | *
|
---|
69 | **********************************************************************-->
|
---|
70 |
|
---|
71 |
|
---|
72 | <!--**********************************************************************
|
---|
73 | *
|
---|
74 | * matches
|
---|
75 | *
|
---|
76 | **********************************************************************-->
|
---|
77 |
|
---|
78 | <!--
|
---|
79 | A WSDL document describes a web service using these major elements:
|
---|
80 | Element Defines
|
---|
81 | <portType> The operations performed by the web service. A portType can be thought
|
---|
82 | of as a class.
|
---|
83 | <message> The messages used by the web service. A message is a function call
|
---|
84 | and with it come "parts", which are the parameters.
|
---|
85 | <types> The data types used by the web service, described in XML Schema
|
---|
86 | syntax.
|
---|
87 | <binding> The communication protocols used by the web service.
|
---|
88 |
|
---|
89 | The root tag is <definitions>.
|
---|
90 |
|
---|
91 | -->
|
---|
92 |
|
---|
93 | <xsl:template match="/idl">
|
---|
94 | <xsl:comment>
|
---|
95 | DO NOT EDIT! This is a generated file.
|
---|
96 | Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's generic pseudo-IDL file)
|
---|
97 | Generator: src/VBox/Main/webservice/websrv-wsdl-service.xsl
|
---|
98 | </xsl:comment>
|
---|
99 | <xsl:apply-templates />
|
---|
100 | </xsl:template>
|
---|
101 |
|
---|
102 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
103 | if
|
---|
104 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
105 |
|
---|
106 | <!--
|
---|
107 | * ignore all |if|s except those for WSDL target
|
---|
108 | -->
|
---|
109 | <xsl:template match="if">
|
---|
110 | <xsl:if test="@target='wsdl'">
|
---|
111 | <xsl:apply-templates/>
|
---|
112 | </xsl:if>
|
---|
113 | </xsl:template>
|
---|
114 |
|
---|
115 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
116 | cpp
|
---|
117 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
118 |
|
---|
119 | <xsl:template match="cpp">
|
---|
120 | <!-- ignore this -->
|
---|
121 | </xsl:template>
|
---|
122 |
|
---|
123 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
124 | library
|
---|
125 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
126 |
|
---|
127 | <!--
|
---|
128 | "library" match: we use this to emit most of the WSDL <types> section.
|
---|
129 | With WSDL "document" style, this requires us to go through all interfaces
|
---|
130 | and emit complexTypes for all method arguments and return values.
|
---|
131 | -->
|
---|
132 | <xsl:template match="library">
|
---|
133 | <definitions xmlns:interface="urn:vbox"
|
---|
134 | xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
---|
135 | xmlns:vbox="http://www.virtualbox.org/"
|
---|
136 | name="VirtualBox"
|
---|
137 | xmlns="http://schemas.xmlsoap.org/wsdl/">
|
---|
138 | <xsl:attribute name="targetNamespace"><xsl:value-of select="concat($G_targetNamespace, 'Service')" /></xsl:attribute>
|
---|
139 |
|
---|
140 | <import location="vboxweb.wsdl" namespace="urn:vbox">
|
---|
141 | <xsl:attribute name="namespace"><xsl:value-of select="$G_targetNamespace" /></xsl:attribute>
|
---|
142 | </import>
|
---|
143 |
|
---|
144 | <service name="vboxService">
|
---|
145 | <port>
|
---|
146 | <xsl:attribute name="binding"><xsl:value-of select="concat('vbox:vbox', $G_bindingSuffix)" /></xsl:attribute>
|
---|
147 | <xsl:attribute name="name"><xsl:value-of select="concat('vbox', 'ServicePort')" /></xsl:attribute>
|
---|
148 | <soap:address location="http://localhost:18083/"/>
|
---|
149 | </port>
|
---|
150 | </service>
|
---|
151 |
|
---|
152 | </definitions>
|
---|
153 | </xsl:template>
|
---|
154 |
|
---|
155 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
156 | class
|
---|
157 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
158 |
|
---|
159 | <xsl:template match="module/class">
|
---|
160 | <!-- swallow -->
|
---|
161 | </xsl:template>
|
---|
162 |
|
---|
163 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
164 | enum
|
---|
165 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
166 |
|
---|
167 | <xsl:template match="enum">
|
---|
168 | <!-- swallow -->
|
---|
169 | </xsl:template>
|
---|
170 |
|
---|
171 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
172 | const
|
---|
173 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
174 |
|
---|
175 | <!--
|
---|
176 | <xsl:template match="const">
|
---|
177 | <xsl:apply-templates />
|
---|
178 | </xsl:template>
|
---|
179 | -->
|
---|
180 |
|
---|
181 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
182 | desc
|
---|
183 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
184 |
|
---|
185 | <xsl:template match="desc">
|
---|
186 | <!-- swallow -->
|
---|
187 | </xsl:template>
|
---|
188 |
|
---|
189 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
190 | note
|
---|
191 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
192 |
|
---|
193 | <xsl:template match="note">
|
---|
194 | <!-- swallow -->
|
---|
195 | </xsl:template>
|
---|
196 |
|
---|
197 | <!-- - - - - - - - - - - - - - - - - - - - - - -
|
---|
198 | interface
|
---|
199 | - - - - - - - - - - - - - - - - - - - - - - -->
|
---|
200 |
|
---|
201 | <xsl:template match="interface">
|
---|
202 | </xsl:template>
|
---|
203 |
|
---|
204 | </xsl:stylesheet>
|
---|