Posts

Showing posts from October 26, 2008

SOAP XML and its features

SOAP is a protocol that can be used for accessing the Web pages. SOAP or Simple Object Access Protocol is an XML based Object invocation Protocol. SOAP was developed for distributed applications to communicate through HTTP and firewalls. SOAP is platform independent and it uses XML and HTTP to access services, servers and objects. SOAP consists of 3 parts: SOAP ENVELOPE: Defines a framework for expressing what is in a message and who should handle it. The SOAP envelope namespace defines header and body element names and the encoding style. SOAP ENCODING RULES: Defines a mechanism for exchanging instances of application defined data types. An encoding rule means an encoding style to know how it is applied to a specific data. SOAP RPC: Defines a method to represent Remote Procedure Calls and responses. Soap RPC uses a request/response model for message exchanges. The request that is sent to the end point is the call and the response it sends represents the result of the call sent. SOA

Advantages of web services

Web services built on XML based standards has a lot of benefits over the other web services that are based on RPC. The RPCs' are platform dependent but the web services built using the XML standards are platform and language independent. With this advantage you can use it for communication between any types of application that resides on any platform. The invocation information is passed to the service provider in the form an XML document and hence it is platform independent. The protocol used for such a transfer is the HTTP that is supported by all the browsers. Hence you can just pass on the information regarding the object that is to be executed through the browser itself using the HTTP. This is one of the major advantages of using the XML based web services as it can easily pass through the firewalls.

Insert data using dataset

In ADO.net we can insert data into database using with Dataset. this is very use full for insert update detele, no need to write storeprocedure for data insertion. we can also insert multiple rows in single connection. Code Example: SqlConnection cn = new SqlConnection(ConfigurationManager.AppSettings["constr"]); try { DataTable objTable; DataRow objRow; SqlDataAdapter objDataAdapter=new SqlDataAdapter(); DataSet objDataSet = new DataSet(); SqlCommand objCommand = new SqlCommand(); cn.Open(); objCommand.Connection = cn; objCommand.CommandText = "Select * from table_1 Where 1=2"; objDataAdapter.SelectCommand = objCommand; //** SqlCommandBuilder class's ability to auto- //** generate Insert command from the SELECT command. SqlCommandBuilder autogen = new SqlCommandBuilder(objDataAdapter); objDataAdapter.Fill(objDataSet, "table_1"); objTable = objDataSet.Tables[0]; objRow = objTable.NewRow(); objRow[1] = "name"; objRow[2] = "Address";

Display updated list view items with fading color effects in a ListView control

Introduction: Normally a list view is updated by a user directly by selecting a list view item and then editing or deleting it. New items are usually added at the bottom of the list. This works fine since the user knows which items have been changed or deleted and where the new items will pop up. A drawback of it is that, if the list is sorted, then new items will not be displayed in a sorted way, instead they will be listed in the order of being created. Some list views however are automatically modified because of some event which causes the list view to be updated. If these updates occur frequently, it will be difficult for the user to see what has changed, since the user has not initiated the change and did not expect it. An example of this is a list view displaying stock prices in real time. The stock prices are usually updated in a fast manner and keeping up with these updates is not an easy task. Highlighting these changes will definitely be a welcoming feature for the user. The