如何调用此服务 [英] How to call this service

查看:67
本文介绍了如何调用此服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有以下服务我想使用.net来调用此服务它返回字符串可以指导我或使用休息服务发送片段



[OperationContract]

[WebInvoke(Method =GET,ResponseFormat = WebMessageFormat.Json,BodyStyle = WebMessageBodyStyle.Wrapped,UriTemplate =/?Username = {Username}&Password = {密码})]

字符串LoginUers(字符串用户名,字符串密码);

解决方案



添加服务引用到解决方案并命名(例如-svcRef)

SvcRef.Service1Client client = = new SvcRef.Service1Client();

client.LoginUsers(userName,密码)



我认为它可以帮到你



问候

拉维

Hi ,
I have below service i want to call this service using .net it returns string can u guide me or send snippets using rest service

[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "/?Username={Username}&Password={Password}")]
String LoginUers(String Username, String Password);

解决方案

Hi ,
Add a service reference to the solution and name it (eg-SvcRef)
SvcRef.Service1Client client= = new SvcRef.Service1Client();
client.LoginUsers(userName,password)

I think it may help you

Regards
Ravi


这篇关于如何调用此服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