I am trying to implement webservices in my porject but the reference can't be found. What might be the issue here? What am I missing? This is how I reference the Web service. I went to the project root in the solution explorer. Right click and Add Web Reference. It showed the method and everything but when I go in the code to make reference I can't find it.
using System;
usin开发者_JAVA技巧g System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using net.webservicex.www;
I found the problem. You need to create a new website in order to show all the elements from the webservice. Creating a new Project was not giving me the expected results to be able to connect to the webservice.
I'm a little confused by the comments under the question...
If you are using a web-reference (2.0), you are asked for a "web reference name"; this doubles as your namespace to the item. You can access the service via something like MyWebReferenceName.MyServiceName
.
When you use the "add service reference" dialog (3.0+), you are prompted for a "namespace", which acts identically. In this case, the service is available at something like MyWebServiceReferenceName.MyServiceNameClient
.
精彩评论