Answer the question
In order to leave comments, you need to log in
Why are parameters not being passed?
Service code:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
[SoapDocumentMethod("Ping")]
public string Ping(string pingString)
{
return pingString;
}
}
[WebServiceBinding("PingServer.Service1")]
public class PingServiceProxy : SoapHttpClientProtocol
{
public PingServiceProxy()
{
base.Url = "http://localhost:53366/Service1.asmx";
}
[WebMethod]
[SoapDocumentMethod("Ping")]
public string Ping(string pingString)
{
return (string)base.Invoke("Ping", new object[] { pingString })[0];
}
}
using (PingServiceProxy proxy = new PingServiceProxy())
{
Console.WriteLine(proxy.Ping("Hello, World!"));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question