interface to web service

  • Thread starter Thread starter Stephen.Schoenberger
  • Start date Start date
S

Stephen.Schoenberger

Hello,

Can someone provide me some resources/point me in the right direction
as far as converting standard C# interfaces into web services? I have
a .cs file that includes an interface and all of its supporting
classes, functions, etc.. Any advice would be great.

Thanks
 
Well, under WCF pretty much all you need to do is to mark those
interfaces as [ServiceContract], mark the methods as
[OperationContract], and expose it via an svc.

Best thing to do is to get the latest WCF VS preview from Microsoft
and have a look at the sample services, and subscribe to them from a
simple interface. Look for "vsextwfx.msi" on microsoft.com

Marc
 
more than a couple ways
here is an easy one

Inside web developer
1.create an Asp.Net WebService project
or
1.create an Empty Website project and add WebService as a new Item

2.Add Existing item - Your .cs file

3.in the .cs file for the webservice, create methods that you want to
expose to the web with same method signatures and call the methods of
the class in your .cs file there and return values accordingly

4. on top of method names in the .cs file of the webservice, add
"[WebMethod]" attribute. Look at the Hello World example method thats
included in the .cs file of the webservice created by web developer

Does this help?
 
Mark, you may have noticed, MSDN is not up to date with naming their
files
They don't remove setup files for older versions and continue with
same file names
Many of them being setup.exe, setup.msi, and in this case vsextwfx.msi
 
more than a couple ways
here is an easy one

Inside web developer
1.create an Asp.Net WebService project
or
1.create an Empty Website project and add WebService as a new Item

2.Add Existing item - Your .cs file

3.in the .cs file for the webservice, create methods that you want to
expose to the web with same method signatures and call the methods of
the class in your .cs file there and return values accordingly

4. on top of method names in the .cs file of the webservice, add
"[WebMethod]" attribute. Look at the Hello World example method thats
included in the .cs file of the webservice created by web developer

Does this help?

Can someone provide me some resources/point me in the right direction
as far as converting standard C# interfaces into web services? I have
a .cs file that includes an interface and all of its supporting
classes, functions, etc.. Any advice would be great.

Will this work since the .cs file has multiple classes and multiple
functions within those classes....
 
sure it will as long as u include all those cs files in the project

more than a couple ways
here is an easy one
Inside web developer
1.create an Asp.Net WebService project
or
1.create an Empty Website project and add WebService as a new Item
2.Add Existing item - Your .cs file
3.in the .cs file for the webservice, create methods that you want to
expose to the web with same method signatures and call the methods of
the class in your .cs file there and return values accordingly
4. on top of method names in the .cs file of the webservice, add
"[WebMethod]" attribute. Look at the Hello World example method thats
included in the .cs file of the webservice created by web developer
Does this help?
On Apr 13, 8:38 am, (e-mail address removed) wrote:

Will this work since the .cs file has multiple classes and multiple
functions within those classes....
 

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

Back
Top