Click here to Skip to main content
15,898,036 members
Articles / Web Development / ASP.NET

Secure Web Services via Message oriented Middleware

Rate me:
Please Sign up or sign in to vote.
4.96/5 (43 votes)
1 May 200372 min read 337.4K   821   198  
Describes an approach for delivery of Soap Messages serialised using ASP.NET Web Client Services over MSMQ and MQ
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.0.3705.288
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by Microsoft.VSDesigner, Version 1.0.3705.288.
// 
namespace WSAltRouteTest.localhost2 {
    using System.Diagnostics;
    using System.Xml.Serialization;
    using System;
	using System.Net;
    using System.Web.Services.Protocols;
    using System.ComponentModel;
    using System.Web.Services;
    using WSAltRouteTest;    
    
    /// <remarks/>
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="ColourSoapBinding", Namespace="http://217.37.219.53/axis/Colour.jws")]
    public class ColourService : MySoapClientProtocol {
        
        /// <remarks/>
        public ColourService() {
            this.Url = "http://217.37.219.53:8080/axis/Colour.jws";
			//this.Url = "msmq://./private$/Q2";
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void save() {
            this.Invoke("save", new object[0]);
        }
        
        /// <remarks/>
        public System.IAsyncResult Beginsave(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("save", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public void Endsave(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getShortDescriptionReturn")]
		[SoapMsgCaptureExtension()]
        public string getShortDescription() {
            object[] results = this.Invoke("getShortDescription", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetShortDescription(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getShortDescription", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string EndgetShortDescription(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void setShortDescription(string shortDescription) {
            this.Invoke("setShortDescription", new object[] {
                        shortDescription});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginsetShortDescription(string shortDescription, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("setShortDescription", new object[] {
                        shortDescription}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndsetShortDescription(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("createColourReturn")]
		[SoapMsgCaptureExtension()]
        public Colour createColour() {
            object[] results = this.Invoke("createColour", new object[0]);
            return ((Colour)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegincreateColour(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("createColour", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public Colour EndcreateColour(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((Colour)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void deleteColour(string colourCode) {
            this.Invoke("deleteColour", new object[] {
                        colourCode});
        }
        
        /// <remarks/>
        public System.IAsyncResult BegindeleteColour(string colourCode, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("deleteColour", new object[] {
                        colourCode}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EnddeleteColour(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getAllActiveColoursReturn")]
		[SoapMsgCaptureExtension()]
        public string getAllActiveColours() {
            object[] results = this.Invoke("getAllActiveColours", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetAllActiveColours(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getAllActiveColours", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string EndgetAllActiveColours(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getCodeReturn")]
		[SoapMsgCaptureExtension()]
        public string getCode() {
            object[] results = this.Invoke("getCode", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetCode(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getCode", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string EndgetCode(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getColourReturn")]
		[SoapMsgCaptureExtension()]
        public Colour getColour(string colourCode) {
            object[] results = this.Invoke("getColour", new object[] {
                        colourCode});
            return ((Colour)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetColour(string colourCode, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getColour", new object[] {
                        colourCode}, callback, asyncState);
        }
        
        /// <remarks/>
        public Colour EndgetColour(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((Colour)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getImageReturn", DataType="base64Binary")]
		[SoapMsgCaptureExtension()]
        public System.Byte[] getImage() {
            object[] results = this.Invoke("getImage", new object[0]);
            return ((System.Byte[])(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetImage(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getImage", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public System.Byte[] EndgetImage(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((System.Byte[])(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("getLongDescriptionReturn")]
		[SoapMsgCaptureExtension()]
        public string getLongDescription() {
            object[] results = this.Invoke("getLongDescription", new object[0]);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BegingetLongDescription(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("getLongDescription", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public string EndgetLongDescription(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((string)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("isActiveReturn")]
		[SoapMsgCaptureExtension()]
        public bool isActive() {
            object[] results = this.Invoke("isActive", new object[0]);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginisActive(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("isActive", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public bool EndisActive(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
        [return: System.Xml.Serialization.SoapElementAttribute("isAssignedToProductReturn")]
		[SoapMsgCaptureExtension()]
        public bool isAssignedToProduct() {
            object[] results = this.Invoke("isAssignedToProduct", new object[0]);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginisAssignedToProduct(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("isAssignedToProduct", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public bool EndisAssignedToProduct(System.IAsyncResult asyncResult) {
            object[] results = this.EndInvoke(asyncResult);
            return ((bool)(results[0]));
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void purgeColours() {
            this.Invoke("purgeColours", new object[0]);
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginpurgeColours(System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("purgeColours", new object[0], callback, asyncState);
        }
        
        /// <remarks/>
        public void EndpurgeColours(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void setActive(bool active) {
            this.Invoke("setActive", new object[] {
                        active});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginsetActive(bool active, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("setActive", new object[] {
                        active}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndsetActive(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void setAssignedToProduct(bool assignedToProduct) {
            this.Invoke("setAssignedToProduct", new object[] {
                        assignedToProduct});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginsetAssignedToProduct(bool assignedToProduct, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("setAssignedToProduct", new object[] {
                        assignedToProduct}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndsetAssignedToProduct(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void setCode(string colourCode) {
            this.Invoke("setCode", new object[] {
                        colourCode});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginsetCode(string colourCode, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("setCode", new object[] {
                        colourCode}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndsetCode(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }
        
        /// <remarks/>
        [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://217.37.219.53/axis/Colour.jws", ResponseNamespace="http://217.37.219.53/axis/Colour.jws")]
		[SoapMsgCaptureExtension()]
        public void setLongDescription(string longDescription) {
            this.Invoke("setLongDescription", new object[] {
                        longDescription});
        }
        
        /// <remarks/>
        public System.IAsyncResult BeginsetLongDescription(string longDescription, System.AsyncCallback callback, object asyncState) {
            return this.BeginInvoke("setLongDescription", new object[] {
                        longDescription}, callback, asyncState);
        }
        
        /// <remarks/>
        public void EndsetLongDescription(System.IAsyncResult asyncResult) {
            this.EndInvoke(asyncResult);
        }



		protected override WebRequest GetWebRequest(Uri uri)
		{
			// Delegate
			return ProxyCommon.GetWebRequest(uri, this);
		}



		protected override WebResponse GetWebResponse(WebRequest webReq)
		{
			// Delegate
			return ProxyCommon.GetWebResponse(webReq);
		}
    }

    
    /// <remarks/>
    [System.Xml.Serialization.SoapTypeAttribute("Colour", "http://DefaultNamespace")]
    public class Colour {
        
        /// <remarks/>
        public bool active;
        
        /// <remarks/>
        public bool assignedToProduct;
        
        /// <remarks/>
        public string code;
        
        /// <remarks/>
        public string longDescription;
        
        /// <remarks/>
        public string shortDescription;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
I am the Technical Director for Myphones.com, which specialises in developing integrated VoIP products and services for the consumer and SME markets. Technology-wise, we are heavily into the 2nd generation WS stack atop .NET, and basically most things Microsoft, as well as C++ on Linux.

Comments and Discussions