} </pre> </div> <br> <br> ■取得内容(実際に取得しています)<br> <div class="res2"> <?php // パラメータセット $ids = array("PR020001", "PR020002", "PR020003", "FU000001"); $params = array("ids" => $ids); // メソッド呼び出し //$soap = new SoapClient('http://www.massbank.jp/api/services/MassBankAPI?wsdl'); $soap = new SoapClient('http://localhost/api/services/MassBankAPI?wsdl'); try { $res = $soap->getPeak($params); } catch (SoapFault $e) { echo $e->getMessage(); return; } // 取得内容表示 $ret = $res->return; for ($i = 0; $i < count($ret); $i++) { echo "[" . $ret[$i]->id . "]<br>\n"; echo "NUM_PEAK:" . $ret[$i]->numPeaks . "<br>\n"; for ($j = 0; $j < count($ret[$i]->mzs); $j++) { $mz = $ret[$i]->mzs[$j]; $inte = $ret[$i]->intensities[$j]; echo "mz:{$mz}, inte:{$inte}<br>\n"; } echo "<br><br>\n";