xsp/test
Marek Habersack 2bc83017ad 2008-02-08 Marek Habersack <mhabersack@novell.com>
* test/Web.sitemap: /1.1/asp.net/transfer2.aspx removed from the
	tree - it is not supposed to be accessed directly.

svn path=/trunk/xsp/; revision=95206
2008-02-07 23:20:42 +00:00
..
1.1 2008-02-08 Marek Habersack <mhabersack@novell.com> 2008-02-07 23:13:36 +00:00
2.0 typo fix 2007-11-20 23:04:49 +00:00
App_Code 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
controls 2007-11-21 Marek Habersack <mhabersack@novell.com> 2007-11-20 22:40:33 +00:00
.cvsignore 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-04-06 02:07:09 +00:00
DumpExtension.cs Write dump.log in the temp directory 2004-06-20 10:41:50 +00:00
EncryptExtension.cs * README: added descrption of web service samples. 2003-07-09 19:22:39 +00:00
Makefile.am 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
README update 2003-07-09 21:23:37 +00:00
SiteMapReader_1.1.cs 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
Web.sitemap 2008-02-08 Marek Habersack <mhabersack@novell.com> 2008-02-07 23:20:42 +00:00
button-vb.aspx 2005-06-17:2 Rafael Teixeira <rafaelteixeirabr@hotmail.com> 2005-06-17 18:18:18 +00:00
favicon.ico 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-06-15 16:14:57 +00:00
global.asax 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
index.aspx 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
index2.aspx 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
missing_components.aspx 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
mod-mono-server.exe.config 2004-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-05-03 21:49:53 +00:00
mono-powered-big.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-06-15 16:14:57 +00:00
mono-xsp.css 2007-11-21 Marek Habersack <mhabersack@novell.com> 2007-11-20 22:40:33 +00:00
mono.png 2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximan.com> 2002-07-28 18:51:02 +00:00
monobutton.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-06-15 16:14:57 +00:00
sample.webapp 2004-11-21 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-11-21 23:56:11 +00:00
small-icon.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2004-06-15 16:14:57 +00:00
web.config 2007-11-20 Marek Habersack <mhabersack@novell.com> 2007-11-20 18:43:24 +00:00
xsp.exe.config 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com> 2003-09-22 21:00:03 +00:00

README

xsp/test
---------
This directory contains little sample ASP.NET pages.

About Web Services samples
--------------------------

Summary of files:

TestService.asmx: A simple web service
ConverterService.asmx: Currency converter web service
DumpExtension.cs: Soap extension that dumps all requests to a file.
EncryptExtension.cs: Soap extension that encrypts all requests.
TraceExtension.cs: Soap extension that logs the soap messages.
ServiceClient.cs: Simple web service client
Reference.cs: Web service client proxies.
ServiceClient.exe.config: Configuration file for ServiceClient.

There are two sample web services, implemented in TestService.asmx and
ConverterService.asmx.

TestService.asmx is a very simple web services with two methods. It shows how
simple is to implement web services using ASP.NET.

The ConverterService implements a simple currency converter. With it you can
make conversions between a limited set of currencies, get a list of currency
rates, get the rate of a given currency or change the rate of a currency.

This sample shows most of the functionality you can get from ASP.NET
web services. 

The service uses Soap headers to keep information about the currently logged
user. Before calling any other method, the client must call Login(). This
method generates an Out header with user information that is sent and stored
in the client. All subsequent calls will include that header so the server
will be able to validate the user.

This WS also makes extensive use of Soap extensions. There are three of them:

- DumpExtension (DumpExtension.cs): This is a global extension that must be 
  configured in the web.config file. It dumps all requests and responses to
  the file dump.log. It will only dump the calls of classes that have the
  [Dump] attribute.
  
- EncryptExtension (EncryptExtension.cs): This extension uses the Rijndael
  algorithm to encrypt all information exchanged between the server and the
  client. For it to work, the web service class must have the [Encrypt]
  attribute. The client proxy class used to connect to the service must also
  have that attribute (see Reference.cs). This is also a global extension
  that must be configured in web.config.
  
- TraceExtension (TraceExtension.cs): This extensions logs the soap requests
  and responses to the file trace.log. The difference between TraceExtension
  and DumpExtension is that TraceExtension logs requests after it's been
  deserialized, so it can log the method name and parameter types and values.
  On the other hand DumpExtension just does a raw dump of the received stream.
  Another difference is that TraceExtension can be applied to individual
  methods, using the attribute [TraceExtension].

In the client side, the client proxies are implemented in Reference.cs.
There is a sample client implemented in ServiceClient.cs that makes some calls
to the services. 

How to test
-----------

Build XSP and start the server as usual.
cd to xsp/test and run ServiceClient.exe passing the hostname and port:

For example:

	mono ServiceClient.exe localhost:8080

After execution, you should see the files trace.log and dump.log in
xsp/server/test with the traces of the requests. You can try to add and remove
the encrypt extension from web.config and ServiceClient.exe.config and see
in dump.log the information being sent in each case.