WsdlServer.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <?php
  2. // https://biuro.biall-net.pl/dev-pl/se-master/wfs-data.php/wsdl
  3. // https://biuro.biall-net.pl/dev-pl/se-master/wfs-data.php/wsdl/wfs-http-bindings.wsdl
  4. Lib::loadClass('Api_WfsServerBase');
  5. /*
  6. Types - a container for data type definitions using some type system (such as XSD).
  7. Message - an abstract, typed definition of the data being communicated.
  8. Operation - an abstract description of an action supported by the service.
  9. Port Type -an abstract set of operations supported by one or more endpoints.
  10. Binding - a concrete protocol and data format specification for a particular port type.
  11. Port - a single endpoint defined as a combination of a binding and a network address.
  12. Service - a collection of related endpoints.
  13. */
  14. class Api_WsdlServer extends Api_WfsServerBase {
  15. public function run($request) {
  16. $DBG = false;
  17. IF($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">$request (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($request);echo'</pre>';}
  18. // /wfs-data.php/wsdl : $request->segments = ['wsdl']
  19. // /wfs-data.php/wsdl/wfs-http-bindings.wsdl : $request->segments = ['wsdl', 'wfs-http-bindings.wsdl']
  20. if (empty($request->segments)) throw new Exception("Bad request", 400);
  21. $countSegments = count($request->segments);
  22. if ('wsdl' != $request->segments[0]) throw new Exception("Bad request", 400);
  23. if (1 == $countSegments) {
  24. if (empty($request->query)) return $this->wsdlAction();
  25. else throw new Exception("TODO: wsdl query: [".json_encode($request->query)."]");
  26. }
  27. if (2 == $countSegments && 'wfs-http-bindings.wsdl' == $request->segments[1]) return $this->wsdlHttpBindingsWsdl();
  28. // if (2 == $countSegments && 'wfs-responses.wsdl' == $request->segments[1]) return $this->sendFile('wfs-responses.wsdl');
  29. // if (2 == $countSegments && 'wfs-util.xsd' == $request->segments[1]) return $this->sendFile('wfs-util.xsd');
  30. // if (2 == $countSegments && 'wfs-xml-interfaces.wsdl' == $request->segments[1]) return $this->sendFile('wfs-xml-interfaces.wsdl');
  31. // if (2 == $countSegments && 'wfs.xsd' == $request->segments[1]) return $this->sendFile('wfs.xsd');
  32. throw new Exception("TODO: \$segments({$countSegments}): [".implode(", ", $request->segments)."]");
  33. }
  34. public function sendFile($file) {
  35. header('Content-type: application/xml; charset="utf-8"');
  36. echo file_get_contents(APP_PATH_SCHEMA . '/wsdl/' . $file);
  37. }
  38. public function wsdlXmlInterfacesAction() {
  39. $wsdlUri = Request::getHostUri() . "/wfs-data.php?wsdl";
  40. $wsdlServiceName = "WFS-" . Request::getHostUri();// WFS-www.myservice.com
  41. $serviceUrlBase = Request::getPathUri() . "wfs-data.php/wsdl";
  42. $staticWsdlUrlBase = Request::getPathUri() . "schema/wsdl";
  43. $soapBinding = false;
  44. $httpBinding = true;
  45. $kvpBinding = false;
  46. header('Content-type: application/xml; charset="utf-8"');
  47. echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
  48. ?>
  49. <wsdl:definitions
  50. targetNamespace="http://www.opengis.net/wfs/requests/2.0"
  51. xmlns:wfs="http://www.opengis.net/wfs/2.0"
  52. xmlns:ows="http://www.opengis.net/ows/1.1"
  53. xmlns:wfs-req="http://www.opengis.net/wfs/requests/2.0"
  54. xmlns:wfs-resp="http://www.opengis.net/wfs/responses/2.0"
  55. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  56. xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  57. <wsdl:documentation xmlns:dc="http://purl.org/dc/elements/1.1/">
  58. <dc:identifier>urn:opengis:spec:wfs:wsdl-1.1:interfaces:2.0.2</dc:identifier>
  59. <?php if(0) : ?><dc:date>2008-08-31</dc:date><?php endif; ?>
  60. <dc:description>
  61. This is the the normative abstract service interface definition
  62. for the OpenGIS Web Feature Service, v2.0.2. The WSDL 1.1 syntax is
  63. used to describe the interface signatures and message structures.
  64. </dc:description>
  65. </wsdl:documentation>
  66. <wsdl:import namespace="http://www.opengis.net/wfs/responses/2.0" location="<?= $staticWsdlUrlBase; ?>/wfs-responses.wsdl"/>
  67. <wsdl:types>
  68. <wsdl:documentation>
  69. Convenience schema that defines all common WFS message elements.
  70. </wsdl:documentation>
  71. <xsd:schema targetNamespace="http://www.opengis.net/wfs/2.0"
  72. xmlns:wfs="http://www.opengis.net/wfs/2.0"
  73. xmlns:gml="http://www.opengis.net/gml/3.2"
  74. xmlns:ogc="http://www.opengis.net/ogc/1.1"
  75. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  76. elementFormDefault="qualified" version="1.1.0">
  77. <xsd:include schemaLocation="<?= $staticWsdlUrlBase; ?>/wfs.xsd"/>
  78. </xsd:schema>
  79. </wsdl:types>
  80. <wsdl:message name="GetCapabilitiesRequest">
  81. <wsdl:part name="Body" element="wfs:GetCapabilities"/>
  82. </wsdl:message>
  83. <wsdl:message name="DescribeFeatureTypeRequest">
  84. <wsdl:part name="Body" element="wfs:DescribeFeatureType"/>
  85. </wsdl:message>
  86. <wsdl:message name="GetPropertyValueRequest">
  87. <wsdl:part name="Body" element="wfs:GetPropertyValue"/>
  88. </wsdl:message>
  89. <wsdl:message name="GetFeatureRequest">
  90. <wsdl:part name="Body" element="wfs:GetFeature"/>
  91. </wsdl:message>
  92. <wsdl:message name="GetFeatureWithLockRequest">
  93. <wsdl:part name="Body" element="wfs:GetFeatureWithLock"/>
  94. </wsdl:message>
  95. <wsdl:message name="LockFeatureRequest">
  96. <wsdl:part name="Body" element="wfs:LockFeature"/>
  97. </wsdl:message>
  98. <wsdl:message name="TransactionRequest">
  99. <wsdl:part name="Body" element="wfs:Transaction"/>
  100. </wsdl:message>
  101. <wsdl:message name="ListStoredQueriesRequest">
  102. <wsdl:part name="Body" element="wfs:ListStoredQueries"/>
  103. </wsdl:message>
  104. <wsdl:message name="DescribeStoredQueriesRequest">
  105. <wsdl:part name="Body" element="wfs:DescribeStoredQueries"/>
  106. </wsdl:message>
  107. <wsdl:message name="CreateStoredQueryRequest">
  108. <wsdl:part name="Body" element="wfs:CreateStoredQuery"/>
  109. </wsdl:message>
  110. <wsdl:message name="DropStoredQueryRequest">
  111. <wsdl:part name="Body" element="wfs:DropStoredQuery"/>
  112. </wsdl:message>
  113. <wsdl:portType name="wfs">
  114. <wsdl:operation name="wfs.getCapabilities">
  115. <wsdl:input message="wfs-req:GetCapabilitiesRequest"/>
  116. <wsdl:output message="wfs-resp:GetCapabilitiesResponse"/>
  117. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  118. </wsdl:operation>
  119. <wsdl:operation name="wfs.describeFeatureType">
  120. <wsdl:input message="wfs-req:DescribeFeatureTypeRequest"/>
  121. <wsdl:output message="wfs-resp:DescribeFeatureTypeResponse"/>
  122. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  123. </wsdl:operation>
  124. <wsdl:operation name="wfs.getPropertyValue">
  125. <wsdl:input message="wfs-req:GetPropertyValueRequest"/>
  126. <wsdl:output message="wfs-resp:GetPropertyValueResponse"/>
  127. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  128. </wsdl:operation>
  129. <wsdl:operation name="wfs.getFeature">
  130. <wsdl:input message="wfs-req:GetFeatureRequest"/>
  131. <wsdl:output message="wfs-resp:GetFeatureResponse"/>
  132. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  133. </wsdl:operation>
  134. <wsdl:operation name="wfs.getFeatureWithLock">
  135. <wsdl:input message="wfs-req:GetFeatureWithLockRequest"/>
  136. <wsdl:output message="wfs-resp:GetFeatureWithLockResponse"/>
  137. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  138. </wsdl:operation>
  139. <wsdl:operation name="wfs.lockFeature">
  140. <wsdl:input message="wfs-req:LockFeatureRequest"/>
  141. <wsdl:output message="wfs-resp:LockFeatureResponse"/>
  142. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  143. </wsdl:operation>
  144. <wsdl:operation name="wfs.transaction">
  145. <wsdl:input message="wfs-req:TransactionRequest"/>
  146. <wsdl:output message="wfs-resp:TransactionResponse"/>
  147. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  148. </wsdl:operation>
  149. <wsdl:operation name="wfs.listStoredQueries">
  150. <wsdl:input message="wfs-req:ListStoredQueriesRequest"/>
  151. <wsdl:output message="wfs-resp:ListStoredQueriesResponse"/>
  152. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  153. </wsdl:operation>
  154. <wsdl:operation name="wfs.describeStoredQueries">
  155. <wsdl:input message="wfs-req:DescribeStoredQueriesRequest"/>
  156. <wsdl:output message="wfs-resp:DescribeStoredQueriesResponse"/>
  157. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  158. </wsdl:operation>
  159. <wsdl:operation name="wfs.createStoredQuery">
  160. <wsdl:input message="wfs-req:CreateStoredQueryRequest"/>
  161. <wsdl:output message="wfs-resp:CreateStoredQueryResponse"/>
  162. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  163. </wsdl:operation>
  164. <wsdl:operation name="wfs.dropStoredQuery">
  165. <wsdl:input message="wfs-req:DropStoredQueryRequest"/>
  166. <wsdl:output message="wfs-resp:DropStoredQueryResponse"/>
  167. <wsdl:fault name="ServiceExceptionReport" message="wfs-resp:ServiceExceptionReport"/>
  168. </wsdl:operation>
  169. </wsdl:portType>
  170. </wsdl:definitions>
  171. <?php
  172. }
  173. public function wsdlHttpBindingsWsdl() {
  174. $wsdlUri = Request::getHostUri() . "/wfs-data.php?wsdl";
  175. $wsdlServiceName = "WFS-" . Request::getHostUri();// WFS-www.myservice.com
  176. $serviceUrlBase = Request::getPathUri() . "wfs-data.php/wsdl";
  177. $staticWsdlUrlBase = Request::getPathUri() . "schema/wsdl";
  178. $wfsServerUriBase = Request::getPathUri() . "wfs-data.php?version=1.0.0&amp;service=WFS";
  179. echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
  180. ?>
  181. <wsdl:definitions
  182. targetNamespace="http://www.opengis.net/wfs/http/2.0"
  183. xmlns:wfs-req="http://www.opengis.net/wfs/requests/2.0"
  184. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  185. xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  186. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  187. xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
  188. <wsdl:documentation xmlns:dc="http://purl.org/dc/elements/1.1/">
  189. <dc:description>
  190. HTTP/1.1 protocol bindings for WFS interfaces.
  191. </dc:description>
  192. <?php if(0) : ?><dc:date>2008-08-31</dc:date><?php endif; ?>
  193. </wsdl:documentation>
  194. <wsdl:import namespace="http://www.opengis.net/wfs/requests/2.0" location="<?= $staticWsdlUrlBase; ?>/wfs-xml-interfaces.wsdl"/>
  195. <wsdl:binding name="wfs-POST" type="wfs-req:wfs">
  196. <wsdl:documentation>
  197. wfs interface bound to the HTTP/1.1 POST method.
  198. </wsdl:documentation>
  199. <http:binding verb="POST"/>
  200. <wsdl:operation name="wfs.getCapabilities">
  201. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=getCapabilities"/>
  202. <wsdl:input>
  203. <mime:mimeXml/>
  204. </wsdl:input>
  205. <wsdl:output>
  206. <mime:mimeXml/>
  207. </wsdl:output>
  208. <wsdl:fault name="ServiceExceptionReport">
  209. <soap:fault use="literal" name="ServiceExceptionReport"/>
  210. </wsdl:fault>
  211. </wsdl:operation>
  212. <wsdl:operation name="wfs.describeFeatureType">
  213. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=DescribeFeatureType"/>
  214. <wsdl:input>
  215. <mime:mimeXml/>
  216. </wsdl:input>
  217. <wsdl:output>
  218. <mime:mimeXml/>
  219. </wsdl:output>
  220. <wsdl:fault name="ServiceExceptionReport">
  221. <soap:fault use="literal" name="ServiceExceptionReport"/>
  222. </wsdl:fault>
  223. </wsdl:operation>
  224. <wsdl:operation name="wfs.getPropertyValue">
  225. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=getPropertyValue"/>
  226. <wsdl:input>
  227. <mime:mimeXml/>
  228. </wsdl:input>
  229. <wsdl:output>
  230. <mime:mimeXml/>
  231. </wsdl:output>
  232. <wsdl:fault name="ServiceExceptionReport">
  233. <soap:fault use="literal" name="ServiceExceptionReport"/>
  234. </wsdl:fault>
  235. </wsdl:operation>
  236. <wsdl:operation name="wfs.getFeature">
  237. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=getFeature"/>
  238. <wsdl:input>
  239. <mime:mimeXml/>
  240. </wsdl:input>
  241. <wsdl:output>
  242. <mime:mimeXml/>
  243. </wsdl:output>
  244. <wsdl:fault name="ServiceExceptionReport">
  245. <soap:fault use="literal" name="ServiceExceptionReport"/>
  246. </wsdl:fault>
  247. </wsdl:operation>
  248. <wsdl:operation name="wfs.getFeatureWithLock">
  249. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=getFeatureWithLock"/>
  250. <wsdl:input>
  251. <mime:mimeXml/>
  252. </wsdl:input>
  253. <wsdl:output>
  254. <mime:mimeXml/>
  255. </wsdl:output>
  256. <wsdl:fault name="ServiceExceptionReport">
  257. <soap:fault use="literal" name="ServiceExceptionReport"/>
  258. </wsdl:fault>
  259. </wsdl:operation>
  260. <wsdl:operation name="wfs.lockFeature">
  261. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=lockFeature"/>
  262. <wsdl:input>
  263. <mime:mimeXml/>
  264. </wsdl:input>
  265. <wsdl:output>
  266. <mime:mimeXml/>
  267. </wsdl:output>
  268. <wsdl:fault name="ServiceExceptionReport">
  269. <soap:fault use="literal" name="ServiceExceptionReport"/>
  270. </wsdl:fault>
  271. </wsdl:operation>
  272. <wsdl:operation name="wfs.transaction">
  273. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=transaction"/>
  274. <wsdl:input>
  275. <mime:mimeXml/>
  276. </wsdl:input>
  277. <wsdl:output>
  278. <mime:mimeXml/>
  279. </wsdl:output>
  280. <wsdl:fault name="ServiceExceptionReport">
  281. <soap:fault use="literal" name="ServiceExceptionReport"/>
  282. </wsdl:fault>
  283. </wsdl:operation>
  284. <wsdl:operation name="wfs.listStoredQueries">
  285. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=listStoredQueries"/>
  286. <wsdl:input>
  287. <mime:mimeXml/>
  288. </wsdl:input>
  289. <wsdl:output>
  290. <mime:mimeXml/>
  291. </wsdl:output>
  292. <wsdl:fault name="ServiceExceptionReport">
  293. <soap:fault use="literal" name="ServiceExceptionReport"/>
  294. </wsdl:fault>
  295. </wsdl:operation>
  296. <wsdl:operation name="wfs.describeStoredQueries">
  297. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=describeStoredQueries"/>
  298. <wsdl:input>
  299. <mime:mimeXml/>
  300. </wsdl:input>
  301. <wsdl:output>
  302. <mime:mimeXml/>
  303. </wsdl:output>
  304. <wsdl:fault name="ServiceExceptionReport">
  305. <soap:fault use="literal" name="ServiceExceptionReport"/>
  306. </wsdl:fault>
  307. </wsdl:operation>
  308. <wsdl:operation name="wfs.createStoredQuery">
  309. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=createStoredQuery"/>
  310. <wsdl:input>
  311. <mime:mimeXml/>
  312. </wsdl:input>
  313. <wsdl:output>
  314. <mime:mimeXml/>
  315. </wsdl:output>
  316. <wsdl:fault name="ServiceExceptionReport">
  317. <soap:fault use="literal" name="ServiceExceptionReport"/>
  318. </wsdl:fault>
  319. </wsdl:operation>
  320. <wsdl:operation name="wfs.dropStoredQuery">
  321. <http:operation location="<?= $wfsServerUriBase; ?>&amp;REQUEST=dropStoredQuery"/>
  322. <wsdl:input>
  323. <mime:mimeXml/>
  324. </wsdl:input>
  325. <wsdl:output>
  326. <mime:mimeXml/>
  327. </wsdl:output>
  328. <wsdl:fault name="ServiceExceptionReport">
  329. <soap:fault use="literal" name="ServiceExceptionReport"/>
  330. </wsdl:fault>
  331. </wsdl:operation>
  332. </wsdl:binding>
  333. </wsdl:definitions>
  334. <?php
  335. }
  336. public function wsdlAction() {// wsdl endpoints(ports)
  337. $wsdlUri = Request::getHostUri() . "/wfs-data.php?wsdl";
  338. $wsdlServiceName = "WFS-" . Request::getHost();// WFS-www.myservice.com
  339. $serviceUrlBase = Request::getPathUri() . "wfs-data.php/wsdl";
  340. $staticWsdlUrlBase = Request::getPathUri() . "schema/wsdl";
  341. $soapBinding = false;
  342. $httpBinding = true;
  343. $kvpBinding = false;
  344. echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
  345. ?>
  346. <wsdl:definitions
  347. targetNamespace="http://www.myservice.com/wfs/2.0"
  348. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  349. xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  350. xmlns:wfs-http="http://www.opengis.net/wfs/http/2.0"
  351. xmlns:wfs-http-kvp="http://www.opengis.net/wfs/http/kvp/2.0"
  352. xmlns:wfs-soap="http://www.opengis.net/wfs/soap/2.0"
  353. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  354. <?php if (false) : ?>
  355. <wsdl:documentation xmlns:dc="http://purl.org/dc/elements/1.1/">
  356. <dc:date>2008-08-31</dc:date>
  357. <dc:description>
  358. This WSDL document defines the service-specific properties
  359. of a MyService WFS implementation; it specifies available
  360. endpoints and alternative bindings.
  361. </dc:description>
  362. </wsdl:documentation>
  363. <?php endif; ?>
  364. <?php if ($soapBinding) : ?>
  365. <wsdl:import namespace="http://www.opengis.net/wfs/soap/2.0" location="<?= $serviceUrlBase; ?>/wfs-soap-bindings.wsdl"/>
  366. <?php endif; ?>
  367. <?php if ($httpBinding) : ?>
  368. <wsdl:import namespace="http://www.opengis.net/wfs/http/2.0" location="<?= $serviceUrlBase; ?>/wfs-http-bindings.wsdl"/>
  369. <?php endif; ?>
  370. <?php if ($kvpBinding) : ?>
  371. <wsdl:import namespace="http://www.opengis.net/wfs/http/kvp/2.0" location="<?= $serviceUrlBase; ?>/wfs-kvp-bindings.wsdl"/>
  372. <?php endif; ?>
  373. <wsdl:service name="<?= $wsdlServiceName; ?>">
  374. <?php if (false) : ?>
  375. <wsdl:documentation>
  376. A WFS-2.0 implementation. Includes alternative SOAP bindings
  377. for the WFS interfaces.
  378. </wsdl:documentation>
  379. <?php endif; ?>
  380. <?php if ($soapBinding) : ?>
  381. <wsdl:port name="wfs-SOAP-Port" binding="wfs-soap:wfs-SOAP">
  382. <soap:address location="<?= $serviceUrlBase; ?>/wfs-soap/services/WFSSOAP"/>
  383. </wsdl:port>
  384. <?php endif; ?>
  385. <?php if ($httpBinding) : ?>
  386. <wsdl:port name="wfs-POST-Port" binding="wfs-http:wfs-POST">
  387. <http:address location="<?= $serviceUrlBase; ?>"/>
  388. </wsdl:port>
  389. <?php endif; ?>
  390. <?php if ($kvpBinding) : ?>
  391. <wsdl:port name="wfs-GET-Port" binding="wfs-http-kvp:wfs-GET">
  392. <http:address location="<?= $serviceUrlBase; ?>"/>
  393. </wsdl:port>
  394. <?php endif; ?>
  395. </wsdl:service>
  396. </wsdl:definitions>
  397. <?php
  398. exit;
  399. // example from oxygen site
  400. ?>
  401. <description xmlns="http://www.w3.org/ns/wsdl"
  402. xmlns:tns="http://www.tmsws.com/wsdl20sample"
  403. xmlns:whttp="http://schemas.xmlsoap.org/wsdl/http/"
  404. xmlns:wsoap="http://schemas.xmlsoap.org/wsdl/soap/"
  405. xmlns:gml="http://www.opengis.net/gml"
  406. targetNamespace="<?= $wsdlUri; ?>">
  407. <documentation>
  408. Test WSDL 2.0
  409. </documentation>
  410. <types>
  411. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  412. xmlns="http://www.tmsws.com/wsdl20sample"
  413. targetNamespace="<?= $wsdlUri; ?>">
  414. <xs:element name="request">
  415. <xs:complexType>
  416. <xs:sequence>
  417. <xs:element name="ID" type="xs:integer"/>
  418. <xs:element name="NAME" type="xs:string"/>
  419. </xs:sequence>
  420. </xs:complexType>
  421. </xs:element>
  422. <xs:element name="response">
  423. <xs:complexType>
  424. <xs:sequence>
  425. <xs:element name="ID" type="xs:integer"/>
  426. <xs:element name="DATA" type="gml:featureMember"/>
  427. </xs:sequence>
  428. </xs:complexType>
  429. </xs:element>
  430. </xs:schema>
  431. </types>
  432. <!-- Abstract interfaces -->
  433. <interface name="Interface1">
  434. <fault name="Error1" element="tns:response"/>
  435. <operation name="Get" pattern="http://www.w3.org/ns/wsdl/in-out">
  436. <input messageLabel="In" element="tns:request"/>
  437. <output messageLabel="Out" element="tns:response"/>
  438. </operation>
  439. </interface>
  440. <!-- Concrete Binding Over HTTP -->
  441. <binding name="HttpBinding" interface="tns:Interface1"
  442. type="http://www.w3.org/ns/wsdl/http">
  443. <operation ref="tns:Get" whttp:method="GET"/>
  444. </binding>
  445. <!-- Concrete Binding with SOAP-->
  446. <binding name="SoapBinding" interface="tns:Interface1"
  447. type="http://www.w3.org/ns/wsdl/soap"
  448. wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"
  449. wsoap:mepDefault="http://www.w3.org/2003/05/soap/mep/request-response">
  450. <operation ref="tns:Get" />
  451. </binding>
  452. <!-- Web Service offering endpoints for both bindings-->
  453. <service name="Service1" interface="tns:Interface1">
  454. <endpoint name="HttpEndpoint"
  455. binding="tns:HttpBinding"
  456. address="http://www.example.com/rest/"/>
  457. <endpoint name="SoapEndpoint"
  458. binding="tns:SoapBinding"
  459. address="http://www.example.com/soap/"/>
  460. </service>
  461. </description>
  462. <?php
  463. exit;
  464. }
  465. }