Friday, March 27, 2009

The dangers of religious fundamentalists!

To be honest, I object to many of the current pope's ideology, unfortunately like America under Bush, the catholic church is now lead by a Christian fundamentalist.

To me this is incredible dangerous. Whilst saddened and worried by this, I am pleased that governments and professional bodies across Europe are prepared to standup to the church:

Les propos du pape Benoît XVI sur l'utilisation du condom, considérés comme inacceptables par le milieu scientifique, continuent d'alimenter la controverse.

Vendredi, l'éditorial de la revue médicale britannique The Lancet a accusé le pape d'avoir déformé la vérité scientifique lorsqu'il s'est exprimé sur l'utilisation du préservatif dans la lutte contre le VIH/sida, lors de son arrivée en Afrique à la mi-mars.

Le texte juge irresponsables les propos de Benoît XVI et exige qu'il revienne sur sa déclaration.

Quand une personne d'influence, responsable politique ou religieux, affirme publiquement quelque chose de scientifiquement faux, qui pourrait avoir un effet dévastateur sur la santé de millions de personnes, elle doit retirer ou rectifier cette déclaration.
— The Lancet

Thursday, March 26, 2009

ASP.net Hello World as a webservice


Microsoft had created some great tutorial videos for asp.net. This one starts by talking you through the default / template "Hello World" webservice within VS2005.





using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;

//Links on WSDL FYI
//http://www.w3.org/TR/wsdl
//http://www.w3schools.com/wsdl/default.asp

namespace WebServiceCSharp
{
///

/// Web service class Service1 with attributes describing the service and its binding.
///

[WebService(Namespace = "http://howdoi.org/", Description = "This is a sample service for How Do I videos.", Name = "MyService")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{

///

/// Simple web method w/o parameters that returns a string.
///

[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}

In the video he example the use of the above WebService, WebServiceBinding, WebMethod attributes. Next he starts /tests this basic webservice (as shown in the screen shot) from Solution Explorer, right click on .asmx file and choose "view in browser".

From here VS will create a test page (http://localhost:/Service1.asmx)

From here there is a link to invoke / test the HelloWorld method within our service (http://localhost:/Service1.asmx/HelloWorld)

This returns an xml version of HelloWorld:

Hello World