PEAR::SOAP_Client を使ってプログラムを書いているけど、WSDL を読み込んだ上でリクエストを送信しようと思っても、全くサーバが理解してくれない。
期待される SOAP メッセージ
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<ns4:GetSchemaList>
<ns4:User> ... </ns4:User>
<ns4:HashKey> ... </ns4:HashKey>
<ns4:MethodName> ... </ns4:MethodName>
</ns4:GetSchemaList>
</SOAP-ENV:Body>
<SOAP-ENV:Envelope>ところが、次のようなメッセージが送信されている。
PEAR::SOAP_Client の SOAP メッセージ
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<ns4:GetSchemaList>
<User> ... </User>
<HashKey> ... </HashKey>
<MethodName> ... </MethodName>
</ns4:GetSchemaList>
</SOAP-ENV:Body>
<SOAP-ENV:Envelope>つまり、WSDL の targetNamespace が上手く理解されていないんじゃないか、と。他の SOAP を扱っていないので、これだけで結論を出すのは早計だが、とりあえず対応するには次のパッチを当てる。
ひとまず正しく動作させるパッチ
--- Client.php.orig 2007-03-30 17:50:00.000000000 +0900
+++ Client.php 2007-03-31 01:43:30.000000000 +0900
@@ -594,7 +594,7 @@
count($opData['input']['parts'])) {
$i = 0;
foreach ($opData['input']['parts'] as $name => $part) {
- $xmlns = '';
+ $xmlns = $namespace;
$attrs = array();
// Is the name a complex type?
if (isset($part['element'])) {Related Entries
There is not related articles.
Trackbacks
Trackback URI: http://blog.c--v.net/trackback/2007/03/31/1
There is no trackback.
There is no comment.