EasyCFM.COM ColdFusion Forums / .NET to CFML / accessing webservices

   Reply to Discussion | New Discussion next >> 
Posted By Discussion Topic: accessing webservices

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

07-29-2005 @ 11:27 AM
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 5
Joined: Jul 2005

Hi all,

I have to make a connection with an application, using webservices. Communicating is possible but ther is no way to keep the gate to the application open. I i try on the localhost to log in in the application(which is also a method in this application) the session stays open and I can use other methods also.
But if I want to invoke it from a coldfusion coded page, while using CFinvoke, i manage to log in, but i'm immediately logged out. So I think that I have to make a kind of session. In the .Net Code I show here, it is possibel to log in, and to stay logged in. Now I want to do the same in CFM, but I don't understand what is happening in this .Net code. Can someone help me with this one?
Thanks in advance.

MyAppApplication MyAppApplication;
MyAppObject MyAppObject;
void Page_Load(object sender, EventArgs e) {
    MyAppApplication = new MyAppApplication();
    MyAppApplication.CookieContainer = new CookieContainer();
    MyAppObject = new MyAppObject();
    MyAppObject.CookieContainer = CookieContainer;

void Button1_Click(object sender, EventArgs e) {
    string s = "";
    MyAppObject.List("NameOfFieldInDataBase", ref s);
    tbResult.Text = s;

08-11-2009 @ 8:25 AM
Send P.M.
My Gravatar!
Powered by Gravatar
Posts: 773
Joined: Apr 2003

In the .NET application there is a MyAppApplication.cs
class file that contains logic for tracking the session.  
You need to see what is going on inside this class, but
you should be able to create either a .NET webservice
that calls this code and call it from CF, or if you're
using CF8, you can use the .NET interop features and use
cfobject to create an instance of the MyAppApplication

Nathan Miller
NM Consulting

Website Designed and Developed by Pablo Varando.