XML Web Services are .Net components , which reply to Http requests using the SOAP protocol (Simple Object Access Protocol). XML is one of the principal cornerstones of .Net technology which enables a high degree of interoperability between applications using the Internet. XML Web services are ASP.Net applications which handle requests for .asmx files.
The .asmx extension signals to ASL.Net that it contains non-visual components which are using the XML protocol. These files have a WebService header line which declares it as an XML WebService class. And each method has a WebMethod attribute to make the procedure accessible through the Internet.
When ASP.Net receives an .asmx page, it processes the directives and interprets the query buried within the calling string and produces an .aspx page which derives from the
DefaultWsdlHelpGenerator.aspx stored in the appropriate .Net directory on the server. You can customize that page, but it affects all the applications o f the server. Alternatively, you can change the web.config file to point to a local file to achieve control over the appearance of the page for a specific application.
On the client side, you need to create a Web Service Client which can be either be a Windows form, a Web form, or another Web services application. Don’t forget that the whole process is designed to make the services accessible from any computer running on any platform. This is possible because the actual services are running on the server, which must be running a .Net platform.
XML Web services support 3 protocols: Http GET, Http POST, and SOAP. GET and POST are old technology because they support passing only simple variables – no structures or objects. SOAP protocols support XML objects passed into and back from the server. These SOAP messages are actually XML structures which are passed in an XML envelope with specific requirements, chief among then being the tags methodResponse and methodResult. The grammar and bundling of these messages are handled transparently by .Net XML Services.
We reproduce the structure of the SOAPHttpClientProtocolClass below.
Public Constructors
SoapHttpClientProtocol Constructor
Supported by the .NET Compact Framework. Initializes a new instance of the SoapHttpClientProtocol class.
Public Properties
AllowAutoRedirect (inherited from HttpWebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets whether the client automatically follows server redirects.
ClientCertificates (inherited from HttpWebClientProtocol) Gets the collection of client certificates.
ConnectionGroupName (inherited from WebClientProtocol) Gets or sets the name of the connection group for the request.
Container (inherited from Component) Gets the IContainer that contains the Component.
CookieContainer (inherited from HttpWebClientProtocol) Gets or sets the collection of cookies.
Credentials (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets security credentials for XML Web service client authentication.
PreAuthenticate (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets whether pre-authentication is enabled.
Proxy (inherited from HttpWebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets proxy information for making an XML Web service request through a firewall.
RequestEncoding (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. The Encoding used to make the client request to the XML Web service.
Site (inherited from Component) Gets or sets the ISite of the Component.
Timeout (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. Indicates the time an XML Web service client waits for a synchronous XML Web service request to complete (in milliseconds).
UnsafeAuthenticatedConnectionSharing (inherited from HttpWebClientProtocol) Gets or sets a value indicating whether connection sharing is enabled when the client uses NTLM authentication to connect to the Web server hosting the XML Web service.
Url (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets the base URL of the XML Web service the client is requesting.
UserAgent (inherited from HttpWebClientProtocol)
Supported by the .NET Compact Framework. Gets or sets the value for the user agent header that is sent with each request.
Public Methods
Abort (inherited from WebClientProtocol)
Supported by the .NET Compact Framework. Cancels a request to an XML Web service method.
CreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Discover Dynamically binds to an XML Web service described in the discovery document at Url.
Dispose (inherited from Component) Overloaded. Releases the resources used by the Component.
Equals (inherited from Object)
Supported by the .NET Compact Framework. Overloaded. Determines whether two Object instances are equal.
GetHashCode (inherited from Object)
Supported by the .NET Compact Framework. Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetType (inherited from Object)
Supported by the .NET Compact Framework. Gets the type of the current instance.
InitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
ToString (inherited from Object)
Supported by the .NET Compact Framework. Returns a String that represents the current Object.
Public Events
Disposed (inherited from Component) Adds an event handler to listen to the Disposed event on the component.
Protected Properties
DesignMode (inherited from Component) Gets a value that indicates whether the object is currently in design mode.
Events (inherited from Component) Gets the list of event handlers that are attached to this Component.
Protected Methods
BeginInvoke
Supported by the .NET Compact Framework. Starts an asynchronous invocation of an XML Web service method using SOAP.
Dispose (inherited from Component)
Supported by the .NET Compact Framework. Overloaded. Releases the resources used by the Component.
EndInvoke
Supported by the .NET Compact Framework. Ends an asynchronous invocation of an XML Web service method using SOAP.
Finalize (inherited from Component)
Supported by the .NET Compact Framework. Overridden. Releases unmanaged resources and performs other cleanup operations before the memoryis reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax.
GetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
GetWebRequest
Supported by the .NET Compact Framework. Overridden. Creates a WebRequest instance for the specified url.
GetWebResponse (inherited from HttpWebClientProtocol)
Supported by the .NET Compact Framework. Overloaded. Overridden. Returns a response from a request to an XML Web service method.
Invoke
Supported by the .NET Compact Framework. Invokes an XML Web service method synchronously using SOAP.
MemberwiseClone (inherited from Object)
Supported by the .NET Compact Framework. Creates a shallow copy of the current Object.
Resources
• Information on XML Web Services
This is useful resource that discusses the evolving architecture, standards and tools for web services.
• Insightful information on XML Web Services and Security
This resource discusses XML Web Services and Security in detail.
Sunday, March 14, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment