
Salesforce Blogs
Invoking “Apex WSDL” Web Services from Apex Code
Apex programming WSDL can be downloaded from the “Setup” area of your Salesforce org. Just land on the “App Setup > Develop > API” page. Instructions to download are shown below:
Salesforce WSC added support for Session Timeout handling!
Retrying web service call failures/exceptions is important because not every exception means it’s the “end of the world." There is always some hope for some exceptions, like Session timeouts or Invalid session IDs. One can always renew the session (if credentials are available) and make those failing web service calls work again.
HTTP Compression with Apache Axis, a huge performance boost!
As mentioned in my previous post, I was researching/benchmarking on how HTTP Compression with Apache Axis improves performance. The results I got post HTTP compression, are surprisingly amazing…
HTTP Compression with Apache Axis for Salesforce Web Services!
I have been speaking a lot about using WSC above Apache Axis, but today I found an interesting old post about HTTP compression with Apache Axis. This is interesting because it can boost performance for those who are integrating with Salesforce web services using Java Apache Axis.
Understanding—No such column on entity 'Name' error!
One can get errors like: No such column ‘SmallPhotoUrl’ on entity ‘Name’ OR No such ‘column CompanyName’ on entity ‘Name’. On an SOQL statement like:
Debugging Sites Authorization Required Error!
Force.com sites redirects to “Authorization Required” page in case something goes wrong behind the scenes, for ex…
Isolating Apex Test Data from Actual Org/User’s Data!
The key to write a good apex test case is isolate test-data from actual org/user data. If your test case in anyway depends on org data, then it will fail for sure in deployments across different Salesforce orgs…
Deep Dive: Static Context in Visualforce Apex Controllers
Apex static is always confusing for me. I am from a Java background, so it took a while for me to really understand the differences between Apex and Java static. This post discusses apex controller static behavior, i.e., in relation to Visualforce only.
Working with Aggregate SOQL queries/results in Batch Apex!
What if you want to create a Batch Apex Job that uses SOQL having aggregate functions like SUM, MAX, and COUNT on top of results grouped by the “GROUP BY” clause? You can’t easily create a Batch job via QueryLocator, as shown below. When working with Batch Apex in Salesforce, you might encounter a scenario where you need to run SOQL queries with aggregate functions like SUM, MAX, or COUNT while grouping results using the GROUP BY clause.
Batch Apex & First error: Attempt to de-reference a null object!
I stumbled upon a strange Batch Apex issue today. My batch job was going well in a few SFDC orgs; after deploying the same to a new org it stopped working completely. I just see, “First error: Attempt to de-reference a null object” in debug and apex logs.
Sorting Apex classes SObject using apex-lang code share project!
You must be stuck up with Apex, when sorting is required on instances of user defined classes and pre-loaded Sobjects. Unfortunately standard Apex API just gives a method List.sort(), that just works with primitive data types…
WSC Apache Axis ClassCastException Issue Fixed!
This post is especially for those with a Java application (production) working with SFDC web services via Apache Axis stubs (WSDL2Java). However, due to the known advantages of WSC, you want to add some new functionality, such as the Bulk API.
Handling SFDC Managed Package Namespace Prefix with Web Service Clients !
This post tries to cover a common night mare while developing solutions on top of Salesforce using Partner/Enterprise WSDL web services. So this post can be super helpful for developers working with following technologies with Salesforce Partner/Enterpise WSDLs…
Using Apex:Variable in Visualforce to Control HTML Markup Rendering
This post is for developers working on Visual Force. I came across an interesting way to control the rendering of HTML markup; previously, I was using “<apex:outputPanel .. />” for controlling the rendering of some HTML markup. This approach works….
Salesforce WSC Metadata WSDL Connector Configuration Issue – Solved!
I am working and doing R&D with the Salesforce WSC library to get Tolerado ported to it. Most of the pieces worked well, but I was initially stuck with Metadata WSDL issues. I faced the following two major blockers: Metadata WSDL Compilation Issue and Metadata Connector Config Issue.
Apex “No Operation Available Request” Web Service Errors!
Sometimes while working with Salesforce Web Service APIs, we get a “No Operation Available for Request” error. This error comes because the “Web service ENDPOINT URL” is not correct. In my case, this error came when I was trying to use “apex.wsdl” for executing Apex test cases via my Java code.
Using System.runAs() for Too Many Query Rows 501 errors!
501 error comes when we cross the governor limit, that is, “total number of records retrieved by SOQL queries”. As per this limit, a single Apex testMethod can only retrieve 500 rows in all SOQL calls.
Apex Library - Fast XML DOM
Apex wrapper on Apex DOM classes(Document, XmlNode). It exposes W3C DOM API for XML manipulation, which is pretty popular and known to most developers, so saves…
Fast XML DOM vs XmlDom Benchmarks!
Today I got a nice comment about “Fast XML DOM” script consumption being more of Ron Hess’s “XmlDom.cls”. That surprised me, and I thought, Why don’t I give it a try and publish the results?
Secure YUI Combo Usage Guide
YUI Dependency Configurator is a great tool for getting a single unified JS or CSS instead of several css/js files. Only problem with that is it doesn't works over "HTTPS". Browser's like Internet Explorer fail to load a web page delivered over HTTPS containing JS/CSS delivered over un-secure(HTTP) URLs…