简体   繁体   中英

How do I create a Soap Client in WebMatrix

I am trying to connect to a web service using .net.

I have a "Blueprint" for this. However it is in PHP. I want to do this using .net and basically i do not have Visual Studio. I am running running WebMatrix.

I checked the ASP.Net forums and I got this answer there

"WebMatrix doesn't provide any tooling for managing Web References. Open the Razor web pages site in Visual Studio and use that instead".

I got this LINK from SO which is brilliant but does not serve my purpose and I cannot install Visual Studio on my system. I have to find a work around with Web Matrix.

HERE is the PHP CODE

<?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的命令行工具,可用于为该工具生成所需的代码。您。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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