How to write a web service?

groads2

Newcomer
Joined
May 23, 2012
Messages
16
Hi all:
I have been given a set of schemas and wsdl. I have to write an application that will submit a request to a service and get a response. I don't even know where to begin. Can someone tell me What type of service I am writing and some of the things I may need to do to make use of the schemas and wsdl to make a valid request? I hope this is even enough info for someone to give me some direction of what I can do to start. Please excuse my ignorance. Thanks.
 
web service info links

I don't even know where to begin.
.
I think you have to start by adding a web service to your VS.Net project.

Just to let you know "wsdl" (Web Services Description Language) is
probably something that is considered "legacy" at this point.

The modern equivalent I think is WCF (Windows Communication Foundation).
This is per the first answer in this StackOverFlow thread.

You should probably understand this first of all:
The Difference Between “Add Web Reference” and “Add Service Reference”
http://andrewtokeley.net/archive/20...dquo-and-ldquoadd-service-referencerdquo.aspx

You haven't said which version of VS.Net you are working with so
here's a few links:

How to add web reference in VS 2008 Project
MSDN: How to: Add a Reference to a Web Service
MSDN: Step 2: Adding a Web Reference

Create a .NET Web Service from WSDL file

Web Services Essentials: Chapter 6 WSDL Essentials
Generating C# Web Service Skeleton from wsdl

Creating and using Web Services with the .NET framework and Visual Studio.Net

Hopefully that is enough to get you started --there are literally whole books written about this stuff.
 
Re: web service info links

Thanks, this is great. I am and older programmer and lucky to be in the position I am in. This new technology is very different than any thing I have done in the last 30 years and now I am playing catchup. I will get started with this today. If you have any sources or books that I should get, please let me know. Thanks again.
 
Re: web service info links

I have been reading quite a bit about the service and am trying some thing now. This is where I am at. I am running windows7 and using visual webdeveloper express. I have installed IIS on my PC. I created a wcf application with vswe and on the project web properties I checked "use local IIs server". Project url text box I put "http://localhost/wcfwebservice1". Is this correct? I also read on another site to build the project and move the .svc and .config to the virtual directory. But I cannot find the .svc. Where is the virtual directory?
 
Re: web service info links

I have made progress. So far I have a simple webservice and client app that consumes the service. so my concept is working. Below is something I did with the real wsdl. Do I actually need access to the other parties site/service to use the wsdl utility?

c:\ConnWsdl\wsdl\queries>"c:\Program Files\Microsoft SDKs\Windows\v6.0a\bin\wsdl
.exe" InfoQueryService.wsdl
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]
Copyright (C) Microsoft Corporation. All rights reserved.
Error: Unable to import binding 'InfoQueryServiceBinding' from name
space 'https://coll.prodis.ct.org/wsdl/queries'.
- Unable to import operation 'InfoQueryOperation'.
- The element 'https://coll.prodis.ct.org/ctsp/queries/1.0:InfoQueryRequest' is missing.
 
Back
Top