Commit d9c16908247d30262c30ae9e16d78515e8736a37
1 parent
4bdd7ad9
Exists in
master
and in
110 other branches
getStatus SOAP
Showing
4 changed files
with
115 additions
and
27 deletions
Show diff stats
php/classes/WSClientInterface.php
... | ... | @@ -29,7 +29,7 @@ abstract class WSOrbitUnit |
29 | 29 | |
30 | 30 | abstract class WSSpacecraft |
31 | 31 | { |
32 | - const CASSINI = "Cassini_Public"; | |
32 | + const CASSINI = "Cassini"; | |
33 | 33 | const GALILEO = "Galileo"; |
34 | 34 | const VOYAGER1 = "Voyager_1"; |
35 | 35 | const VOYAGER2 = "Voyager_2"; |
... | ... | @@ -117,7 +117,9 @@ Interface WSClientInterface |
117 | 117 | |
118 | 118 | public function getParameter($startTime, $stopTime, $parameterID, $sampling = 0, $userID = "", $password = "", |
119 | 119 | $outputFormat = WSOutputFileFormat::NETCDF, $timeFormat = WSOutputTimeFormat::ISO, $gzip = 0); |
120 | - | |
120 | + | |
121 | + public function getStatus($processID); | |
122 | + | |
121 | 123 | public function getDataset($startTime, $stopTime, $datasetID, $sampling = 0, $userID = "", $password = "", |
122 | 124 | $outputFormat = WSOutputFileFormat::NETCDF, $timeFormat = WSOutputTimeFormat::ISO, $gzip = 0); |
123 | 125 | |
... | ... |
php/classes/WSClientSOAP.php
... | ... | @@ -83,7 +83,16 @@ class WSClientSOAP implements WSClientInterface |
83 | 83 | |
84 | 84 | return $this->call(__FUNCTION__, $params); |
85 | 85 | } |
86 | - | |
86 | + | |
87 | + public function getStatus($processID) | |
88 | + { | |
89 | + $params = array('parameters' => array( | |
90 | + "id" => $processID | |
91 | + )); | |
92 | + | |
93 | + return $this->call(__FUNCTION__, $params); | |
94 | + } | |
95 | + | |
87 | 96 | public function getDataset($startTime, $stopTime, $datasetID, $sampling = 0, $userID = "", $password = "", |
88 | 97 | $outputFormat = WSOutputFileFormat::NETCDF, $timeFormat = WSOutputTimeFormat::ISO, $gzip = 0) |
89 | 98 | { |
... | ... |
php/classes/WebServer.php
... | ... | @@ -417,18 +417,21 @@ class WebServer |
417 | 417 | return array('success' => false); |
418 | 418 | } |
419 | 419 | |
420 | - public function getStatus($id) | |
420 | + public function getStatus($data) | |
421 | 421 | { |
422 | + $result = $this->init($data); | |
423 | + | |
422 | 424 | $this->userID = 'impex'; |
423 | - | |
425 | + | |
426 | + $id = $result['vars']['id']; | |
427 | + | |
424 | 428 | if (!isset($this->requestManager)) |
425 | 429 | $this->requestManager = new RequestManagerClass(); |
426 | 430 | |
427 | 431 | try { |
428 | 432 | $res = $this->requestManager->runWSRequest($this->userID, 'unknown', FunctionTypeEnumClass::PROCESSGETINFO, null, $id); |
429 | 433 | } catch (Exception $e) { |
430 | - return array("error" => $e->getMessage()); | |
431 | - // $this->throwError("serverError", "Exeption detected : ".$e->getMessage()); | |
434 | + $this->throwError("getStatusError", "Exeption detected : ".$e->getMessage()); | |
432 | 435 | } |
433 | 436 | |
434 | 437 | if (!$res['success']) { |
... | ... |
public/wsdl/Methods_AMDA.wsdl
... | ... | @@ -30,13 +30,13 @@ |
30 | 30 | <xs:element name="getParameter" type="tns:getParameter"/> |
31 | 31 | <xs:element name="getParameterResponse" type="tns:getParameterResponse"/> |
32 | 32 | |
33 | - <xs:element name="getDataset" type="tns:getDataset"/> | |
33 | + <xs:element name="getDataset" type="tns:getDataset"/> | |
34 | 34 | <xs:element name="getDatasetResponse" type="tns:getDatasetResponse"/> |
35 | 35 | |
36 | - <xs:element name="getPlot" type="tns:getPlot"/> | |
36 | + <xs:element name="getPlot" type="tns:getPlot"/> | |
37 | 37 | <xs:element name="getPlotResponse" type="tns:getPlotResponse"/> |
38 | 38 | |
39 | - <xs:element name="getResultPlot" type="tns:getResultPlot"/> | |
39 | + <xs:element name="getResultPlot" type="tns:getResultPlot"/> | |
40 | 40 | <xs:element name="getResultPlotResponse" type="tns:getResultPlotResponse"/> |
41 | 41 | |
42 | 42 | <xs:element name="getOrbites" type="tns:getOrbites"/> |
... | ... | @@ -44,13 +44,16 @@ |
44 | 44 | |
45 | 45 | <xs:element name="getObsDataTreeResponse" type="tns:getObsDataTreeResponse"/> |
46 | 46 | |
47 | + <xs:element name="getStatus" type="tns:getStatus"/> | |
48 | + <xs:element name="getStatusResponse" type="tns:getStatusResponse"/> | |
49 | + | |
47 | 50 | <xs:element name="alive" type="xs:boolean"/> |
48 | 51 | |
49 | 52 | <xs:complexType name="getObsDataTreeResponse"> |
50 | 53 | <xs:sequence> |
51 | 54 | <xs:element name="success" minOccurs="0" maxOccurs="1" type="xs:boolean"> |
52 | 55 | <xs:annotation> |
53 | - <xs:documentation>If methode is OK success = true, else success = false</xs:documentation> | |
56 | + <xs:documentation>If method is OK success = true, else success = false</xs:documentation> | |
54 | 57 | </xs:annotation> |
55 | 58 | </xs:element> |
56 | 59 | <xs:element name="WorkSpace" type="tns:WorkSpace" minOccurs="1" maxOccurs="1"> |
... | ... | @@ -728,16 +731,68 @@ of a set of typically orthogonal axes. |
728 | 731 | ID's.</xs:documentation> |
729 | 732 | </xs:annotation> |
730 | 733 | </xs:element> |
731 | - <xs:element maxOccurs="unbounded" minOccurs="0" name="dataFileURLs" | |
732 | - type="xs:anyURI"> | |
734 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="dataFileURLs" type="xs:anyURI"> | |
733 | 735 | <xs:annotation> |
734 | - <xs:documentation>URLs of results data files. If not URLs - not data for | |
736 | + <xs:documentation>URLs of results data files. If no URLs - no data for | |
735 | 737 | required parameters</xs:documentation> |
736 | 738 | </xs:annotation> |
737 | 739 | </xs:element> |
740 | + <xs:element maxOccurs="1" minOccurs="0" name="status"> | |
741 | + <xs:annotation> | |
742 | + <xs:documentation></xs:documentation> | |
743 | + </xs:annotation> | |
744 | + <xs:simpleType> | |
745 | + <xs:restriction base="xs:string"> | |
746 | + <xs:enumeration value="in progress"/> | |
747 | + <xs:enumeration value="error"/> | |
748 | + </xs:restriction> | |
749 | + </xs:simpleType> | |
750 | + </xs:element> | |
751 | + <xs:element maxOccurs="1" minOccurs="0" name="id" type="xs:string"> | |
752 | + <xs:annotation> | |
753 | + <xs:documentation>process ID</xs:documentation> | |
754 | + </xs:annotation> | |
755 | + </xs:element> | |
738 | 756 | </xs:sequence> |
739 | 757 | </xs:complexType> |
740 | - | |
758 | + | |
759 | + <xs:complexType name="getStatus"> | |
760 | + <xs:sequence> | |
761 | + <xs:element minOccurs="1" maxOccurs="1" name="id" type="xs:string"> | |
762 | + <xs:annotation> | |
763 | + <xs:documentation>process ID</xs:documentation> | |
764 | + </xs:annotation> | |
765 | + </xs:element> | |
766 | + </xs:sequence> | |
767 | + </xs:complexType> | |
768 | + | |
769 | + <xs:complexType name="getStatusResponse"> | |
770 | + <xs:sequence> | |
771 | + <xs:element name="success" minOccurs="0" maxOccurs="1" type="xs:boolean"> | |
772 | + <xs:annotation> | |
773 | + <xs:documentation></xs:documentation> | |
774 | + </xs:annotation> | |
775 | + </xs:element> | |
776 | + <xs:element maxOccurs="unbounded" minOccurs="0" name="dataFileURLs" type="xs:anyURI"> | |
777 | + <xs:annotation> | |
778 | + <xs:documentation>URLs of results data files. If no URLs - no data for | |
779 | + required parameters</xs:documentation> | |
780 | + </xs:annotation> | |
781 | + </xs:element> | |
782 | + <xs:element maxOccurs="1" minOccurs="0" name="status"> | |
783 | + <xs:annotation> | |
784 | + <xs:documentation></xs:documentation> | |
785 | + </xs:annotation> | |
786 | + <xs:simpleType> | |
787 | + <xs:restriction base="xs:string"> | |
788 | + <xs:enumeration value="in progress"/> | |
789 | + <xs:enumeration value="error"/> | |
790 | + </xs:restriction> | |
791 | + </xs:simpleType> | |
792 | + </xs:element> | |
793 | + </xs:sequence> | |
794 | + </xs:complexType> | |
795 | + | |
741 | 796 | <xs:complexType name="getDataset"> |
742 | 797 | <xs:sequence> |
743 | 798 | <xs:element name="startTime" type="xs:string" minOccurs="1" maxOccurs="1"> |
... | ... | @@ -814,8 +869,7 @@ of a set of typically orthogonal axes. |
814 | 869 | <xs:sequence> |
815 | 870 | <xs:element name="success" minOccurs="0" maxOccurs="1" type="xs:boolean"> |
816 | 871 | <xs:annotation> |
817 | - <xs:documentation>Url of TimeTables storage file with TimeTables | |
818 | - ID's.</xs:documentation> | |
872 | + <xs:documentation></xs:documentation> | |
819 | 873 | </xs:annotation> |
820 | 874 | </xs:element> |
821 | 875 | <xs:element maxOccurs="unbounded" minOccurs="0" name="dataFileURLs" |
... | ... | @@ -999,8 +1053,7 @@ of a set of typically orthogonal axes. |
999 | 1053 | <xs:sequence> |
1000 | 1054 | <xs:element name="success" minOccurs="0" maxOccurs="1" type="xs:boolean"> |
1001 | 1055 | <xs:annotation> |
1002 | - <xs:documentation>Url of TimeTables storage file with TimeTables | |
1003 | - ID's.</xs:documentation> | |
1056 | + <xs:documentation></xs:documentation> | |
1004 | 1057 | </xs:annotation> |
1005 | 1058 | </xs:element> |
1006 | 1059 | <xs:element maxOccurs="unbounded" minOccurs="0" name="dataFileURLs" |
... | ... | @@ -1040,8 +1093,7 @@ of a set of typically orthogonal axes. |
1040 | 1093 | <xs:sequence> |
1041 | 1094 | <xs:element name="success" minOccurs="0" maxOccurs="1" type="xs:boolean"> |
1042 | 1095 | <xs:annotation> |
1043 | - <xs:documentation>Url of TimeTables storage file with TimeTables | |
1044 | - ID's.</xs:documentation> | |
1096 | + <xs:documentation></xs:documentation> | |
1045 | 1097 | </xs:annotation> |
1046 | 1098 | </xs:element> |
1047 | 1099 | <xs:element name="ttFileURL" type="xs:anyURI" minOccurs="1" maxOccurs="1"> |
... | ... | @@ -1071,7 +1123,7 @@ of a set of typically orthogonal axes. |
1071 | 1123 | </wsdl:message> |
1072 | 1124 | |
1073 | 1125 | <wsdl:message name="getObsDataTree"> |
1074 | - <wsdl:part name="parameters" element="tns:emptyElement"> </wsdl:part> | |
1126 | + <wsdl:part name="parameters" element="tns:emptyElement"></wsdl:part> | |
1075 | 1127 | </wsdl:message> |
1076 | 1128 | |
1077 | 1129 | <wsdl:message name="getObsDataTreeResponse"> |
... | ... | @@ -1103,7 +1155,7 @@ of a set of typically orthogonal axes. |
1103 | 1155 | </wsdl:message> |
1104 | 1156 | |
1105 | 1157 | <wsdl:message name="getDataset"> |
1106 | - <wsdl:part name="parameters" element="tns:getDataset"> </wsdl:part> | |
1158 | + <wsdl:part name="parameters" element="tns:getDataset"></wsdl:part> | |
1107 | 1159 | </wsdl:message> |
1108 | 1160 | |
1109 | 1161 | <wsdl:message name="getDatasetResponse"> |
... | ... | @@ -1123,10 +1175,17 @@ of a set of typically orthogonal axes. |
1123 | 1175 | </wsdl:message> |
1124 | 1176 | |
1125 | 1177 | <wsdl:message name="getResultPlotResponse"> |
1126 | - <wsdl:part name="parameters" element="tns:getResultPlotResponse"> </wsdl:part> | |
1178 | + <wsdl:part name="parameters" element="tns:getResultPlotResponse"></wsdl:part> | |
1127 | 1179 | </wsdl:message> |
1128 | 1180 | |
1181 | + <wsdl:message name="getStatus"> | |
1182 | + <wsdl:part name="parameters" element="tns:getStatus"></wsdl:part> | |
1183 | + </wsdl:message> | |
1129 | 1184 | |
1185 | + <wsdl:message name="getStatusResponse"> | |
1186 | + <wsdl:part name="parameters" element="tns:getStatusResponse"> </wsdl:part> | |
1187 | + </wsdl:message> | |
1188 | + | |
1130 | 1189 | <wsdl:message name="getOrbites"> |
1131 | 1190 | <wsdl:part name="parameters" element="tns:getOrbites"> </wsdl:part> |
1132 | 1191 | </wsdl:message> |
... | ... | @@ -1171,7 +1230,12 @@ of a set of typically orthogonal axes. |
1171 | 1230 | <wsdl:input message="tns:getParameter"> </wsdl:input> |
1172 | 1231 | <wsdl:output message="tns:getParameterResponse"> </wsdl:output> |
1173 | 1232 | </wsdl:operation> |
1174 | - | |
1233 | + | |
1234 | + <wsdl:operation name="getStatus"> | |
1235 | + <wsdl:input message="tns:getStatus"> </wsdl:input> | |
1236 | + <wsdl:output message="tns:getStatusResponse"> </wsdl:output> | |
1237 | + </wsdl:operation> | |
1238 | + | |
1175 | 1239 | <wsdl:operation name="getDataset"> |
1176 | 1240 | <wsdl:input message="tns:getDataset"> </wsdl:input> |
1177 | 1241 | <wsdl:output message="tns:getDatasetResponse"> </wsdl:output> |
... | ... | @@ -1253,7 +1317,17 @@ of a set of typically orthogonal axes. |
1253 | 1317 | <soap:body use="literal"/> |
1254 | 1318 | </wsdl:output> |
1255 | 1319 | </wsdl:operation> |
1256 | - | |
1320 | + | |
1321 | + <wsdl:operation name="getStatus"> | |
1322 | + <soap:operation soapAction="" style="document"/> | |
1323 | + <wsdl:input> | |
1324 | + <soap:body use="literal"/> | |
1325 | + </wsdl:input> | |
1326 | + <wsdl:output> | |
1327 | + <soap:body use="literal"/> | |
1328 | + </wsdl:output> | |
1329 | + </wsdl:operation> | |
1330 | + | |
1257 | 1331 | <wsdl:operation name="getDataset"> |
1258 | 1332 | <soap:operation soapAction="" style="document"/> |
1259 | 1333 | <wsdl:input> |
... | ... | @@ -1309,7 +1383,7 @@ of a set of typically orthogonal axes. |
1309 | 1383 | |
1310 | 1384 | <wsdl:service name="Methods_AMDA"> |
1311 | 1385 | <wsdl:port name="Methods_AMDAPort" binding="tns:Methods_AMDASoapBinding"> |
1312 | - <soap:address location="http://apus.cesr.fr/AMDA-TEST/php/AMDA_METHODS_WSDL.php"/> | |
1386 | + <soap:address location="http://apus.irap.omp.eu/NEWAMDA/php/AMDA_METHODS_WSDL.php"/> | |
1313 | 1387 | </wsdl:port> |
1314 | 1388 | </wsdl:service> |
1315 | 1389 | </wsdl:definitions> |
... | ... |