【问题标题】:How do I create a Soap Client in WebMatrix如何在 WebMatrix 中创建 Soap 客户端
【发布时间】:2013-08-06 07:55:54
【问题描述】:

我正在尝试使用 .net 连接到网络服务。

我对此有一个“蓝图”。但是它是在 PHP 中。我想使用 .net 来做到这一点,基本上我没有 Visual Studio。我正在运行 WebMatrix。

我查看了 ASP.Net 论坛,并在那里得到了这个答案

“WebMatrix 不提供任何用于管理 Web 引用的工具。在 Visual Studio 中打开 Razor 网页站点并改用它”。

我收到了这个LINK 来自 SO 这很棒,但不符合我的目的,我无法在我的系统上安装 Visual Studio。我必须找到解决 Web Matrix 的方法。

这里是 PHP 代码

<?php


//1. Include soap library
require_once('lib/nusoap.php');

//2. instantiate soapclient class with the url of the soap server 
$client = new nusoap_client("URL for wsdl");

//3. Make a call to the web service
//the parameters to the Web Service must be encapsulated in an array in which the keys are the names defined for the service
$result = $client->call("Parameters to the Web Service));

//Display your result
echo "the latitude is ".$result;

?>

【问题讨论】:

    标签: php .net soap webmatrix


    【解决方案1】:

    如果您无法使用免费的 Visual Studio Express for Web(需要注册)添加相关服务引用并生成代理客户端,可以使用名为 SvcUtil.exe 的命令行工具来生成您需要的代码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-14
      • 1970-01-01
      相关资源
      最近更新 更多