提前致谢。 在本周,我收到了客户需求表,以便在我们的项目中集成syspro API。他给了我api的详细信息,但由于syspro文档较少,我面临很多问题。所以我创建了一个简单的测试文件,以显示创建soap客户端调用,但它抛出了下面显示的异常代码。我没有得到我通过错误的参数或我的错误凭据。
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
try{
$opts = array(
'http' => array(
'user_agent' => 'PHPSoapClient'
),
'ssl' => array(
// set some SSL/TLS specific options
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$context = stream_context_create($opts);
$client = new SoapClient('https://syspro.domain.com/SYSPROWebServices/utilities.asmx?WSDL',
array('stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE));
// client has given me only Operator and CompanyId but passwords for both are blank as client said
$Operator = 'operator given by client';
$OperatorPassword = '';
$CompanyId = 'operator given by client';
$CompanyPassword = '';
$LanguageCode = 'ENGLISH_US';
$LogLevel = 'ldDebug';
$EncoreInstance = 'EncoreInstance_0';
$XMLIn = '';
$result = $client->Logon($Operator,$OperatorPassword,$CompanyId,$CompanyPassword,$LanguageCode,$LogLevel,$EncoreInstance,$XMLIn);
} catch(Exception $e){
echo "<pre>";
print_r($client);
}
以上呼叫生成波纹管错误:
SoapClient Object
(
[_stream_context] => Resource id #1
[_soap_version] => 1
[sdl] => Resource id #3
[httpsocket] => Resource id #4
[_use_proxy] => 0
[httpurl] => Resource id #5
[__soap_fault] => SoapFault Object
(
[message:protected] => Server was unable to process request. ---> Operator '{blank}' not found
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/sites/domain/dev38/test.php
[line:protected] => 33
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /var/sites/domain/dev38/test.php
[line] => 33
[function] => __call
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => Logon
[1] => Array
(
[0] => Operator given by client
[1] =>
[2] => CompanyId given by client
[3] =>
[4] => ENGLISH_US
[5] => ldDebug
[6] => EncoreInstance_0
[7] =>
)
)
)
[1] => Array
(
[file] => /var/sites/domain/dev38/test.php
[line] => 33
[function] => Logon
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => Operator given by client
[1] =>
[2] => CompanyId given by client
[3] =>
[4] => ENGLISH_US
[5] => ldDebug
[6] => EncoreInstance_0
[7] =>
)
)
)
[previous:Exception:private] =>
[faultstring] => Server was unable to process request. ---> Operator '{blank}' not found
[faultcode] => soap:Server
[detail] =>
)
)
答案 0 :(得分:0)
您似乎正在尝试使用SYSPRO Web服务 - 根据与其集成的SYSPRO版本,可能更好/更容易使用我们的e.net通信服务(通过WCF)进行集成。
InfoZone上有关于这两者的信息,您也可以在SYSPRO Forums上发布有关产品的问题以及您可能遇到的任何问题。