How  to communicate with a remote application that uses http post to request connection

Ok, I will try to make this simple as to avoid any
confusion.
I am trying to receive connection requests from remote applications installed on user pc's.
The application uses POST method to send the request to connect to my database, and if required update some tables.
The application is not a webpage. I have no access to the internal workings of the application nor do I have any specific information about how it sends its POST. I am sure of the following:
The app will POST to my .cfm page
"IsConnectionAllowed" = "yes"
This is asking my cfm page if its ok to connect. I would need to use a <cfif> to verify the the first part of the POST is in fact
"IsConnectionAllowed" = "yes"
If this returns true, (the app also uses to POST to pass "username" and "password") my .cfm page will then perform a query and check the username and password against the database. If a matching record is found, the application expects my page to reply with
"#Answer# OK- connected;"
Once the answer is given the application will then respond with data to insert or update my tables.
Now, I know how to do the queries and update tables etc, but I have never received data from an application before.
I tried using the <cfform> tag with a mehod of GET, and then trying to send my reply with <cfoutput>, but that didn't work. The application doesn't give any feedback or error messages. It either connects or not.
I also tried the <cfhttp> tag, but that didnt work either. I am not very experinced with coldfusion. I used it years ago and am just getting back into it.
I am sure this is a pretty easy thing to do, but my methods arent working.
Using the above information, can somone please show me how I would accomplish this communication? I can then use the same method to retrieve the data for my table updates and queries.
Here is a sample of what I have already tried:
<cfform method="get">
<cfif>
"IsConnectionAllowed" = "yes"
<!-- I need to query a username or password. But for testing I will just give the OK to connect -->
<cfoutput>#Answer# Ok - connected;</cfoutput>
<cfelse>
<!-- When I query username and password, if the query returns no records I deny the connection -->
<cfoutput>#Answer# Not connected;</cfoutput>
</cfif>
</cfform>
BTW, I have examples of this being done using .php and .asp. I need to do this using .cfm. I can post the either the .php or.asp code if it will be helpful in converting the function into a .cfm page.

Thanks Fernis.
That code allowed me to connect!
I have an error on the remote application, but I think thats due to the fact that I commented out the database connection and query strings. As I am mostly concerned with connection at this point, I just wanted to test that my cfm page will recognise the POST request and send the right answer, In this case
##Answer## Ok - connected;
That worked perfectly and the application received the ok to connect.
I can now use your code as a base to carry on with my database connection and update query.
I can't thank you enough. I wouldnt have figured that out in a million years of trial and error.
I knew it was simple though. I was over thinking it.
I do have one last question though... In the code you presented you have
<cfif structKeyExists(Form,"isConnectionAllowed") AND form.isConnectionAllowed EQ "yes">
Can you you explain this    structKeyExists(Form,"isConnectionAllowed")
I have never seen this before. Why the Form followed by a comma? I am guessing you are asking if there is an element in the POST called "isConnectionAllowed". Is that correct?  If so, do I not need to do that for each POST'ed element such as username, password, and each of the other fields that will be updated in the session?

