繁体   English   中英

PHP SOAP调用连接重置

[英]PHP SOAP call connection reset

我得到以下鳕鱼试图连接到SOAP服务器并运行命令。 但是,一旦我使用$ client-> login( array() ),chrome就会使用ERR_CONNECTION_RESET重新调整。

当我没有array()的时候这样做:

$client->actief($params);

我从SOAP客户端收到消息“找不到”。 谁能指出我正确的方向...

当我连接到soapClient并使用__getFunctions()函数时,我取回了这些函数:

array(3){[0] =>字符串(41)“ actiefResponse actief(actief $ parameters)” [1] =>字符串(38)“ loginResponse登录(login $ parameters)” [2] =>字符串(41) “ logoutResponse注销(注销$ parameters)”}

<?php

$client = new SoapClient(
    'https://xxxx',
    array(
        'trace' => 1,
        'use' => SOAP_LITERAL,
        'location' => 'https://xxx',
         "stream_context" => stream_context_create(
            array(
                'ssl' => array(
                    'verify_peer'       => false,
                    'verify_peer_name'  => false,
                )
            )
        )
    )
);

var_dump($client->__getFunctions());
$params = new SoapVar('
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <S2:actief
          xmlns:S2="urn:sessie:sessie"
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <S2:dsClientContext>
            <ttClientContextValue>
               <contextClass>global</contextClass>
               <contextName>guid</contextName>
               <contextType>character</contextType>
               <valueCharacter>a35702d5-6dc1-2e8d-11e8-01d65f768678</valueCharacter>
               <valueNumber>0.0</valueNumber>
               <valueDate xsi:nil="true" />
               <valueClob xsi:nil="true" />
               <valueBlob xsi:nil="true" />
            </ttClientContextValue>
         </S2:dsClientContext>
      </S2:actief>
   </soapenv:Body>
</soapenv:Envelope>
', XSD_ANYXML);

try {
$result = $client->actief(array('parameters' => $params));
} catch (Exception $e) {
    echo $e->getMessage();
}

不知何故,当我不使用WSDL模式并指定'uri'选项时,它运作良好,并且我从SOAP得到响应。

我真的不知道为什么它不能在WSDL模式下工作,而在非wdsl模式下工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM