2016-09-06 15 views
0

ありがとうございます。 今週私は、私たちのプロジェクトにsyspro APIを統合するための要求フォームクライアントを受け取りました。彼は私にAPIの詳細を教えてくれましたが、sysproのドキュメントは少ないので、私は多くの問題に直面しています。だから私はSOAPクライアント呼び出しを作成するために以下のような簡単なテストファイルを作成しましたが、例外をスローするコードがあります。私は間違ったパラメータを渡してしまったり、間違った資格を持っていることに気付かない。コール生成怒鳴るエラー以上Syspro Soap API例外:サーバーが要求を処理できませんでした。 --->演算子 '{空白}'が見つかりません

<?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); 
} 

あなたはSYSPRO Webサービスを使用しようとしているように見えます
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

- それに統合されているSYSPROのバージョンに依存して/簡単に良いかもしれません当社のe.netコミュニケーションサービス(WCF経由)を使用して統合します。

InfoZoneには、これらの両方に関する情報があります。また、製品および問題について投稿し、SYSPRO Forumsに質問することもできます。

+0

あなたのご意見をCrisにお寄せいただきありがとうございます。あなたが共有したリンクを確認し、結果を返します。 –

関連する問題