How i create web services & call web services?

Give me the solution of how i create webservices & call it and what is purpose of web services ??

Pls


Guree
0
nareshguree23
6/22/2007 11:02:57 AM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

3 Replies
1663 Views

Similar Articles

[PageSpeed] 47

 >how i create webservices
Very much the same as creating a new web site site - it is just a different project type.

> & call it and
Add a web reference to an existing project to consume the web service.

>what is purpose of web services ??
To send and receive data.


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
6/22/2007 11:12:53 AM

 how to create a simple web service:

1. in the VS 2005 right click your web site in the solution explorer and click on Add New Item

2. Choose WebService from the items and rename your WebService e.g (MyFirstWebService.asmx)

3. From the solution explorer: double click MyFirstWebService.cs (or MyFirstWebService.vb depending on the selectes language) file

4. Add the following code:

    [WebMethod]
    public string MyFirstWebMethod() {
        return "This is my first web method";
    }

Notice that in order to expose your web method to other applications it has to be public and it has to be decorated with the [WebMethod] attribute.

5. Build your application

now your web service is available to be referenced as a web reference.

How to call the web method from other applications:

Note: the following walkthrough shows how to add a web reference to your web service from a web site in the same solution, however, an exposed web service can be referenced from any other project. 

1.  in the same solution go to File menu, click on Add New Website menu item

2. Choose asp.net web site and rename it to WebServiceCaller

3. Right click the WebServiceCaller website and click on Add Web Reference...

4. The Add Web Reference Dialog window will pop up, click on "Web services in the same solution" link. This will list all web services within the same solution

5.  Click on MyFirstWebService link and wait till the wizard discovers the web service's web methods

6. Rename the Web reference name to : MyFirstWebReference

7. in the WebServiceCaller website, go to the code behind of the default.aspx page

8. wirte the following code in the Page_Load event handler:

        MyFirstWebReference2.MyFirstWebService ws = new MyFirstWebReference2.MyFirstWebService();
        Response.Write(ws.MyFirstWebMethod());

 9. Right click your default.aspx and click on "view in browser"

and.... you're there!

This is my first web method will appear at the top of the page.
Please let me know if you need further assistance.
Cheers! 

<%= Eyad.Salamin %>

<aspForums:DontForget>Don't forget to click on Mark as answer on the post that helped you.

This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. </aspForums:DontForget>
0
eyad
6/22/2007 11:35:49 AM

nareshguree23@gmail.com:
and what is purpose of web services ??
 

Read this article:

W3C Web Services Activity Statement

 


<%= Eyad.Salamin %>

<aspForums:DontForget>Don't forget to click on Mark as answer on the post that helped you.

This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. </aspForums:DontForget>
0
eyad
6/22/2007 11:43:22 AM
Reply:

Similar Artilces:

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

Can you call a web service from a web service?
I am trying to create a web service that itself consumes a 3rd party web service outside of our corporate firewall - so basically a web service consuming another web service.  I can consume this outside web service directly in an ASP.NET application without a problem.  But because the code is long and cumbersome, I wanted to provide our GUI developers an easy way to get all of the data they need from one source.  So I thought I could create an internal web service that would do a lot of things (query internal systems, for example) as well as consuming this external service.&nb...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

PB 11.5.1 (4011)
Hello Everyone, I am getting a strange error when calling a C# Web Service in PB 11.5.1 (4011). System.OutOfMemoryException When my application starts, I do the following: application global variable n_uploaded_files gnv_uploaded_files open event of application gnv_uploaded_files = CREATE n_uploaded_files n_uploaded_files instance variable s2010_upload_web_service iproxy_webservice SoapConnection iSOAP_connection constructor event of n_uploaded_files isoap_connection = CREATE SoapConnection of_instantiateservice(iproxy_webservice, "s201...

create valid xml to send to web service based on the schema provided by web service
Problem: I have a web page which is being populated from a dataset containing multiple tables.  I now need to call a web service and send the majority of this data to be incorporate into a mainframe system.  I have been supplied with the schema that the web service will be using to validate the data.  I am new to web services and I am not sure how to take my existing dataset and transform it into an xml document that matches the schema I was provided with. There is a main schema with an element which is a custom complex type.  This custom type consists of an element whi...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Is web services a part of web Service?
  I have a question: Is web services a part of web server?? And when the client calls web service, it means that client calls web server?? Or is it a different entity in itself which communicates separately both with client and server and acts as middleware application.. I am very confused.. Can someone explain me the architecture...??? Thanks..Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your thread as Resolved so that new users will know where to search for their queries. When you build and dep...

