Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Tutorial for Web Service

Reply
Thread Tools

Tutorial for Web Service

 
 
Mark
Guest
Posts: n/a
 
      07-15-2004
Hi

Can anyone suggest me good tutorial for WebService ?

Marmik


 
Reply With Quote
 
 
 
 
Dale
Guest
Posts: n/a
 
      07-15-2004
So, Mark.. interesting that the CPS would support trading eBooks in a
fashion most likely in violation of the copyright and license agreements,
but with your voluminous number of posts for trading ebooks, you should be
able to find a web services tutorial in one of them.

Dale

"Mark" <> wrote in message
news:...
> Hi
>
> Can anyone suggest me good tutorial for WebService ?
>
> Marmik
>
>



 
Reply With Quote
 
 
 
 
Kondratyev Denis
Guest
Posts: n/a
 
      07-17-2004
http://msdn.microsoft.com/library/en...icesAnchor.asp
http://msdn.microsoft.com/webservices/


"Mark" <> сообщил/сообщила в новостях следующее:
news:...
> Hi
>
> Can anyone suggest me good tutorial for WebService ?
>
> Marmik
>
>



 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      08-12-2004
"Kondratyev Denis" <> wrote in message news:<cdapdd$o30$>...
> http://msdn.microsoft.com/library/en...icesAnchor.asp
> http://msdn.microsoft.com/webservices/
>
>
> "Mark" <> сообщил/сообщила в новостях следующее:
> news:...
> > Hi
> >
> > Can anyone suggest me good tutorial for WebService ?
> >
> > Marmik
> >
> >

I found this fustrating to find one that explains ALL the steps - I
don't have VisualStudio so I think there's a few added steps, but see:

http://www.asp.net/tutorials/quickstart.aspx
look under: Writing a Simple XML Web service
look at the MathService example this is the one I did.

You'll need to download the MS.Net SDK:
http://www.microsoft.com/downloads/d...displaylang=en

Then:

1. Create webservice code in asmx file: - MathService.asmx
Get wsdl from asmx file by typing something like following in the
browser (point to wherever your .asmx file is located):
http://localhost/webservice/mathservice.asmx?wsdl

then cut and paste it or do a "save as" and save it in a .wsdl file -
all expect the first line:
<?xml version="1.0" encoding="utf-8" ?>
-

2. Use WSML file to compile source for dll - this will produce
MathService.VB
To consume this service, you need to use the Web Services Description
Language command-line tool (WSDL.exe) included in the SDK to create a
proxy class that is similar to the class defined in the .asmx file.
(It will contain only the WebMethod methods.) Then, you compile your
code with this proxy class included.
WSDL.exe accepts a variety of command-line options, however to create
a proxy only one option is required: the URI to the WSDL. In this
example, we are passing a few extra options that specify the preferred
language, namespace, and output location for the proxy. We are also
compiling against a previously saved WSDL file instead of the URI to
the service itself:

from cmd-prompt either( depends if you want it in CS or VB):
wsdl.exe /l:CS /n:MathService /out:MathService.cs MathService.wsdl

wsdl.exe /l:VB /n:MathService /out:MathService.vb MathService.wsdl

Once the proxy class exists, you can create objects based on it. Each
method call made with the object then goes out to the URI of the XML
Web service (usually as a SOAP request).

3. Compile MathService.VB to MathService.dll
Once the source file is created either CS or VB from the WSDL then you
can compile the dll - you need to reference all the system components
you are calling:

e.g:

from cmd-prompt:
vbc.exe /t:library /r:System.dll /r:System.Web.dll
/r:System.Web.Services.dll /r:System.Xml.dll /r:System.Data.dll
MathService.vb


4. Add Dll to bin directory - e.g. c:\inetpub\bin

5. Add Reference in web.config to namespace dll.

<assemblies>
<add assembly="MathService"/>
</assemblies>

6. Create ASPX file to call new namespace

<%@ Import Namespace="MathService" %>


The only trick I want to try, don't know if you know is to Strong name
the dll so I can put it in the GAC. Do you or anyone else out there
know how.

Hope this helps - it took me a while to figure out all these extra
steps.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Do programmers enjoy video tutorial or written tutorial ? Linuxmank Java 36 08-08-2009 09:54 AM
Does timer in Web Service Global.asax block my Web Service from processing web-site requests? Leo Violette ASP .Net Web Services 0 04-17-2009 12:39 AM
Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot W. Watson Python 13 09-20-2007 04:29 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Tutorial for beginner/ Tutorial voor beginner Rensjuh C++ 7 09-02-2004 12:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57