Topic: accessing webservices


G4nymedes    -- 07-29-2005 @ 11:27 AM
  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;
    MyAppApplication.Login("USERNAME","PASSWORD");
}

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


nmiller    -- 08-11-2009 @ 8:25 AM
  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
class.

Nathan Miller
NM Consulting


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=25&Topic=7545