Microsoft WCF =如何执行soap调用。 [英] Microsoft WCF = how to perform soap call.
问题描述
添加连接的服务后,我填写了请求变量。
如何执行soap调用。  
$
$
主要代码没有拨打肥皂电话。
      static void Main(string [] args)
      {
$
          ServiceReference1.UserRole4Request    x = new ServiceReference1.UserRole4Request();
          x.UUID =" 123";
          x.AppKey =" 4456";
          ServiceReference1.getUserRole4Request  xx = new ServiceReference1.getUserRole4Request(x);
          ServiceReference1.getUserRole4Response xxx = new ServiceReference1.getUserRole4Response();
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; var yy = xxx.result; < ===这是null
after adding the connected services i have populated the request variables.
how do i perform the soap call.
Main code is not making the soap call.
static void Main(string[] args)
{
ServiceReference1.UserRole4Request x = new ServiceReference1.UserRole4Request();
x.UUID = "123";
x.AppKey = "4456";
ServiceReference1.getUserRole4Request xx = new ServiceReference1.getUserRole4Request(x);
ServiceReference1.getUserRole4Response xxx = new ServiceReference1.getUserRole4Response();
var yy = xxx.result; <=== this is null
自动生成的代码来自wsdl
Auto generated code from the wsdl
推荐答案
您好,
您不创建响应,而是创建客户端代理的实例并调用 getUserRole4Async方法获得
响应。
You do not create a response but instead you create an instance of the client proxy and call the getUserRole4Async method to get a response.
客户端是 UserRole4PortClient
并传递您正在构建的请求。
这篇关于Microsoft WCF =如何执行soap调用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!