Wednesday, September 30, 2015

What is Web Service and What are different types of webservices?

What is Web Service and What are different types of web services?


A Web Service is can be defined by following ways:
  • Is a client server application or application component for communication.
  • Method of communication between two devices over network.
  • Is a software system for interoperable machine to machine communication.
  • Is a collection of standards or protocols for exchanging information between two devices or application.

Let's understand it by the figure given below:



As you can see in the figure, java, .net or PHP applications can communicate with other applications through web service over the network. For example, java application can interact with Java, .Net and PHP applications. So web service is a language independent way of communication.

Types of Web Services
There are mainly two types of web services.
  1. SOAP web services.
  2. RESTful web services.



SOAP Web Services

SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services. SOAP is a W3C recommendation for communication between two applications.


SOAP is XML based protocol. It is platform independent and language independent. By using SOAP, you will be able to interact with other programming language applications.


Advantages of Soap Web Services

WS Security: SOAP defines its own security known as WS Security.

Language and Platform independent: SOAP web services can be written in any programming language and executed in any platform.

Disadvantages of Soap Web Services
Slow: SOAP uses XML format that must be parsed to be read. It defines many standards that must be followed while developing the SOAP applications. So it is slow and consumes more bandwidth and resource.

WSDL dependent: SOAP uses WSDL and doesn't have any other mechanism to discover the service.

RESTful Web Services

REST stands for Representational State Transfer. REST is an architectural style not a protocol.

Advantages of RESTful Web Services

Fast: RESTful Web Services are fast because there is no strict specification like SOAP. It consumes less bandwidth and resource.

Language and Platform independent: RESTful web services can be written in any programming language and executed in any platform.

Can use SOAP: RESTful web services can use SOAP web services as the implementation.

Permits different data format: RESTful web service permits different data format such as Plain Text, HTML, XML and JSON.


SOAP vs REST Web Services

S.No
SOAP
REST
1
SOAP is a protocol.
REST is an architectural style.
2
SOAP stands for Simple Object Access Protocol.
REST stands for REpresentational State Transfer.
3
SOAP can't use REST because it is a protocol.
REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
4
SOAP uses services interfaces to expose the business logic.
REST uses URI to expose business logic.
5
SOAP defines standards to be strictly followed.
REST does not define too much standards like SOAP.
6
SOAP defines standards to be strictly followed.
REST does not define too much standards like SOAP.
7
SOAP requires more bandwidth and resource than REST.
REST requires less bandwidth and resource than SOAP.
8
SOAP defines its own security.
RESTful web services inherits security measures from the underlying transport.
9
SOAP permits XML data format only.
REST permits different data format such as Plain text, HTML, XML, JSON etc.
10
SOAP is less preferred than REST.
REST more preferred than SOAP.



Thanks for reading.....


Multiple currencies in salesforce.

Multiple currencies in salesforce.

Let's start with an example. Ravi is the Salesforce administrator at TCS. His company has sales representatives across the globe and deals coming in equally from the American, Asia-Pacific, and Europe/Middle-East regions. Currently, only the USD currency is enabled for her organization, so the sales reps are finding it difficult to enter the right amount in their local currency.

Multi-currency is a Salesforce limited and advance feature. After enabling it, the sales reps enter the amount in the Opportunity field in their local currency. Organizations can use multiple currencies in opportunities, forecasts, reports, quotes, and other currency fields. The administrator can set the corporate currency that reflects the currency of the corporate headquarters. The administrator also maintains a list of active currencies and their conversion rates relative to the corporate currency.


So, Ravi  decides to enable multiple currencies. He  contacts Salesforce.com Support and has it enabled a few days later in his Sandbox.

Enabling a single currency
In a single currency organization, you can set the organization-wide currency locale for your company but your Salesforce users cannot set individual currency locales.

Enabling multiple currencies

To enable multiple currencies in your organization, follow these instructions:
  1. Click on the Help and Training link in the top-right corner of the page. This opens a new page in the window.
  2. Click on Contact Support followed by the open a case icon. 
  3. Fill in the form as shown in the following screenshot and in the Product Topics field, select Limits & Feature Activation's:                                                                                                                                                                                               
  4. In the Business Impact area, give a proper reason for every question.
  5. Click on Next and submit the case.
  6. You will get an e-mail in which the administrator of the organization will have to provide the following details: 
  • Organization ID
  • Default currency
  • Confirmation that you understand that multiple currencies can't be disabled once enabled
  • Confirmation that you are a system administrator authorized on behalf of your organization to request multi-currency enablement  and that you consent to the lockout of this organization for a certain period of time, depending on your organization's data usage volume
    7. Once you answer the e-mail, the multiple currencies feature will be enabled by Salesforce.com.


Adding a new currency
At any time, the system administrator can add a new currency to the organization. To do so, follow these steps:
1.  Navigate to Setup | Administer | Company Profile | Manage Currencies.
2.  Click on Add New to add a new currency. It will redirect you to a new window where you can add new currency to your organization.
3.  To do this, you have to select Currency Type, Conversion Rate (find it from any exchange website), and Decimal Places:




Changing the corporate currency
At any time, the system administrator can change the corporate currency of the organization. To do this, follow these steps:
1. Navigate to Setup | Administer | Company Profile | Manage Currencies.


 2. Click on Change Corporate.
 3. It will redirect you to a new window where you can select a new  corporate currency for your organization.

NoteA new corporate currency dropdown shows only those currencies that are currently active for the organization


Effects of enabling multi-currency
The following are the effects of enabling multi-currency:
  • Multi-currency cannot be disabled once enabled. 
  • All records have a default currency stamped that you mentioned at the time of enabling it. 
  • Objects such as opportunities, opportunity products, opportunity product schedules, and campaign opportunities include fields that are multi-currency compatible, which allows a specific currency for the record. The main use of such fields is to specify the primary amount. 
  • After multi-currency is enabled, all currency fields show the ISO code before the field value, for example, $50 is USD 50. 
  • Once the currency is added to the supportive currency list, it can't be removed from the administrator's currencies list, even when it is deactivated.  
  • Users can set their own personal default currency, which is known as the secondary currency. In reports (while running a report for the user), the primary default currency is shown as the organization's default corporate currency and the user's personal currency is shown as the secondary currency.



Thanks for reading......

 
| ,