2017-10-08 4 views
0

私が持っているWebサービスProcessmaker Webサービス

http://sandbox3.processmaker.com/sysworkflow/en/neoclassic/services/wsdl2 

ログイン

<?PHP 
    /*webservice connection NOTE: Replace this WebAddress with your instance*/ 
    $client = new SoapClient('http://sandbox3.processmaker.com/sysworkflow/en/neoclassic/services/wsdl2'); 
    $params = array(array('userid'=>'admin', 'password'=>'processmaker')); 
    $result = $client->__SoapCall('login', $params); 

    /*webservice validate connection: begin*/ 
    if($result->status_code == 0){ 
     p("Connection Successful!"); 
     p("Session ID: " . $result->message); 
     $session = $result->message; 
?> 
私は

が、私はプロジェクトを作成し、C#で、このWebサービスを呼び出す必要が

、クリックのためのPHPでの実装プロジェクト名およびサービス追加の参照について

SR_Processmaker

私は、ログインだけではuserId、およびパスワードでsessionId

using Processmaker_Webservice.SR_Processmaker; 
string userId = "1234567892"; 
       string password = "123456789"; 
       loginRequest login = new loginRequest(userId,password); 

を取得するためのコードの下に使用します。

XMLは、私を助けてください

<xs:schema elementFormDefault="qualified" targetNamespace="http://www.processmaker.com"> 
<xs:element name="login"> 
<xs:complexType> 
<xs:sequence> 
<xs:element name="userid" type="xs:string"/> 
<xs:element name="password" type="xs:string"/> 
</xs:sequence> 
</xs:complexType> 
</xs:element> 
<xs:element name="loginResponse"> 
<xs:complexType> 
<xs:sequence> 
<xs:element name="status_code" type="xs:integer"/> 
<xs:element name="message" type="xs:string"/> 
<xs:element name="version" type="xs:string"/> 
<xs:element name="timestamp" type="xs:string"/> 
</xs:sequence> 
</xs:complexType> 
</xs:element> 

processmakerのWebサービスを使用するすべてのものです。私は新しく、あなたの助けが必要です。

アドバンスありがとうございます。

+0

残念ながら、あなたは実際の問題何言及しませんでした。 - ) – khlr

+0

loginRequestメソッドからの応答を得るには、何も取得できません。 –

答えて

0

実際にはまだサービスを起動していません。それでは欠けていると、そのPHPラインと同等です:$result = $client->__SoapCall('login', $params);

ですから、loginRequest上のサービスクライアントと手をインスタンス化する必要があります:

string userId = "1234567892"; 
string password = "123456789"; 
var loginRequest = new loginRequest(userId, password); 

var proxy = new ProcessMakerServiceSoapClient(); 
var loginResult = proxy.loginAsync(loginRequest); 
var result = loginResult.Result; 

proxy.Close(); 
+0

Khlr、その仕事に感謝します。それは私にステータスコード3を与え、ログインに失敗したが、少なくとも私は消費方法を知っている。ありがとうございました:) –

+0

今すぐ正常に動作します。再度、感謝します –