what are web services and what are the advantages of web services?
 Hello  i am new to this .net stuff and i was ask on the job interview what a web services is?and if i did not know given that i had a project ( as a project manager,  or a web developer)   what  is it? how do i start a >NET project on it? what are the main advantages is?  HOW DO I START THIS IN THE INTERVIEW>  and what basic books do i buy?   Hi There, There plenty of source on the net about webservice Definiton: http://en.wikipedia.org/wiki/Web_service http://www.codeproject.com/Purgatory/Defining_Web_Services.asp...

DynamicPopulateExtender: Web Service call failed: 12152, Web Service call failed: 12031
Hi, I'm using a DynamicPopulateExtender to take the value of a SELECT dropdown and pass it to an onpage web service (defined with <System.Web.Services.WebMethod()> _ '<System.Web.Script.Services.ScriptMethod()>) and as PUBLIC SHARED FUNCTION myfunction(contextKey as string) as string. The function returns the html for a listbox. Everything seems to fire properly on the client but when the web service is called by the Javascript function, I get Web Service call failed: 12152 or Web Service call failed: 12031 Any pointers would be appreciated.  Do...

asynchronous call of web service method from another web service
I am calling a web service method from within another web service.  Both are called asyncrhonously. Webservice 1 is invokde from a consumer app and its completed event is assigned an event handler, this works ok  The webservice being called is itself invoking another webservice and asynchronously calling another web method, again Ive assigned an event handler to its completed event, which works.  My problem is how do i expose the ouput (a dataset) of the second web method to the first web method ? Hi, Please have a look at this article: http://msdn2.microsoft.com/en-us/li...

Calling an asynch web service within an asynch web service.
I have read two different articles regarding optimizing thread pool utilization by calling asynchrounous web methods and then calling an asynchronous method within them. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service10012002.asp http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx The first article has an asynch web service method asynchronously calling another web service method. The second article has an asynch web service method spawning a new .NET thread and asynchronously calling it. I would like to use...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

Web resources about - How i create web services & call web services? - asp.net.xml-web-services

United States Department of Health and Human Services - Wikipedia, the free encyclopedia
The United States Department of Health and Human Services ( HHS ) is a Cabinet department of the United States government with the goal of protecting ...

LifeLock ID protection service to pay record $100 million for failing customers
... states. LifeLock was given a slap on the wrist and a $12 million fine in 2010 for falsely advertising its identity theft protection services. ...

Inside Apple’s plan to turn the iPhone into a subscription service
Apple is trying a new subscription service that would allow consumers to get an iPhone annually at no additional cost. At Business Insider's ...

US Postal Service to hoverboards: You're grounded
The only option for mailing a hoverboard via USPS is Standard Post, which is limited to ground transportation.

Which music-streaming service is right for you?
Discover what the big six music services offer and which best suits your sonic needs.

Secret Service officer shot and killed
A suspended member of the Secret Service's uniformed division was shot and killed in southwest Washington on Tuesday hours after making a court ...

Gillette Suing Dollar Shave Club Claiming Razor Subscription Service Infringes On Its Patents
... it’s no surprise that competition is fierce. In an effort to protect its slice of the market, Gillette is suing online subscription razor service ...

Budget Deal: Republicans In Service To Oil Companies, Never The Public
The "omnibus" budget for the next year is out. Here are some of the winners and losers. With a Republican Congress, every budget battle is about ...

Good news for Apple: free music services must pay higher royalties
In news which could well be good for Apple Music, but bad for rival free streaming music services, the federal Copyright Royalty Board has ruled ...

Canadian ISP Rogers Launches Gigabit Service, 4KTV -
Canadian ISP Rogers Communications says that the company has started offering gigabit broadband service in parts of Toronto. Rogers plans for ...

Resources last updated: 12/18/2015 11:09:58 AM