代码之家  ›  专栏  ›  技术社区  ›  Nick R.

.NET Web服务客户端-客户端发现响应内容类型为“text/plain”,但预期为“text/xml”

  •  0
  • Nick R.  · 技术社区  · 17 年前

    以下是我的一些代码:


    mySoapNamespace.mySoapClient soapClient = new mySoapNamespace.mySoapClient();
    
    //next I try to change the endpoint URL of the WSDL, misguided? ...
    soapClient.Url = "http://a_different_url/my_soap_server.wsdl";
    string result = soapClient.myTestMethod(); 
    Response.Write(result);
    

    1 回复  |  直到 17 年前
        1
  •  1
  •   Nick R.    17 年前

    代码

    soapClient。Url=“ http://a_different_url/my_soap_server.wsdl ";

    …实际上,我应该引用它背后的PHP脚本。

    soapClient。Url=“ http://a_different_url/my_soap_server.php ";