Find file History
Permalink
..
Failed to load latest commit information.
1.1 Remove more gmcs references Dec 9, 2014
2.0 Remove more gmcs references Dec 9, 2014
App_Code 2007-11-20 Marek Habersack <mhabersack@novell.com> Nov 20, 2007
controls Removed all the traces of 1.1 code Mar 8, 2010
DumpExtension.cs Write dump.log in the temp directory Jun 20, 2004
EncryptExtension.cs * README: added descrption of web service samples. Jul 9, 2003
Makefile.am Removed all the traces of 1.1 code Mar 8, 2010
README update Jul 9, 2003
Web.sitemap * Fixed dbpage_test_setup for dbpage1.sqlite Person/email were Dec 15, 2008
button-vb.aspx 2005-06-17:2 Rafael Teixeira <rafaelteixeirabr@hotmail.com> Jun 17, 2005
favicon.ico 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> Jun 15, 2004
global.asax Removed all the traces of 1.1 code Mar 8, 2010
index.aspx [Unit tests] Rewrite test\index.aspx in html5 Jun 17, 2013
missing_components.aspx 2007-11-20 Marek Habersack <mhabersack@novell.com> Nov 20, 2007
mod-mono-server.exe.config 2004-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com> May 3, 2004
mono-powered-big.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> Jun 15, 2004
mono-xsp.css 2007-11-21 Marek Habersack <mhabersack@novell.com> Nov 20, 2007
mono.png 2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximan.com> Jul 28, 2002
monobutton.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> Jun 15, 2004
sample.webapp 2004-11-21 Gonzalo Paniagua Javier <gonzalo@ximian.com> Nov 21, 2004
small-icon.png 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> Jun 15, 2004
web.config 2007-11-20 Marek Habersack <mhabersack@novell.com> Nov 20, 2007
xsp.exe.config 2003-09-22 Gonzalo Paniagua Javier <gonzalo@ximian.com> Sep 22, 2003

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.