Click to See Complete Forum and Search --> : Possible for ASP.NET Webservice to consume another Webservice ?


Mutilated1
October 20th, 2006, 10:56 AM
Hello,

Can any of you give me guidance on how an ASP.NET C# webservice can make use of another Webservice ? Similar to how a web-reference works in a .NET windows application ?

I am tasked with using a certain webservice from Delphi 7 and due to the fact that this webservice requires x.509 certificates and I have not been able to make that work with Delphi, I have decided to call the webservice from .NET.

Well I have a basic windows Application made and installed a snippet of code that uses the certificate to invoke this webservice. Now I need to move that snippet of code into a .NET webservice where it can be invoked from Delphi.

My problem seems to be that I am unable to add a webreference to the C# ASP.NET webservice.

Can anyone point me in the right direction to accomplish this ?

Thanks!

jasonli
October 20th, 2006, 11:16 AM
I'm not sure what the problem was. But you can add web reference in C# ASP.NET web service project and it works.

Mutilated1
October 20th, 2006, 11:26 AM
hmmm - I was sure that there must be a way to do that, but I dont see it.

perhaps I've got the wrong type of project ?

When I create a C# webservice I don't really get a "project" I get a single file, with a hello world type class thats attributed as a webserice and webmethod.

Do I need a complete project ?

It was my understanding that I could use a single aspx type file

jasonli
October 20th, 2006, 11:31 AM
Oh, no. The service file type should be asmx.

Open VS 2005, and create new website, you would see a dialog. Then select "Asp.NET Web Service", select Location and Language, click OK. So, you get the webservice project.

Mutilated1
October 20th, 2006, 11:34 AM
Thanks.

Ok when I do that - instead of getting C# type webservice I get managed C++.

I'm sure I must be close now, how do I get the C# ASP.NET webservice project type ?

jasonli
October 20th, 2006, 12:01 PM
R U using VS 2005?