- NameSpace : Specifies the namespace, which defaults to "http://tempuri.org",
- Description : Specifies description text for the XML Web service
Showing posts with label Web Services. Show all posts
Showing posts with label Web Services. Show all posts
State few WebService attribute in XML Web Service ?
Various WebService attributes are :
What are various webmethod attributes in Web Service ?
The WebMethod attribute in Web Service provides the following properties:
- BufferResponse
- CacheDuration
- Description
- EnableSession
- MessageName
- TransactionOption
How to enable transaction in Web Service ?
Please follow below steps to enable transaction in Web Service :
1.Add a reference to System.EnterpriseServices.dll.
2.Add the System.EnterpriseServices namespace to the XML Web service
using System.EnterpriseServices;
3.Use the TransactionOption property of the WebMethod attribute, as shown below:
public class Service1 : System.Web.Services.WebService
{
[System.Web.Services.WebMethod(
TransactionOption=TransactionOption.RequiresNew)]
public string DoSomethingTransactional()
{
// The transaction was successful...
ContextUtil.SetComplete();
return ContextUtil.TransactionId.ToString();
}
}
1.Add a reference to System.EnterpriseServices.dll.
2.Add the System.EnterpriseServices namespace to the XML Web service
using System.EnterpriseServices;
3.Use the TransactionOption property of the WebMethod attribute, as shown below:
public class Service1 : System.Web.Services.WebService
{
[System.Web.Services.WebMethod(
TransactionOption=TransactionOption.RequiresNew)]
public string DoSomethingTransactional()
{
// The transaction was successful...
ContextUtil.SetComplete();
return ContextUtil.TransactionId.ToString();
}
}
What are different types of remotable objects ?
Two types of remotable objects :
- Marshal-by-value objects
- Marshal-by-reference objects
Difference between web services & remoting?
1) Protocol : Webservice can be accessed over HTTP protocol . Remoting can be accessed over any protocol (including TCP, HTTP, SMTP etc)
2) Interoperability : Webservices support interoperability across platforms, and are ideal for heterogeneous environments. Remoting requires the client be built using .NET, enforcing homogenous environment.
3) Ease of programming : Webservice is easy to create and deploy . Remoting is complex to create
4) State Management : Webservices are stateless . Remoting support for both stateful and stateless environments through Singleton and SingleCall objects
2) Interoperability : Webservices support interoperability across platforms, and are ideal for heterogeneous environments. Remoting requires the client be built using .NET, enforcing homogenous environment.
3) Ease of programming : Webservice is easy to create and deploy . Remoting is complex to create
4) State Management : Webservices are stateless . Remoting support for both stateful and stateless environments through Singleton and SingleCall objects
Subscribe to:
Posts (Atom)
Popular Posts
-
Stored Procedure vs Function Stored procedure cannot be executed using SQL Select command whereas Function (UDF) can be executed using SQL ...
-
SSRS stands for SQL Server Reporting Services . SSRS is server based reporting platform. It provides reporting functionality from different ...
-
Criteria BasicHttpBinding WsHttpBinding Security support This supports the old ASMX style, i.e. WS-BasicProfile 1.1. This exposes web ser...
-
Database Connection - Datereader requires an open database connection whereas Dataset does not require an open database connection Namespa...
-
IIS provides a variety of authentication schemes: • Anonymous (enabled by default) - Client does not provide any credetials • Basic - ...
-
Different types of diagrams in UML : UseCase diagram Class diagram Object diagram State diagram Sequence diagram Collaboration diagram...
-
Extents are basic unit in which space is allocated to tables and indexes. Extent is eight contiguous pages i.e 64 KB.
-
Normalization is a method to seperate data into multiple tables and relate these multiple tables. Some benefits of normalized database : 1)...
-
Refer below code to understand : using System; delegate void DelMethod(int x); // This is the delegate declaration // Example is Class c...
-
Authorization is used to determine whether user has access to resource or not. There are two ways to authorize a resource : File authoriza...