来自php的SOAP请求无法正常工作,并给出错误:HTTP-内部服务器错误

时间:2019-02-06 05:05:27

标签: php soap

我正在使用以下代码在服务器上发出SOAP请求。 SOAP请求已成功登录,但是使用我给定的参数后,该功能“ CreateDocumentFromFile”不起作用。

    $wsdl = "WSDL url";
    $soapClient = new SoapClient($wsdl);

    try {
        $loginStat = $soapClient->login($credential);
    } catch (SoapFault $fault) {
        print("ERROR: ".$fault->faultcode."-".$fault->faultstring);
    }
$options = array(
        'p' => array(
            'Document' => array(
                 'Subject' => 'TEST WS 1',
                 'Note' => 'TEST WS 1',
                 'BusinessUnitID' => '1',
                 'SourceID' => '3',
                 'CategoryID' => '44',
                 'TitolarioID' => '628',
                 'FascicleID' => '27',
                 'TypeID' => '9',
                 'SenderUORs' => '8',
                 'RecipientUORs' => '8',
                 'ShowCase' => '0',
                 'IsSubscribed' => '0',
                 'Inventory' => '0',
                 'IsPublic' => '0'
            ),
            'ProtocolDocument' => '1',
            'Data' => 'dGVzdERvY1A=',
            'FileName' => 'pdafhjjd_doc3.txt',
            'FileType' => '11',
            'IsSigned' => '0',
            'SignDate' => '04/02/2019',
            'CheckOriginality' => '0'
        )
    );
try {
        $saveFile = $soapClient->CreateDocumentFromFile($options);
    } catch (SoapFault $fault) {
        print("ERROR: ".$fault->faultcode."-".$fault->faultstring);
    }

0 个答案:

没有答案