添加服务参考和添加Web参考? [英] Add Service Reference and Add Web Reference?
问题描述
我正在尝试将Web参考添加到Web服务( http://jira .atlassian.com/rpc/soap/jirasoapservice-v2?wsdl ),但是添加网络参考"在我的VS中为灰色.因此,我将Web服务链接添加为添加服务参考",VS识别了该Web服务,但是现在我在显示正确的类时遇到了问题. (注意:对于Windows Phone项目,添加Web参考"显示为灰色,对于常规的控制台应用程序",显示为灰色").当我将Web服务添加为Web参考时,可以访问JiraSoapServiceService
类.所以我可以做这样的事情:
I am trying to add web reference to web service (http://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl), however 'Add Web Reference' is greyed out in my VS. So i added the web service link as Add Service Reference, VS recognized the web service but now i am having issue with displaying right classes. (Note: The 'Add Web Reference is greyed out for Windows Phone project but it is not greyed out for regular Console Application). When i add web service as web reference, i get access to JiraSoapServiceService
class. so i can do something like this:
//jiraWS is name of web service
jiraWS.JiraSoapServiceService jira = new JiraSoapServiceService();
但是,当我将Web服务添加为服务引用时,我无法访问JiraSoapServiceService
类,并且需要访问该类才能调用Web方法.
However when i add web service as service reference, i cannot get access to JiraSoapServiceService
class and i need to have access to this class, in order to make call to web methods.
有人知道我该如何解决吗?
Does anyone know how i can fix this?
推荐答案
当您单击添加服务引用"时,单击高级"-然后在弹出窗口的底部是添加Web引用的选项:)
When you click on Add Service Reference click on Advanced - then at the bottom of the Popup is an option to add a Web Reference :)
这篇关于添加服务参考和添加Web参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!