You need to sign in to do that
Don't have an account?
CFMX_DEV
Has anyone successfully implemented with ColdFusion MX?
I need to know if it is even possible to integrate with Salesforce APIs using ColdFusion MX.
I've seen several postings regarding MX with no solutions and after five days of development I have not been able to make it work.
If anyone HAS successfully used MX, please let me know.
Thank you.
We have been using CFMX with v. 2.0 (XML-RPC) of API for about a year now. I couldn't get SOAP version to work with ColdFusion and we are now slowly moving towards .NET for sforce development. I am willing to share my CF code but I wouldn't recommend for new development as we have experienced many errors when sforce was upgraded on Nov and I was also recommended NOT to use XML-RPC for future development.
I can see why.
I'd love to see the CF code to see what you tried. My challenges have been resetting the SOAP endpoint URL and adding the sessionID to the header. I think I have that working, but now ALL of my operations come back, "Web service operation "getServerTimestamp" with parameters {} could not be found." for example.
Just for kicks, would you mind posting some CF code? Here's what I've tried so far:
(Note, I had to install the following hot fix from Macromedia in order to set the SOAP headers:
http://www.macromedia.com/support/coldfusion/ts/documents/webservices_header.htm
<cfscript>
// create service:
sfapi = CreateObject("webservice", "http://myDomain.com/salesforce.wsdl");
// login:
loginResult = sfapi.login("userName", "password");
// set session ID in the SOAP header:
addRequestHeader(sfapi, "sessionId", "#loginResult.sessionID#");
// attempt a request:
serverTimestampResult = sfapi.getServerTimestamp();
</cfscript>
<p><cfdump var="#sfapi#"></p>
<p><cfdump var="#loginResult#"></p>
<cfoutput>
loginResult: <strong>#loginResult#</strong><br>
serverUrl: <strong>#loginResult.serverUrl#</strong><br>
sessionID: <strong>#loginResult.sessionID#</strong><br>
userID: <strong>#loginResult.userID#</strong><br>
</cfoutput>
Message Edited by CFMX_DEV on 02-12-2004 10:45 PM
<cfxml variable="xmlLoginRequest" casesensitive="Yes">
<methodCall>
<methodName>sfdc.login</methodName>
<params><param><value><struct>
<member><name>version</name><value><string>2.0</string></value></member>
<member><name>username</name><value><string>xxx@xxx.com</string></value></member>
<member><name>password</name><value><string>xxx</string></value></member>
<member><name>secure</name><value><boolean>1</boolean></value></member>
</struct></value></param></params>
</methodCall>
</cfxml>
<cfset strLoginRequest="#ToString(xmlLoginRequest)#">
<cfobject name="xmlHTTP" class="Microsoft.XMLHTTP" action="create" type="COM">
<cfset xmlHTTP.open("POST", "https://na1.salesforce.com/servlet/servlet.Api", false)>
<cfscript>
xmlHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHTTP.setRequestHeader("Content-Length", 180);
xmlHTTP.setRequestHeader("Version", "HTTP/1.0");
</cfscript>
<cfset xmlHTTP.send("#strLoginRequest#")>
<!--- login response in XML format --->
<cfset xmlLoginResponse=XmlParse("#xmlHTTP.responseText#")>
CFMX_DEV,
Did you ever get it working? I started working on this this week and the found your thread and realized that we have gone about the same path.
I would love to hear if you came up with anything that will login properly. Once I get it working I would like to port the code to a cfc so that it could easily be used by other CF developers.
I will look forward to hearing from you.
JS
I am attempting to resurrect this thread as it was posted almost a year ago and there are still no definitive answers or code samples that I can find.
Has anyone been able to make SF fly with MX???
I've seen some valiant and bold attempts, but, I'm not sure if they were successful.
I was able to find the following info:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18939 <---- hotfix needed
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=7&threadid=781179&messageid=3008152#3008052 <--thread with working examples!!
http://sys-con.com/story/?storyid=43900 <---article on CFMX and Web Services
Hope this helps anyone else trying to do this!