在为项目添加服务引用后连接Web服务 [英] connect a web service after adding Service reference for the project

查看:83
本文介绍了在为项目添加服务引用后连接Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我为与我合作的网络服务添加了服务参考,这是Monster商业网关。操作工作成功但在此之后并且不知道我应该做什么来与它进行通信以及如何将xml文件发送给它!

这是Monster http://doc.monster.com/real-time-提供的文档。发布 [ ^ ]似乎不太清楚为了我 !



任何帮助都将不胜感激。

Hello ,
I added a service reference for the web service that I work with , it 's the Monster business Gateway . The operation work succesfully but after this and don't know what I should do to communicate with it and how can I send my xml file to it !
This the documentation provided by Monster http://doc.monster.com/real-time-posting[^] that seems not very clear for me !

Any help will be appreciated.

推荐答案

现在你需要创建一个web引用的对象您已在项目中添加的内容。这将允许访问webservice的所有方法,你可以随意使用它。





now you need to create an object of the web reference that you have added in your project. this will give access to all methods of the webservice and you can use it as you wish.


Webservice obj = new Webservice();
string helloworld = obj.helloworld(); 





这将返回hello world字符串。如上所述,您也可以使用其他方法。



this will return the hello world string. like above you can use other methods as well.


这篇关于在为项目添加服务引用后连接Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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