473,385 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Calling a method from a Web Service

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
2 1292
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.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Steven Blair" <st**********@btinternet.com> wrote in message
news:ub**************@TK2MSFTNGP12.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #2
hi steven,

if you want to invoke the web service through a url you have to pass the
parameter to the web method if it has one .You said that your webmethod has a
string parameter

some thing like this
http://localhost/WebService1/Service...d?dg=microsoft
repace the dg in the above query string with your string parameter name

regards
Ansil
Trivandrum

"Steven Blair" wrote:
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
7
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
0
by: han zhiyang | last post by:
I've just studied the "how to" web service and the async pattern in donnet.I make a test with these knowledges,but I got a strange result. Here is my test. 1.Write a simple "Add" service named...
5
by: joeblast | last post by:
I have a Web service that gets the financial periods and hold a reference to a disconnected dataset built at initialization. Web methods work on the dataset inside the web service. Everything is...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.