まず、私は石鹸で初心者です。この正確な石鹸呼び出しを行うにはどうしたらいいですか?
私はサービスに石鹸呼び出しをしようとしており、talendからの実例を与えられました。私が必要とするのは、PHPで同様の呼び出しを行うことです。
次のように才能から出力され、(HTTPリクエストから抽出された)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<root>
<request>
<username>[email protected]</username>
<password>md5sumlookalike</password>
<webservice>GetCust</webservice>
<refid>12343321</refid>
<message>reserv#123</message>
</request>
</root>
</soap:Body>
</soap:Envelope>
それはから呼び出される場所のためにもスクリプト言語として働くように私はPHPを少し書きました。石鹸をかける方法を理解しようとすると、私はこのビットを思いついた。
<?php
// Yes I know about the diffrent port issue here. So I wgeted and stored it for use next to script
# $soapClient = new SoapClient("http://123.123.123.123:8088/services", array("trace" => true));
$soapClient = new SoapClient("wsdl", array("trace" => true));
$error = 0;
try {
$info = $soapClient->__soapCall("invoke",
array
(
new SoapParam("[email protected]", "username"),
new SoapParam("md5sumish", "password"),
new SoapParam("GetCust", "webservice"),
new SoapParam("1234321", "refid"),
new SoapParam("reserv#123", "message")
)
);
} catch (SoapFault $fault) {
$error = 1;
echo 'ERROR: '.$fault->faultcode.'-'.$fault->faultstring;
}
if ($error == 0) {
print_r($output_headers);
echo 'maybe it worked\n';
unset($soapClient);
}
?>
私はWiresharkのを経由してHTTPリクエストに次のを見てしまいます。サーバーはこれで何をすべきかを知らず、応答もしません。私はここからどこに行く必要があるかわからない。
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://talend.org/esb/service/job">
<SOAP-ENV:Body>
<ns1:invokeInput>[email protected]</ns1:invokeInput>
<password>md5sumish</password>
<webservice>GetCust</webservice>
<refid>1234321</refid>
<message>reserv#123</message>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
だから、ns1:invokeInputを取り除いてユーザー名にする方法を尋ねる必要があります。残りのフォーマットを一列に並べると同時に、リクエストはtalendからの出力のように見えますか?ここで