简体   繁体   English

如何在WebMatrix中创建Soap Client

[英]How do I create a Soap Client in WebMatrix

I am trying to connect to a web service using .net. 我正在尝试使用.net连接到Web服务。

I have a "Blueprint" for this. 我为此有一个“蓝图”。 However it is in PHP. 但是它在PHP中。 I want to do this using .net and basically i do not have Visual Studio. 我想使用.net做到这一点,基本上我没有Visual Studio。 I am running running WebMatrix. 我正在运行WebMatrix。

I checked the ASP.Net forums and I got this answer there 我检查了ASP.Net论坛,并在那里得到了这个答案

"WebMatrix doesn't provide any tooling for managing Web References. Open the Razor web pages site in Visual Studio and use that instead". “ WebMatrix不提供任何用于管理Web引用的工具。在Visual Studio中打开Razor网页站点,然后改用它。”

I got this LINK from SO which is brilliant but does not serve my purpose and I cannot install Visual Studio on my system. 我从SO那里获得了此链接 ,该链接非常出色,但没有达到我的目的,并且我无法在系统上安装Visual Studio。 I have to find a work around with Web Matrix. 我必须找到有关Web Matrix的解决方法。

HERE is the PHP CODE 这里是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;

?>

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM