Re: Need to write web service
- From: cj <cj@xxxxxxxxxxxxx>
- Date: Fri, 05 Oct 2007 14:27:30 -0400
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 writtenWeb Services are web applications but they can be used in any .NET
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?
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<WebMethod()>_
takes two numbers and returns the sum?
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.
- Follow-Ups:
- Re: Need to write web service
- From: ge0193387
- Re: Need to write web service
- References:
- Need to write web service
- From: cj
- Re: Need to write web service
- From: ge0193387
- Need to write web service
- Prev by Date: Re: Need to write web service
- Next by Date: Escaping apostrophe when inserting into sql database
- Previous by thread: Re: Need to write web service
- Next by thread: Re: Need to write web service
- Index(es):
Relevant Pages
|