Salesforce Blogs

Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Engineering Abhinav Gupta Engineering Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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. 

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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.

Read More
Abhinav Gupta Abhinav Gupta

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?

Read More
Tech Abhinav Gupta Tech Abhinav Gupta

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…

Read More