Sara Has No Limits

Good Programmers Evaluate, Simplify, Automate and Document

Web Services

More about Web Services and Unit Testing


One of the limitations of Salesforce unit tests is that they do not make web service call-outs. So, how do you satisfy unit testing requirements for any apex code that does web service call-outs?  You have two options. Option 1: Programmatically generate a mock call-out In the following example, a class which implements HttpCalloutMock is used to create a fake response: Your unit test code will then invoke the test […]

Continue Reading →

Receiving and Sending Emails Through Apex


Inbound Email Services Automated process that uses Apex classes to process the content, headers and attachments from inbound emails to a email address. Each email service has one or more salesforce-generated email addresses to which users can send a message for processing. An email service only processes messages it receives at one of it’s addresses. For example, you can create an email service that automatically creates contact records based […]

Continue Reading →

Working with Web Services

Custom Web Services The webservice keyword allows developers to create their own SOAP Web Services and defines methods that are inherently global Two ways to invoke Web Services: From the AJAX toolkit by importing the apex.js library and call the execute method From a client program by importing the WSDL and calling the custom method directly Access WSDL support through Setup -> Develop -> Classes Guidelines for Creating Custom Web […]

Continue Reading →


Get every new post delivered to your Inbox.

Join 86 other followers