mybaby_luoq
csdnspeed
2018-01-19 01:04

php通过soapclient连接SAP的ws,错误提示找不到支持的xstream

80
  • sap
  • web service
最近项目需要从SAP捞资料,对方给出了webservice,由于是第一次连,问题多多,特来请教!

function如下:

  • array(1) {
  • [0]=>
  • string(80) "ZzMmStockInquireResponse ZzMmStockInquire(ZzMmStockInquire $parameters)"
  • }

type如下:

  • string(269) "struct ZzMmStockInquire {
  • TableOfRangeSLgortD LgortTi;
  • TableOfRangeSMatnr MatnrTi;
  • char1 NonzerostockI;
  • char1 Nospec2I;
  • char1 SobkzeI;
  • char1 SobkzitI;
  • char1 SobkzmkI;
  • char1 SobkznI;
  • char1 SobkzoI;
  • TableOfZzsmmStock StockT;
  • TableOfRangeSWerks WerksTi;
  • }"

php代码如下:

 header("Content-Type: text/html;charset=utf-8");
  $user = '123';
  $password = '###';
  $wsdl = 'http://sapqss.test.com:8000/sap/bc/srt/wsdl/bng56231/wsdl11/allinone/ws_policy/document?sap-client=230';
 $SOAP_CONFIG = array(
          login' => $user,
         'password' => $password,
          'trace' =>true,
          'soap_version'=>SOAP_1_2,
          'connection_timeout' => 50,
          'encoding' => 'UTF-8',
          'cache_wsdl' => WSDL_CACHE_NONE,
          'keep_alive' => false
      );
     try {
                  $client = new SoapClient($wsdl, $SOAP_CONFIG); //调用sap里的接口
     } catch (Exception $e) {
                  print $e->getMessage();
      }

运行之后,页面出现如下的错误,请问是什么造成的呢?

  • Fatal error: Uncaught SoapFault exception: [soap-env:Server] SRT: Unsupported xstream found: ("HTTP Code 200 : OK") in C:\wamp\www\test\sap_ws\demo2.php:48
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐

换一换