473,322 Members | 1,736 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,322 software developers and data experts.

strHashedPassword

help guys !!!
i am calling a webmethod from a webservice called helloWorld..

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}

but the thing is that when i am caling HelloWorld() method in my
application it is asking for parameters like AsyncCallback and asking
for some object....
i don't know why i am not able to straightway call my webservice method
like this:

wbService.Service1 wbSrvNew = new desktopAPP.wbService.Service1();
wbSrvNew.HelloWorld();
please elp guys as soon as possible !!!
go project due in two days

cheers

Nov 19 '05 #1
1 853
Hi Dear mo*******@gmail.com,

here are the samples of how to use a web method . For rest of the thing you
can visit the links what ever i give.

1st One
************************************************** **********
private void button1_Click(object sender, System.EventArgs e)
{
localhost.HelloWebServiceinC MyService = new localhost.HelloWebServiceinC();

System.Console.WriteLine(MyService.SayHello("John" ));
System.Console.WriteLine(MyService.SayGoodBye());

}

------------------------------------------------------------------------------------------------
here is the 1st Link(for complete article)
~~~~~~~~~~~~~~~~~~~~~~~~~~
http://abstractvb.com/code.asp?A=1006
************************************************** **********

2nd Example:
************************************************** **********
VB.NET
--------
Dim myHelloWorld As New HelloWorld()
Dim sReturn As String = myHelloWorld.SayHelloWorld()

C#
----
var myHelloWorld:HelloWorld = new HelloWorld();
var sReturn:String = myHelloWorld.SayHelloWorld();

------------------------------------------------------------------------------------------------
Here is the 2nd Link (for more information on how to use a web service)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://samples.gotdotnet.com/quickst...icesintro.aspx

************************************************** **********

3rd Example:
========
************************************************** **********
localhost.Service1 service = new localhost.Service1();
string result = service.HelloWorld();

MessageBox.Show( result );

------------------------------------------------------------------------------------------------
3rd Link for complete details on web services consuming
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.dotnetspider.com/technolo...bServices.aspx
************************************************** **********

For Anything and Everything, Please Let Me Know,

bye
Venkat_KL
Nov 19 '05 #2

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

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.