WsdlServer.php 20 KB

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