> 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.
>
Something to try.....
You should find a method in the web service object called
setMaintainSession.
Try doing ws.setMaintainSession(true); after creating your ws object and
before calling the login method.
If you have enumerated data types to work with in the web service, take
a look at this email from Tom Jordahl (watch the wrap on the URL):
http://www.houseoffusion.com/cf_lists/index.cfm?method=messages&ThreadID=30232&forumid=4𥀔
If it might of use, I wrote a udf that recurses through web service
objects and converts it to a CF struct/array, so that you can do stuff
like dump the object and actually see what data you're getting back.
Drop me a line and I'll send you a copy. (One day I'll tidy it up enough
to go on cflib)
Regards
Stephen
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

