社区
C#
帖子详情
C# Web Service 如何调用
HaiYang2006
2011-11-15 01:24:45
URL:http://192.1.6.8:80/ussd?wsdl
调用封装的方法:public String queryObjectOut (String id, String key, String queryXml)
C#如何写方法调用请求Url啊(soap 返回一个调用的方法:如query.queryObjectOut ("a","b","c") )?求高人指教,没玩过Web Service
...全文
123
9
打赏
收藏
C# Web Service 如何调用
URL:http://192.1.6.8:80/ussd?wsdl 调用封装的方法:public String queryObjectOut (String id, String key, String queryXml) C#如何写方法调用请求Url啊(soap 返回一个调用的方法:如query.queryObjectOut ("a","b","c") )?求高人指教,没玩过Web Service
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
9 条
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
打赏红包
qq598235031
2011-11-15
打赏
举报
回复
右键》》添加web引用(或者添加服务引用)》》-------------
然后在程序里,像普通对象一样new 对象object
而且有个XML
HaiYang2006
2011-11-15
打赏
举报
回复
[Quote=引用 7 楼 a496393868 的回复:]
邮件 添加引用 Web Service ,粘贴url到地址栏 Go 添加
[/Quote]
还有别的方法吗?
a496393868
2011-11-15
打赏
举报
回复
邮件 添加引用 Web Service ,粘贴url到地址栏 Go 添加
HaiYang2006
2011-11-15
打赏
举报
回复
[Quote=引用 5 楼 johnnyquid 的回复:]
楼主的意思是调用一个url接口吗?希望这个能帮到你。
strUrl="你的url";
public static void ReadUri(string strUrl)
{
string strResult = "";//用来获取结果
System.Net.WebRequest request = WebRequest.Create(strUrl);
WebRespon……
[/Quote]
谢谢,和我说的不是一个意思。
我的意思是调用接口创建个对象,然后调用对象里的queryObjectOut(...)方法,传参数进去返回查询结果的。
JohnnyQuid
2011-11-15
打赏
举报
回复
楼主的意思是调用一个url接口吗?希望这个能帮到你。
strUrl="你的url";
public static void ReadUri(string strUrl)
{
string strResult = "";//用来获取结果
System.Net.WebRequest request = WebRequest.Create(strUrl);
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string strLine = "";
int i = 0;
while (strLine != null)
{
i++;
strLine = sr.ReadLine();
if (strLine != null)
{
strResult += strLine;
}
}
}
HaiYang2006
2011-11-15
打赏
举报
回复
你没看懂?
HaiYang2006
2011-11-15
打赏
举报
回复
[Quote=引用 2 楼 cf_nxcxy 的回复:]
右键》》添加web引用(或者添加服务引用)》》-------------
[/Quote]
晕,这个都会。
cf_nxcxy
2011-11-15
打赏
举报
回复
右键》》添加web引用(或者添加服务引用)》》-------------
机器人
2011-11-15
打赏
举报
回复
你这是让大家猜接口吗?
相关推荐
在
C#
Winform里
调用
WEB
Service
API.docx
在
C#
Winform里
调用
WEB
Service
API.docx在
C#
Winform里
调用
WEB
Service
API.docx
在
C#
Winform里
调用
WEB
Service
API.pdf
在
C#
Winform里
调用
WEB
Service
API.pdf在
C#
Winform里
调用
WEB
Service
API.pdf
C#
调用
web
service
很好的Word
C#
调用
web
service
VB
调用
C#
web
service
VB
调用
C#
web
service
,同步数据
C#
调用
Web
Service
简单实例
C#
调用
Web
Service
简单实例 本文
发帖
C#
C#
.NET技术 C#
复制链接
扫一扫
10.8w+
社区成员
64.2w+
社区内容
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
帖子事件
创建了帖子
2011-11-15 01:24
社区公告
让您成为最强悍的C#开发者