0

私のvm wareのphpに基づいたelastixでagiプログラミングを使用しています

elastix で C# Web サービスを呼び出したい (elastix は php をベースにしています) これは、hello world を返す私の C# Web サービスです

using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;




  /// <summary>
  /// Summary description for WebService
  /// </summary>
  [WebService(Namespace = "http://tempuri.org/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
  // To allow this Web Service to be called from script, using ASP.NET AJAX,       
   [System.Web.Script.Services.ScriptService]
 public class WebService : System.Web.Services.WebService {

public WebService () {

    //Uncomment the following line if using designed components 
    //InitializeComponent(); 
}

[WebMethod]
public string HelloWorld() {
    return "Hello World";
}

}

そして、私のvmウェア(elastix)では次を使用します:

$res=file_get_contents("http://127.0.0.1:55194/WebSite2/WebService.asmx?op=HelloWorld");
$agi->verbose($res);

しかし、何も表示されませんでした。また、127.0.0.1にpingを実行しました

Web サービスで返される Hello World を取得したいのですが、助けてください

4

1 に答える 1