Calling a method from a Web Service

S

Steven Blair

Hi,

I have created a simple webservice which will take a string paramter and
return a string. I can run this from the IDE and select the method I
want, then hit Invoke.

I need to call this method automatically. I am using a book which
indicates using this command in my browser:

http://localhost/WebService1/Service1.asmx/HelloWorld?

would allow me to call the meethod automatically. This howerever,
returns the following error:

http://sedna/WebService1/Service1.asmx/HelloWorld?

Obviously, the next step is to pass a parameter in.

Can anyone help me out?

Regards,

Steven
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

Given you haven't restricted the set of allowed protocols to SOAP in the
Web.config, you should be pretty able to invoke the method given the URL
below.
But the arguments should be submitted through a HTTP POST request. You can
navigate to http://sedna/WebService1/Service1.asmx?op=HelloWorld to review
the request details for various protocols.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top