douchen4915 2013-03-21 13:09
浏览 159

使用PHP的SOAP请求不起作用 - PHP getLastRequest没有答案

We are writing a web service into UNIFACE 9.3. Our service delivers a WSDL. We use SOAPUi for the first test and we wand to use PHP for some more tests, but PHP gives us nothing! Why?

<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>

This is our PHP-testset:

$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:
" . $client->__getLastRequest() . "
";

PHP-getFunctions delivers this:

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)" } 

The answer is nothing! Why? Thanks a lot.

  • 写回答

2条回答 默认 最新

  • douzhi1919 2013-03-27 08:15
    关注

    I really don't know SOAP and I've just asked a question about a SOAP call here myself, but what if you changed that code slightly to:

    // 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:
    " . $client->__getLastRequest() . "
    ";
    
    评论

报告相同问题?

悬赏问题

  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助