Re: Need to write web service



I'm afraid I need to go more basic. When I start VB2005. I choose create web site, Correct? I've done one web app so far back about 6 months ago and don't really remember that much. I've been doing windows apps for years. I think for my web app I chose ASP.NET Web Site next but perhaps it was Empty Web Site--not sure, but I see ASP.NET Web Service which sounds more like what I want this time. Correct?

ge0193387@xxxxxxx wrote:
On Oct 5, 9:26 am, cj <c...@xxxxxxxxxxxxx> wrote:
I have used web services before WSDL files and such but never written
one. I need some basic starting info.

1. Can I write a web service in a windows app? or are all web services
asp web apps? In other words what type of program do I create?

Web Services are web applications but they can be used in any .NET
type (ASP, Windows, Mobile Device, etc.). When you have created your
webservice in your windows app when you go to add references you can
select Add Web Reference to add a webservice.


2. Anyone point me to a tutorial that is very basic like write one that
takes two numbers and returns the sum?

<WebMethod()>_
public function Sum (byval Num1 as integer, byval Num2 as integer) as
integer
return Num1 + Num2
end function

If you don't use the "<WebMethod()>" the method will not be visible to
programs calling the webservice.

3. Getting a bit deeper now, but I need to know if to use VB 2003 or
2005. One of our business partners who is going to have to use it
insists I have to write it in .net 1.1 and not 2.0. I really don't see
why he would care what it is written in. I would think using it over
the web would be generic.

While I'm not an expert on webservices by any means at all since its
compiled into XML before sending the request it shouldn't matter.
When using web services you'll find that your more complex object
types are tougher to send (ArrayList, List(of), Hashtable). Meaning
that you'll generally instead of sending a List(of String) you'll send
an array of string (String()). Also any objects you plan on sending
must be <Serializable()> in order to pass through the webservice which
would also mean that any language should interpret it.

The only real excuse I can find for this is ignorance or they might
want to maintain the webservice at some point and don't want to mess
with 2.0.


.



Relevant Pages

  • SSL and web services
    ... Hello- I have been through Google Groups and all over the web reading up on SSL and web services, and so far I think I am becoming an expert! ... I checked my proxy connections, dropped my firewall, made sure the service was running, proxied the WSDL files on my local machine, and that didn't do it. ... The only difference that i can see is that the web app process is using the ASPNET account, and not my local account, to execute the web service. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • RE: Web App Complexity Metrics / Scoping a Web App
    ... Web App Complexity Metrics / Scoping a Web App ...  - Does the application have a web services interface? ...
    (Pen-Test)
  • Re: How to consume Web Services in Mobile Applications?
    ... Sure you can consume web services in mobile applications. ... a Smart Client or a web app.? ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Start Web services as Windows Services start
    ... Web services run inside a web app which, in turn, runs in IIS. ... So long as IIS is set to start at bootup and the web app containing the web ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: webservice permissions
    ... > c) If you want to use a custom account for a web app pool identity, ... >>I have a client who is trying to deploy a webservice I wrote. ... >> service reads a file on a file server and delivers information about it. ...
    (microsoft.public.dotnet.framework.webservices)