0

我们正在将 Web 服务写入 UNIFACE 9.3。我们的服务提供 WSDL。我们使用 SOAPUi 进行第一次测试,我们想使用 PHP 进行更多测试,但是 PHP 什么也没给我们!为什么?

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"    xmlns:urn="urn:uniface:applic:wrapped:services:WEBSOAPWSV">
<soapenv:Header/>
<soapenv:Body>
    <urn:INFO>
        <urn:SP_IN>OCCURRENCE=TEST</urn:SP_IN>
    </urn:INFO>
</soapenv:Body>
</soapenv:Envelope>

这是我们的 PHP 测试集:

$client = new SoapClient("http://patch-server:8080/uniface/services/websoapwsvdlw?wsdl");
var_dump($client->__getFunctions());
$args = array('OCCURRENCE', 'TEST');
$result = $client->__soapCall('INFO', $args);
echo "Request:\n" . $client->__getLastRequest() . "\n";

PHP-getFunctions 提供了这个:

array(6) {
[0]=> string(41) "ACCEPTResponse ACCEPT(ACCEPT $parameters)"
[1]=> string(35) "EXECResponse EXEC(EXEC $parameters)"
[2]=> string(35) "INFOResponse INFO(INFO $parameters)"
[3]=> string(41) "INSERTResponse INSERT(INSERT $parameters)"
[4]=> string(35) "QUITResponse QUIT(QUIT $parameters)"
[5]=> string(41) "UPDATEResponse UPDATE(UPDATE $parameters)" } 

答案是什么都没有!为什么?非常感谢。

4

2 回答 2

1
$client = new SoapClient($url, array("trace" => 1));
于 2013-11-14T13:47:34.830 回答
1

我真的不知道 SOAP,我刚刚自己在这里问了一个关于 SOAP 调用的问题,但是如果您将该代码稍微更改为:

// change here
$options        = array( 'trace' => 1, 'exceptions' => 1);

$client = new SoapClient("http://patch-server:8080/uniface/services/websoapwsvdlw?wsdl", $options);

var_dump($client->__getFunctions());
$args = array('OCCURRENCE', 'TEST');

// change here..
$result = $client->INFO($args);
echo "Request:\n" . $client->__getLastRequest() . "\n";
于 2013-03-27T08:15:36.740 回答