Similar Messages

  • How Bridge communicates with third party applications?

    Hi,
    Is it possible to communicate between Adobe Bridge and a third party application using Bridge SDK?
    I want to learn how Bridge can communicate with other application? Bridge SDK have samples that explain how Bridge communicates with other Adobe applications like Photoshop and Indesign. Can anyone guide me or provide me a sample where Bridge communicates with a third party application?
    Thanks.

    As an example, this shows one way of getting a list of selected files from Bridge via Photoshop using C#
    using System;
    using System.Collections;
    using ps = Photoshop;
    namespace getBridgeFiles
        class Program
            static void Main(string[] args)
                ps.ApplicationClass app = new ps.ApplicationClass();
                String Code = "var fileList;"+
    "if ( BridgeTalk.isRunning( 'bridge' ) ) {"+
    "var bt = new BridgeTalk();"+
    "bt.target = 'bridge';"+
    "bt.body = 'var theFiles = photoshop.getBridgeFileListForAutomateCommand();theFiles.toSource();';"+
    "bt.onResult = function( inBT ) { fileList = eval( inBT.body ); }"+
    "bt.onError = function( inBT ) { fileList = new Array(); }"+
    "bt.send(8);"+
    "bt.pump();"+
    "var timeOutAt = ( new Date() ).getTime() + 5000;"+
    "var currentTime = ( new Date() ).getTime();"+
    "while ( ( currentTime < timeOutAt ) && ( undefined == fileList ) ) {"+
    "bt.pump();"+
    "$.sleep( 100 );"+
    "currentTime = ( new Date() ).getTime();"+
    "}}"+
    "if ( undefined == fileList ) {"+
    "fileList = new Array();}"+
    "fileList = decodeURI(fileList.toString());";
                String RC =  app.DoJavaScript(Code, null, null);
                ArrayList list = new ArrayList();
                list.AddRange(RC.Split(new char[] { ',' }));
                for (int index = 0; index < list.Count; index++){
                    Console.WriteLine(list[index]);
                Console.ReadLine();

  • How can I build a LabView application that uses the 2012 runtime, on a development system with LabView 2013 or 2014 installed?

    I need to build a LabView application .exe to run with the 2012 Runtime, for legacy support. I currently have LabView 2013 installed on my development system, and have 2014 available. How can I build an application that uses the 2012 runtime on this development system? Do I have to downgrade to 2012? Thank you.

    We have existing customers that have installed our application that was originally built with 2012 (provided by a contractor that is no longer available).  Due to IT regulations, it is far easier to update these customers by simply replacing the .exe file, than creating an install that their IT department must run.
    If I have to downgrade to LabView 2012, where can I get the installation for this?

  • How to make an standalone java application that uses mysql driver

    Hi,
    I have an application that makes connection to a mysql database, on my computer, I set on classpath the driver address, so everithing works fine.
    The problem is that I want to execute my application from other computers, where the classpath does not have the drivers.
    So my question is how can I package the driver? so, everybody can run my application from a Jar, for example.
    thanks in advance,
    - Susana

    Nobody answered me, but I post the solution I found, that maybe can help somebody else with this problem:
    I packed all my application sources (.class) and the drivers sources (.jar) with the tool: FAT JAR. It is an Eclipse plug-in. And now I can run mi application from the resulting Jar in other machines without installing the conector.
    Bye,
    - Susana

  • How to communicate with third party bluetooth device using LAbVIEW

    Hi
          I am trying to communicate with a third party bluetooth device using LabVIEW, I am using a bluetooth dongle. I am able to discover the device and able to open the connection by specifying the service as serial port. But after that when I am trying to read and write data between LabVIEW and the bluetooth device (using Bluetooth Read & Bluetooth Write functions) its not happening.
    Dose anybody faced same kind of issue if so kindly guide me, this is first time I am using Blutooth protocol.
    Regards
    Visuman 

    Hi,
    I am able to talk with bluetooth / serial devices by using Labview protocol (not Wii dll). These are steps:
          Discover the bluetooth device in range (Bluetooth dicover.vi)
          Get the address of the device
          Pass device address to Bluetooth RFCOMM Service Discovery.vi to get service list
          Pass channel and uuid to Bluetooth open connection
          After that do write and read (Bluetooth Write / Bluetooth read).
      I hope it works for you.
    Take care
    tp
     

  • OSB -How to communicate with a Asynchronous SOAP Service using OSB

    Hi,
    I am new to OSB and I need some help in working with Asynchronous SOAP Service.
    Test Case : OSB --> Proxy Service --> Business Service-->External Service pointing to Asynchronous service WSDL.
    While testing the proxy service using sb console i don't get a response back.
    After some googling I found out the following:
    ->We need to create another Proxy service for listening to callback from that Asynchronous service.
    ->Setting the "WS-replyTo" in header variable while sending the initial request to Business Service(pointing to Asynch wsdl).
    Even after this I am not getting some response.
    Questions :
    1. Can someone let me know in detailed way(end to end) what has to be done to achieve this ?
    2. The Asynch wsdl exposes only one port in the <service> tag ie., which is haing the binding related to "process" operation. ( but not processCallback operation)
    So in this case how do i make my responseProxy service listen to callback port ? When I try to do I just see the process binding only.
    Thanks and Regards,
    Sridhar.

    Vernetto,
    I am not sure about the publish, but yes we can do this without JMS also. Please refer to this post which is quite helpful which routes back to a proxy service.
    http://eelzinga.wordpress.com/2010/03/23/oracle-service-bus-invoke-asynchronous-webservices/
    Regards,
    Sridhar.

  • How to interface a tuxedo app with another application that uses tcp/ip socket  messaging

    How would you interface a tuxedo app with another application that
    uses tcp/ip socket messaging? I have a vendor product that offers
    a tcp/ip message interface, and would like to know how best to
    integrate it into a tuxedo application. I could write a C application
    that listens and accepts incoming request from the vendors application,
    and then make a tuxedo client call to a service. But this doesn't
    allow me to control the listen thread through tuxedo. The C application
    would have to be started seperately and would not take advantage
    of the tuxedo restart facilities etc of a tuxedo service.

    You can make an empty server only with tpsvrinit that starts your client
    listeners and a tpsrvdone that stops them. Be carefull with sharing ipcs
    between processes, or your clients may get puzzled!!!
    Another choice can be builting a custom WSL/WSH but I haven't done
    this yet and I don't know exactly the troubles related with making them.
    R.G.
    Travis Ward wrote:
    How would you interface a tuxedo app with another application that
    uses tcp/ip socket messaging? I have a vendor product that offers
    a tcp/ip message interface, and would like to know how best to
    integrate it into a tuxedo application. I could write a C application
    that listens and accepts incoming request from the vendors application,
    and then make a tuxedo client call to a service. But this doesn't
    allow me to control the listen thread through tuxedo. The C application
    would have to be started seperately and would not take advantage
    of the tuxedo restart facilities etc of a tuxedo service.

  • IBooks "Couldn't communicate with a helper application"

    Hi,
    I just did a clean install of Mavericks on my iMac and am trying to use iBooks. 
    I was able to do an initial open of the application.  However, once I tried to import any PDFs and EPUBS, iBooks quit and I've haven't been able to restart the program.  Every time I relaunch the application, it shutsdown and then I get a message that says, "Couldn't communicate with a helper application".
    I've searched the forums and found a few things but all the solutions suggested talk about doing some terminal commands to reset some ACL and permissions.  I tried these suggestions to no avail.
    Anyone have any ideas?

    I tried my luck and it actually got my iBooks working again.
    When you add a PDF, it starts a process in background called "com.apple.BKAgentService". I think that this process scans your PDF, gathers some data interesting to iBooks and puts it into a local database. It is wrong for this process to run in the background because it uses lots of resources and really affects other applications (i.e. its hard to type here because my mac lags behind me typing), and iBooks do not show any signs of background activity. Because you do not get an immediate confirmation that some actions are taking place, you try to import those files again.. and again. And after some time you decide to kill iBooks app, because it became unresponsive. And this is how you break local database files
    I got it working for me. I am not responsible if these actions break something for you, do it at your own risk. After deleting those files my library was still intact, it only had to be rebuilt (i.e. cover images showed up only after a few seconds when iBooks finally started).
    What I did to fix this is deleting of these broken files:
    1) kill/close iBooks app, if it's still open and broken
    2) delete these folders:
    To be specific, these folders are:
    /Users/YOUR_USERNAME/Library/Containers/com.apple.iBooksX/Data/Library/Caches/co m.apple.ibooks
    /Users/YOUR_USERNAME/Library/Containers/com.apple.iBooksX/Data/Library/Caches/co m.apple.iBooksX
    3) start iBooks

  • Communicate with LabVIEW RunTime Application

    Hi all.
    I have an application created in LabVIEW, and I built an executable file from it (Let's call it App1.exe).
    While App1 is running it sometimes generates an exception and is aborted. The problem is that the Run-Time APP1.exe GUI remains open (Which is undesirable). I need a way to close it somehow. I realized that the only way to close it is from another application (Let's call it App2).This solution can be realized in 2 different ways:
    1) App2 communicates with App1 and closes it if App1 is not alive. The problem is that sometimes App1 is simply working slowly because of system problems and I might shut it down even though It's still running
    2) To somehow obtain from the Run-Time engine what's the state of App1. I think that this way is preferable but i don't know how to communicate with the Run Time Engine.
    I'll appreciate any suggestions (Preferably with some kind of example code)
    Thanks, Nadav 
    P.S. I'm using LabVIEW 8.2.1.

    What do you mean that it is "causing an exception"? Typically, an exception is a pretty serious failure that would kill the runtime engine too (thus closing all windows associated with it). What sort of error is stopping your application, but not the runtime engine executing it? It sounds like you possible have an internal error state that you haven't handled adequately. Part of the handling for a non-recoverable error should be orchestrating an orderly shut down of the application.
    For what it's worth, if the runtime engine is still alive you can connect to it using VI Server and ask the execution state of the top-level VI. If it comes back "Idle" your code has stopped.
    Mike...
    Message Edited by mikeporter on 05-21-2007 12:43 AM
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to communicate with a server ?

    Hello.
    I'm an intern trying to find a RIA client to use with a Java application server. The server provides two ways to access data :
    - a HTTP servlet that deals with XML
    - a web service
    I can't find information about how to communicate with a server using JavaFX 2, so can you try to explain it to me ?
    I'm sorry if what I ask is stupid, but I'm not very familiar with these things, I'm just a student.
    Thank you.

    Hi,
    communicate with a server is not JavaFX speciffic. You can use any "Java way" to access web-services or http requests. Try Axis2, it creates you the client API from the WSDL (the webservices on your server should provide the WSDL), than you can use this created client API to access the web-service in your JavaFX application. (see: http://people.apache.org/~ruchithf/hw-axis2/). You should be aware that by default you are working on one Application Thread (JavaFX as well as Swing and SWT), so when your first poc. is running you should use the javafx concurrent api, to create non blocking requests (http://docs.oracle.com/javafx/2/threads/jfxpub-threads.htm).
    Andy

  • How to communicate with another applet in different frame?

    Hello,evryone
    How to communicate with another applet in different frame?
    Can you give some advices?
    thank you!
    zhongboqing

    i faced this problem one year ago.It would be something like that:
    first you have to get the applet context 'getAppletContext()' (which is the current frame).
    Then get parent of that context 'getParent()' (which is the browser context).
    Then u can access the desired frame by its name. Finally you can access the desired applet located within this frame by

  • How do I get the weather application that is the same as the iphone application on my ipad mini?

    How do I get the weather application that is the same as the iphone application on my ipad mini?
    I don't want any other applications from the app store, I just want the regular weather app that comes with the iphones and other products.

    Apple hasn't made that particular App available for the iPad.

  • Does any one know how to communicate with thunderbolt or J.D.Edwards Oneworld?

    Hi,
    Does any one know how to communicate with thunderbolt or J.D.Edwards Oneworld through LabVIEW ? Do I need to use database connectivity toolkit? Can i do it without it?
    Thanks

    Hi Atul,
    we have made a application which uses Oneworld. We didn't use the database connectivity tool because we used ODBC and SQL.
    We have some VIs to do database connectivity using ODBC functions. So you have to know SQL as language and the ODBC functions. If you do not have this knowledge the database connectivity toolkit will make it easier for you.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • When trying to use iMessage Share with iPhoto i got this message "couldn't communicate with a helper application"

    I was trying to use imessage to share a photo with iPhoto.  I go the message "couldn't communicate with a helper application"
    My iMessage works fine for everything else.  I am currently running yosemite and every app has been updated.
    I restarted the macbook pro and i didn't resolve the situation.  Is anyone else having this issue?
    dawn

    Are you getting that message window after clicking on the "+" button to access your Contacts?
    That's what happens to me.  I know of now way to fix it. 
    My workaround is to create a new message in Messages and drag the photo from the iPhoto window into the message section of a new message and use the "+" button there to get the address to use

  • Communicate with the camera application using dde

    Hi,
    I´m trying to develop an application that can communicate with the camera application in my PDA (Qtek 2020).
    In order to communicate with the camera application, I want to use the DDE mechanism.
    I would like to know if it is possible to use the DDE VIs in LabVIEW 7.1 PDA Module.
    And also, if anyone has already tried to develop some similar application and knows where
    can I get information about the communication protocol, so that i can send the correct messages to the camera application.
    Thanks for any help,
    Pedro

    Is this camera application and your LabVIEW application running on the
    client PC or the PDA? If one of them is running on the PDA I'm pretty
    sure it won't work. DDE is an old legacy technology and most probably
    not supported in Windows PDA OS. And if both applications are not on
    the same device it gets even more complicated as then you really would
    need NetDDE which always was a hassle to setup and there is probably no
    chance that Windows PDA OS would support that.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • I have moved to i cloud and ical event is not allowing file attachment to be added

    I have set up icloud and now when I enter an event in Ical there doesn't appear to be a way to attach a file. I heve tried dragging the file over the event  editor as per help, but that doesn't work and there is not menu item for attachments that I c

  • Video blaster webcam 2 usb windows vista

    I have a videoblaster webcam 2 USB and I could make it works on windows vista as it follows: I made a download of the drivers on http://uk.europe.creative.com/support/downloads/download2.asp?MainCategory=&Product=4900&dlcentric =39&Product_Name=WebCa

  • Variant price is not picking?

    Hi All, iam working on variant configuration where iam facing a unique problem. if there are 2 charactaristics(charactaristics with variant and price) it is picking price for variant. If there are more than two charectaristics other than price varian

  • Imessage login error with valid AppleID

    I have an iPad 2 with 5.1.1 IOS. I am able to successfully log into the Apps store with my AppleID. I am able to log into the appleid.apple.com site with my Apple ID. However, when I try to log into either iMessage or FaceTime, it complains of an inv

  • Captivate 8 loading slowly after click

    The course I'm building has to be compatible on mobile as well as desktop. In the mobile version, I'm noticing that Captivate 8 runs noticeably slow after a button has been clicked. I have found out that the reason for this is because captivate is bu