Generating Web Reference
Hi All,
I am working with VS 2003 and trying to generate a web reference for a web service. The ownere of the web service has recomemded to edit the Reference.cs class to make the application complatible with WS1.0. Below are the steps they have asked to do..
Step 1 :
The class generated for the Booking Engine Web Service will have been generated to inherit from following the class:
System.Web.Services.Protocols.SoapHttpClientProtocol
The proxy should be modified such that it inherits from the following class:
Microsoft.Web.Services.WebServicesClientProtocol
This will allow for integration with WS-Security and provide a simple means of attaching security tokens to the SOAP header sent as part of the request to the Booking Engine Web Service.
Step 2 :
To facilitate the use of the WS-Security objects without having to specify the full namespace, the following directives should be added:
using Microsoft.Web.Services;
using Microsoft.Web.Services.Security;
To use the WS-Security objects the file ‘Microsoft.Web.Services.dll’ should be placed in the ‘bin’ directory for the sample project and a reference added to this DLL.
This file is installed along with an installation of Web Services Enhancements (WSE) 1.0 for Microsoft .NET which can be downloaded from the following location on the Microsoft Downloads web site:
Step 3 ;
// Instantiate the Booking Engine Web Service proxy object
BookingEngine proxy =new BookingEngine ();
// Put the username & password into the WS-Security for the SOAP call
UsernameToken token =new UsernameToken("login", "test", PasswordOption.SendPlainText);
proxy.RequestSoapContext.Security.Tokens.Add(token);
Once I have done all these things and call the webservice method it returns following error
'Server was unable to process request. --> The root element is missing.'
Can anybody help me to figure out the error ?

