troubleshooting Question

ColdFusion and RETS

Avatar of luksha
luksha asked on
ColdFusion LanguageSOAP Protocol
17 Comments1 Solution1431 ViewsLast Modified:
Hi All,

I am trying to get into the RETS system using ColdFusion.

At this point I have been able to send a login request using the following code:

<cffunction name="getAuthenticated" access="public" returntype="any">
<cfargument name="userName" type="string" required="yes">
<cfargument name="password" type="string" required="yes">

<!--- First request to get Authenticate Information --->
<cfhttp url="" method="get" username="#ARGUMENTS.userName#" password="#ARGUMENTS.password#">

<cfhttpparam name="Accept" type="header" value="text/xml,text/plain;q=0.5">
<cfhttpparam name="User-Agent" type="header" value="wsdl">
<cfhttpparam name="RETS-Version" type="header" value="3.0">
<cfset tempCookie = cfhttp.Responseheader["Set-Cookie"]>
<cfreturn tempCookie>

<cfcookie name="JSESSIONID" value="#getAuthenticated('myusername','mypassword')#" expires="never">

<cfdump var = "#JSESSIONID#">

When I run the file I get the following response:

JSESSIONID=D95AC85438EBBB3B8FC07375ED157AAE; Path=/nne/; HttpOnly

So I have the request authenticated, but being a SOAP based system - I have no clue how to continue passing the authentication back and forth to the site to make calls to their system.

I truly have no understanding of SOAP or using stateless requests like this.  I only got the code above to work because I found it on another support ticket.

My first attempt was to place the following after the initial code:

<cfhttp url="" method="get" >
<cfdump var="#cfhttp#" />

And I get back great big 401 Unauthorized response code.  If I dump the initial function cfhttp - I get a status code  200 OK

Can anyone help me get to the next step of being able to use the login authentication to start making requests on the system?  

I am looking for actual code help as well as theory and understanding.  However I learn the best from code samples.   I like to pull things apart and see how they work then put them together again :)

For reasons too long to go into - I am on a 15 day time crunch to get this done.  As always - help is greatly appreciated.

God Bless,
Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros