You can read more about the SF API at http://www.sforce.com. I think that it is possible to do it with CFMX 6.1 as long as the reccomended hotfix is installed. (http://www.macromedia.com/support/coldfusion/ts/documents/webservices_header.htm)
The deal is I can not get it to work. The problem is that it seems our ability to set soap headers is limited. The proper SOAP request format is:
<!-- START SOAP REQUEST -->
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: aspen.salesforce.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 717
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance">
<soapenv:Header>
<ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="SoapService">
<ns2:sessionId
xmlns:ns2="urn:enterprise.soap.sforce.com">_ZnWl8zuUbtuhBXlNKOSU</ns2:sessionId>
</ns1:SessionHeader>
</soapenv:Header>
<soapenv:Body>
<getUserInfo xmlns="urn:enterprise.soap.sforce.com">
<getUserInfo xsi:type="xsd:string">[EMAIL PROTECTED]</getUserInfo>
</getUserInfo>
</soapenv:Body>
</soapenv:Envelope>
<!-- END SOAP REQUEST -->
I can login and get a valid login buy using this code:
<!--- Create web service and login: --->
<cfscript>
sfapi = CreateObject("webservice", "#WSDLURL#");
loginResult = sfapi.login("#userName#", "#password#");
</cfscript>
But when I try to access a method in the web service by:
<cfscript>
ws = CreateObject("webservice", '#WSDLURL2#');
addRequestHeader(ws, "sessionID", '#loginResult.sessionID#', "urn:enterprise.soap.sforce.com");
getUserInfoResponse = ws.getUserInfo("[EMAIL PROTECTED]");
</cfscript>
I continually get errors that header values are not being set.
The error is:
Could not perform web service invocation "getUserInfo" because AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader faultActor: faultNode: faultDetail: {urn:fault.enterprise.soap.sforce.com}fault: <sf:exceptionCode>INVALID_SESSION_ID</sf:exceptionCode> <sf:exceptionMessage>Invalid Session ID found in SessionHeader</sf:exceptionMessage>
So the question is this: <b>IS IT POSSIBLE TO CONSUME SOAP WEB SERVICES ????</b> Salesforce has done it with PHP, C# , Java, VB.Net., and even Pearl.
I am sure that it is a stupid error on my part but I sure don't see it.
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

