Barack Obama - Change We Can Believe In

Viewing By Entry / Main
June 3, 2004
Can you consume the salesforce.com web services from ColdFusion? According to this thread on the Macromedia forums it was looking extremely unlikely. A recent thread on cfaussie, which spilled over onto CFCDev, asked a similar question (about Australia's StratPay web services). The common factor in both was that requests needed very specific headers for the call to succeed. By coincidence, I'd just started looking at the salesforce.com web service API so, at first, I stumbled on the same problem.
There are two interesting issues with the salesforce.com web services:
  1. They hand you back a new URL when you login that you must use for subsequent calls
  2. They hand you back a session ID when you login that you must pass back as a SOAP header in subsequent calls
Read the thread to see my solution. It relies on two primary things:
  1. Being able to call the underlying Java methods on the web service proxy object, i.e., setHeader() and _setProperty()
  2. Being able to construct the appropriate SOAP headers using the underlying Java Axis classes
It took much reading of the Sun Java documentation and a couple of invaluable pointers from Macromedia's own Tom Jordahl to figure this stuff out. Hopefully, it'll save many other folks from similar pain...

Comments

The thread does explain how to call a web service that needs a SOAP header.

But is there a way to create a web service that accepts a SOAP header (something link a sessionID). And if so, will I be able to call it from .Net and Java?

I have tried creating a webservice that looks for a SOAP header using the addResponseHeader . It works fine with ColdFusion (ie I am able to call it from ColdFusion) but not from .net.

Any way to do this?

Thanks


Hi Sean,

I am just looking at the salesforce.com integration with CF issue again - did you ever get anywhere with this, does CF8 change anything?

Just thought I'd check before I dive in an tread a path already well trodden!

Cheers,

Sid.


@Sid, I haven't had to attempt anything with SF.com for years (that was a project I was involved with I was still at Macromedia!) so I've no idea how it plays out today. Sorry.


Post Your Comments
Name:
Email Address:
Comments
*** Please note that all comments require moderation so it may be some time before your comment posts to this blog! ***
Remember My Information:
 



Hosting provided by