VB scripts in Coldfusion

If someone has handed me a VB script what is the best
approach in integrating it with my Coldfusion App ??
The script requires parameters to be passed in.
Forgive my ignorance. I've only have minimal CF experience
and even less VB.

Hi,
You use Runtime.exec to execute commands / exe-files. See the documentation (and remember that it will only work on windows):
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
/Kaj

Similar Messages

  • Help with PHP script to Coldfusion

    I have a PHP script that I need to create in coldfusion. I'm
    fairly new to coldfusion and would appreciate any help. Here is the
    PHP script... The code is suppose to retrieve the HTTP POST data
    from the url. I would be open to doing this in Javascript as well.
    Thanks again...
    /* Script Start */
    //Get the file POST data
    $filePost = $_POST[$filePostVariable];
    //Break the file list into an array
    $filePost = explode($fileDelimiter, $filePost);

    <cfset arrayList = ListToArray(url.urlVar)>
    I accessed the URL vars directly via url scope, and the
    default delimiter is comma otherwise add a delimiter to the
    listToArray function. In the PHP example it looks like you had a
    var that held the url var name. I hope this helps.
    Trevor
    Visit Me

  • Translating PHP Script to Coldfusion

    Hello,
    I need to translate this code (which is in PHP) to coldfusion, is there anyone who can help me please it´s urgent, thanks a lot.
    <?
    $ref = $_GET['Reference'];
    $act = $_GET['Action'];
    $par = $_GET['Param'];
    switch ($act) {
    case "DETAIL":
    echo "Reference=".$ref. "&Action=".$act."&Reponse=".$montant;
    break;
    case "ERREUR":
    echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
    break;
    case "ACCORD":
    echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
    break;
    case "REFUS":
    echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
    break;
    case "ANNULATION":
    echo "Reference=".$ref. "Action=".$act. "Reponse=OK";
    break;
    ?>  

    When you're approaching the task of "translating PHP to ColdFusion," and when you find yourself with just-a-moment where you are not "up to your earlobes in alligators" (i.e. when you can recall that "your original objective was to drain the moat ..."), then do try to step back and look at the forest not just the trees.  ColdFusion actually has a rather different philosophy toward designing applications, which can be summed up (I think) like this:
    Most web-tools (PHP, dot-Net, even Ruby and Perl) give you the ability to "write a program" that just happens to produce an HTML output.
    Content-management (CMS) systems are "really-nifty programs that have already been written for you."
    ColdFusion is an application-server system that uses an XML-based declarative syntax.  It is implemented on the back-end using a "just in time" compiler that cranks out the (Java and JavaScript) code for you.  Although many of the "tags" implement conventional procedural-programming constructs such as "switch" and "if" and "loop" and "call," you'll notice that many more do not.
    A good example of the difference between them, for me, is the <cftransaction> tag.  This tag declares to ColdFusion that the enclosed block is supposed to "be a database transaction."  This means, without you having to say anything further, that:
    A database transaction should be started.
    If all of the code within this block completes successfully, the database transaction should be committed.
    If an exception occurs within this block, the database transaction should be rolled-back (in addition to anything else that should happen as a consequence of an exception having occurred).
    The ColdFusion Engine parses that declarative tag and automagically generates the necessary Java code to implement it correctly, on-the-fly, then executes that code immediately.  You don't have to be consciously aware that this is happening, even though as an application designer you can.
    This strategy is especially useful when an application needs to be "scaled up" to run on multiple servers.  When ColdFusion is configured for that environment, the code that it on-the-fly generates is a little bit different.  But the page that you wrote, isn't.

  • Running PHP script via ColdFusion

    I'm running CFMX 7 on a Solaris platform with PHP 5.0.5.
    I need to determine the width and height of an uploaded image
    to ensure that the file can be reasonably used on a web page. I
    have scoured the Internet and found a numer of solutions to this.
    Most need the installation of additional software on our server and
    the creation of a custom tag. These are doable, but would require
    additional effort I don't have time for at the moment. Also, the
    software to install is a full image manipulation package that is
    definitely overkill for my needs. Kind of like threading a needle
    with a hammer.
    On the other hand I know that PHP has a command called
    "getimagesize" that would be perfect for my use. This would be much
    more simple and elegant. And I have created a small program (see
    below) that can accept a location of an image file and display the
    width and height of the image as a result. The code is:
    <?php
    list($width, $height) = getimagesize($argv[1]);
    echo "$width, $height";
    ?>
    I've tested it via the command line and it works fine.
    However, I'm having difficulty in running it via the ColdFusion
    cfexecute tag. Here is that code:
    <cfsavecontent variable="imgsize">
    <cfexecute name="#phpfilelocation#"
    arguments="#imagelocation#"></cfexecute>
    </cfsavecontent>
    I get nothing back from this. I've also tried the cfhttp tag
    with similar results. It seems to me that the argument (the
    location of the image) is not being accepted by the PHP code for
    some reason.
    I've looked for a solution to this within this forum and via
    Google, etc. to no avail. There is apparently something about PHP
    or ColdFusion that is escaping me. Any help clarifying why this is
    not working and (hopefully) a workaround would be very much
    appreciated. Thank you.

    Maybe this will help:
    http://groups.google.com/group/alt.comp.lang.coldfusion/msg/af84ac7dfec0d09e?dq=&hl=en&lr= &ie=UTF-8&oe=UTF-8&rnum=8

  • Enabling Global Script Protection is not working while adding "&"

    Hi All,
    To prevent crosssite scripting attacks I ticked the the check box "Enable Global Script Protection" in CF admin. But it is not working , I mean not able to prevent the scripting attacks.
    Steps I followed
    1] I executed the below URL.
         https://xyz.abc.com/index.cfm?cardholder_number=&<script>alert(1)</script>
    2] In the fornt end I got a javascript alert message as injected in the URL.
    But this alert message should not come as I have enabled script protection in CF admin. Right????
    Now I removed "&" (https://xyz.abc.com/index.cfm?cardholder_number=<script>alert(1)</script>) from the above URL  then I was not getting the javascript alert message. Does this mean that script protection will not work if we are adding "&" to the URL????.
    I searched the neo-security.xml and its looks like below.
    <var name='CrossSiteScriptPatterns'><struct type='coldfusion.server.ConfigMap'><var name='&lt;\s*(object|embed|script|applet|meta)'><string>&lt;InvalidTag</string></var></st ruct></var>
    Can any one help me out to fix this.

    Abdul L Koyappayil wrote:
    But still one doubt remains why alert message is coming only when there is "&" in the URL??
    This happens with "&" because it is a special Javascript symbol whose purpose is to delimit - that is, separate - the key-value value pairs in the URL's query-string. For example, in the URL www.myDomain.com/index.cfm?a=1&b=2, the "&" delimits the query-string into the 2 key-value pairs
    a=1
    b=2
    Let us then consider the case where the URL is www.myDomain.com/index.cfm?cardholder_number=&<script>alert(1)</script>. The & will delimit the query-string into
    cardholder_number=
    <script>alert(1)</script>
    The presence of '&' implies there are 2 variables. However, there is only one '=' sign, which means there is just one key-value pair. In addition, cardholder_number is a legal name for a URL variable, whereas <script>alert(1)</script> is not. The browser therefore sends the following query-string to your application
    cardholder_number=EMPTY_STRING&<script>alert(1)</script>
    However, Coldfusion's scriptprotect feature will intervene and neutralize this to
    cardholder_number=EMPTY_STRING&<invalidtag>alert(1)</script>
    which is harmless. These will enter into Coldfusion as the URL variables
    cardholder_number=EMPTY_STRING
    EMPTY_STRING=EMPTY_STRING
    The special nature of '&' as delimiter is what prompts the browser to run the script. In fact, by default, browsers will run any Javascript that you place in the query-string. Run this, for example
    http://www.myDomain.com/index.cfm?<script>alert(1)</script>
    But what reason will I say if they are asking me why javascript alert is coming then.
    As you have just seen, the <script> tag cannot come in. The alert occurs at the browser - that is, at the client - but Coldfusion runs at the server. Communication between client and server is by means of the URL variables that the client sends to the server. For the attack to be effective, it has to be sent in the form
    sneakyVar=<script>alert(1)</script>
    That is not the case here.

  • Android Push Notification of the New GCM release using Coldfusion

    Is there any similar push notification solution/Tutorial but this time for the Android?
    Something similar to this tutorial but with Android GCM using coldfusion to send from my dedicated server to the registered devices:
    http://www.raymondcamden.com/index.cfm/2010/9/13/Guest-Post-Apple-Push -Notifications-From-ColdFusion-in-Ten-Minutes-or-Less
    Thanks in advance
    Talal

    well after diving and testing here and there I found a way and successfully tested.
    1> First and formost, the developer need to follow the procedures in this page:
    http://developer.android.com/guide/google/gcm/gs.html
    2> In the app side, you will send users devices information; but all that matters is only the "registration id" , so make sure you save this in the database coz you'll use it to loop through your database records when sending notifications.
    3> Now the server side script in Coldfusion which is really easy:
    <!---Place this above your html tag--->
    <cfsetting requesttimeout="80000000000000">
    <cfset appName = 'YourAppName'>
    <cfset registrationArray = ArrayNew(1)>
    <cfquery datasource="devicesDSN" name="rsCount">
        SELECT COUNT(intGCMuserID) AS TotalRecords
        FROM gcmusers_tbl
        WHERE appName = <cfqueryparam cfsqltype="cf_sql_clob" value="#appName#">
    </cfquery>
    <!---Google is limited to send only to 1000 devices at a time so we need to nest the cfloop of the array inside another cfloop pertaining to our total recordCount from the recordset so we'll use the Ceiling to control the number of loops needed to make sure we sent to all the users if they exceed google limit--->
    <cfset LoopingNo = Ceiling(rsCount.TotalRecords/1000)>
    <cfset fromRec = 1>
    <cfset toRec = 1000>
    <!---Now place the following code inside the body tag of your cfm page--->
    <cfif isDefined("FORM.pushButton")>
        <cfquery datasource="devicesDSN" name="rs">
        SELECT regID
        FROM gcmusers_tbl
        WHERE appName = <cfqueryparam cfsqltype="cf_sql_clob" value="#appName#">
        ORDER BY intGCMuserID DESC
        </cfquery>
        <cfloop from="1" to="#loopingNo#" index="i">
            <cfloop query="rs">
                <cfset ArrayAppend(registrationArray, "#regID#")>
            </cfloop>
            <cfset stFields =
            { "data"= {
                "title" = "#FORM.title#",
                "message"= "#FORM.message#"
              "registration_ids"= #registrationArray#
            >
            <cfhttp url="https://android.googleapis.com/gcm/send" method="post" result="httpResp" timeout="600">
                <cfhttpparam type="header" name="Content-Type" value="application/json"/>
                <cfhttpparam type="header" name="Authorization" value="key=yourAPIkeyFromGoogle">
                <cfhttpparam type="body" value="#serializeJSON(stFields)#">
            </cfhttp>
            <cfset temp = ArrayClear(registrationArray)>
            <cfset fromRec = fromRec + 1000>
            <cfset toRec = toRec + 1000>
        </cfloop>
        <h2 align="center" style="color:red;">Sent to: <cfoutput>#rs.RecordCount#</cfoutput> Devices/Users </h2>
        <h3 align="center"><a href="thispage.cfm">&gt;&gt;&gt;again</a></h3>
    <cfelse>
    <cfform>
      <table width="400" border="1" align="center" cellpadding="2" cellspacing="2">
        <tr valign="top">
          <th scope="row">Title:</th>
          <td><label for="title"></label>
          <cfinput type="text" name="title" required="yes" id="title" maxlength="30" width="300" message="Type Title"></td>
        </tr>
        <tr valign="top">
          <th scope="row">Message:</th>
          <td><label for="message"></label>
          <cftextarea name="message" cols="45" rows="2" required="yes" id="message" maxlength="120" message="Type Message"></cftextarea></td>
        </tr>
        <tr>
          <th scope="row"> </th>
          <td><cfinput type="submit" name="pushButton" value="send" id="pushButton"></td>
        </tr>
      </table>
    </cfform>
    </cfif>

  • Turing Number in Coldfusion

    Helo everybody..
    I just want to get any idea or guideline from anybody that
    have experience in implementing Turing Number in Coldfusion. The
    problem is, Online Enquiry which one of modul in our website always
    attacked by junkmail. The number was growth everyday and it made
    our database full with useless content. We have suggested to using
    this Turing number to avoid automated submission. But we are newly
    to this Coldfusion and we have no idea how to implement them.
    So, you're welcome to help me to fix this problem.
    For you information, we've found turing number script in PHP.
    But, the questioned are, is it possible using the PHP script in
    Coldfusion? if yes..then how?
    Thank you for respon..

    I'd suggest implementing a CAPTCHA instead. In English, a
    verification code image which displays a few distorted letters and
    numbers on a messy background, which (hopefully) only humans can
    interprete, not automatic OCR engines.
    Since CFMX 8 (codename Scorpio) will introduce built-in
    support for CAPTCHA images, and my own secret world-dominating
    CFMX-based content management system is anything from ready, I
    haven't had to worry about the issue yet, but do a web search for
    "Coldfusion captcha", and you'll almost certainly find a solution,
    I'm sure.
    If it's only the module that's attacked, and not an actual
    web page, then you need to tighten the security of the module which
    is handling the posted form.
    Hope this helps, and fits your framework.

  • LiveCycle PDF form and SQL Server connection

    I'd really like to move from a server-scripted event registration form to a LiveCycle online PDF form, submitted by email and redirecting the user to a Webpage.
    The only obstacle I can see is a dropdown list of users, where a user selects his/her name and then proceeds to choose an event, date, and time. On my
    Webpage form now (scripted in ColdFusion), I use a CFSELECT, which works perfectly. But in looking at LiveCycle, I see that it supports an OLEDB but probably
    not a connection to SQL Server or Oracle. Am I correct? Or is there some workaround that will populate my dropdown list?

    Hello!
    Download jTDS - SQL Server and Sybase JDBC driver from http://sourceforge.net/project/showfiles.php?group_id=33291
    In Oracle SQL Developer open Tools -> Preferences
    Database -> Third Party JDBC Drivers
    Add Entry
    Browse the unzipped driver and add the jtds-1.2.jar file
    emeriqus

  • Printing a PDF (CFMX6)

    I'm working on an app that prints forms and was wondering if
    there was a way to print a PDF that was stored on CF webserver to a
    users default printer or printer of their choice ??
    I'm just trying to explore is there a simpler way than
    lauching the PDF in a broswer window and prompting the user to hit
    the print icon in the PDF Reader toolbar. Is there a way to script
    the generation of the print command ?? Or am I barking up the wrong
    tree??
    Cheers

    I wonder whether it is possible to do that through the usual
    scripting. Coldfusion ignores all HTML and CFML outside the
    <cfdocument format="pdf"> </cfdocument> tag pair. But
    that is precisely where we would want to put the code that
    instructs the browser to print.
    To illustrate, the following (browser-independent?) code will
    call up the printing interface. However, it wont anymore when you
    activate the cfdocument tag.

  • Output JS variables with CF

    This is probably a simple one... But I'm not very familiar with JavaScript so I really have no idea.
    How would I output the variables in this script with Coldfusion?
    <SCRIPT LANGUAGE="JAVASCRIPT">
    <!--
    var d = new Date();
    var curr_date = d.getTime();
    //-->
    </SCRIPT>

    Yup, it is very simple, you simply CAN NOT do this.
    CFML is executed by a ColdFusion Application Server, usually running on a web server.  JavaScript is executed by a browser running on a client computer.  These executions happen at completely different times on completely different systems with completely different memories with completely different variable pointers to values in those memories that can be thousands of miles apart. [And even if they ARE sharing the same system, in a development workstation for example, ColdFusion and JavaScript still CAN NOT read each others memory locations]
    It is very easy, and powerful, to use CFML to generate JavaScript output to be returned to a browser, just like generating HTML, CSS, XML, etc.
    It is pretty easy, and powerful, to use JavaScript to make requests to a web server for CFML resources.
    But one must always keep in mind that these languages are not sharing the same computer, they are not executing at the same time and YOU are responsible in designing how they will interact over the HTTP request-response, client-server nature of Internet Applications.

  • Adobe Cold Fusion Basic

    ColdFusion is an application server and software development
    framework used for the development of computer software in general,
    and dynamic web sites in particular. In this regard, ColdFusion is
    a similar product to ASP.NET or Java Enterprise Edition.
    The primary feature of ColdFusion is its associated scripting
    language, ColdFusion Markup Language (CFML), which compares to JSP,
    C#, or PHP and resembles HTML in syntax. "ColdFusion" is often used
    synonymously with "CFML", but it should be noted that there are
    additional CFML application servers besides ColdFusion, and that
    ColdFusion supports programming languages other than CFML, such as
    server-side Actionscript.
    ColdFusion is most often used for data-driven web sites or
    intranets. More advanced users can use ColdFusion as a productivity
    layer above a J2EE platform or use ColdFusion as middleware in a
    service oriented architecture (SOA), generating SOAP or RESTful web
    services or Flash remoting.
    ColdFusion can also handle asynchronous events such as SMS
    and instant messaging via its gateway interface, available in
    ColdFusion MX 7 Enterprise Edition.
    ColdFusion provides a number of value-added services out of
    the box:
    * conversion from HTML to PDF and FlashPaper
    * client-side form validation including rich forms using
    Flash
    * GUI widgets such as datagrids and date pickers
    * platform-independent database querying via ODBC or JDBC
    * data retrieval from common enterprise systems such as
    Active Directory, LDAP, POP, HTTP, FTP
    * client and server cache management
    * session, client, and application management
    * file indexing and searching service based on Verity K2
    (Enterprise Edition only)
    * XML parsing, querying, and validation
    * Server clustering
    * GUI administration
    * Task scheduling

    Yeah, my question was very much rhetorical.
    I have to ask, is the small chance that your site will rate a
    touch higher in the search engines worth the huge dent to your
    credibility when you employ sleaze ball tactics like this?
    I am pretty sure that I am not the only one who refuses to do
    business with anyone who publicizes this way.

  • Populate ComboBox from database - NOT using Flex Data Services

    Hi there,
    We are using CF with Flex but are not using the Flex Data
    Service. I'm very much a newb and I'm having trouble finding any
    information on how to populate controles from a database without
    using Flex Data Service. Any help would be greatly appreciated.
    First I have a page... JobSearch.mxml that contains a combo
    box that I want to populate with the job_id and job_title from a
    MSSQL database.
    In Flex in the RDS DataView I used the "Create CFC" Wizard
    which generated "job.cfc" and "jobGateway.cfc". It also generated
    "job.as".
    The CF Function that selects the data appears to be defaulted
    and called "load" and the .as function is called simply "job".
    So, that all looks great. But I can't find any information on
    what I need to have on my JobSearch.mxml to actually get this data
    into the comboBox.
    I did:
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var jobData:job = null;
    ]]>
    </mx:Script>
    And then:
    <mx:ComboBox
    text="{jobData.job_title}"></mx:ComboBox>
    But I'm being told "Type was not found or was not a
    complie-time constant: job"
    I guess I'm missing something, or doing something way
    wrong... I just don't know enough of Flex at this point to know
    what it is.
    Thanks!
    April

    Using php or asp is not an option, as we are a Cold Fusion
    House.
    I was looking at an article on Ben Forta's blog (
    http://www.forta.com/blog/index.cfm?mode=e&entry=1786)
    and following his example I did this... only it doesn't work:
    I'm very very new to Flash and we are using ColdFusion but
    are not using Flex Data Services. I've been trying to figure out
    how to populate a combobox from a database and I'm just not having
    any luck.
    My project is called "PreTraffic". I have my main file as
    "JobSearch.mxml" and a folder under the root named "cfc" with a
    file called "job.cfc".
    job.cfc contains the following code:
    <cfcomponent>
    <!--- Get jobs --->
    <cffunction name="GetJob" access="remote"
    returntype="query" output="false">
    <cfset var job="">
    <cfset var results="">
    <cfquery datasource="discsdev" name="job">
    SELECT job_id, job_title
    FROM job
    WHERE status = 'O'
    ORDER BY job_title
    </cfquery>
    <cfquery dbtype="query" name="results">
    SELECT job_title AS label, job_id AS data
    FROM job
    ORDER BY label
    </cfquery>
    <cfreturn results>
    </cffunction>
    </cfcomponent>
    And JobSearch.mxml has the following code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    backgroundGradientColors="[#ffffff, #d0d0d0]"
    creationComplete="InitApp()">
    <mx:Style source="style.css" />
    <mx:Script>
    <![CDATA[
    public function InitApp():void {
    jobSvc.GetJob();
    ]]>
    </mx:Script>
    <!-- ColdFusion CFC (via AMF) -->
    <mx:RemoteObject id="jobSvc" destination="PreTraffic"
    showBusyCursor="true" />
    <mx:VBox label="Job History" width="100%" height="100%"
    x="10" y="92">
    <mx:Label text="Search jobs by"/>
    <mx:Form label="Task" width="100%">
    <mx:FormItem label="Job Name:">
    <mx:ComboBox id="jobNameCB"
    dataProvider="{jobSvc.GetJob.results}"></mx:ComboBox>
    </mx:FormItem>
    </mx:Form>
    <mx:HBox>
    <mx:Button label="Search"/>
    <mx:Button label="Clear"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>
    My Compiler thingy points to:
    -services
    "/Volumes/flexwwwroot/WEB-INF/flex/job-services-config.xml" -locale
    en_US
    and job-services-config.xml contains the following code:
    <destination id="PreTraffic">
    <channels>
    <channel ref="my-cfamf"/>
    </channels>
    <properties>
    <source>flex.pretraffic.cfc.job</source>
    <lowercase-keys>true</lowercase-keys>
    </properties>
    </destination>
    Well, when I run the app... the combobox is not populated...
    Can anyone help with what I've done wrong?
    Thanks!
    April

  • Ecommerce website

    Hi,
    I need help, I've been using Dreamweaver for a while now and
    im getting the hang of it. My boss wants me to design a website for
    our shop, including being able to buy from us online. Can i set
    this up on Dreamweaver or do i need a different software? Someone
    help me please!
    Thanks

    You are here (pointing down at earth). You want to get there
    (pointing at
    Alpha Centauri). Moving from simple, static sites to
    ecommerce is like
    getting on a starship for the long haul. You will need to
    have the
    following -
    0. Comprehensive understanding of HTML and CSS
    1. Some knowledge of server scripting (PHP/Coldfusion/etc.)
    2. Some knowledge of database design/manipulation
    3. Some knowledge of Secure Socket Certificates
    4. Some knowledge of Merchant accounts and payment gateways
    5. A good appreciation for web security
    6. A host that supports the tools you need to use
    Now - having said that, there *are* host-based ecommerce
    tools that you
    might be able to use (things like Miva Merchant), and those
    will require all
    of the same things only not with the same intensity. The
    suitability of
    your product mix will also be a concern (i.e., is it simple,
    one choice
    products, or are there many options for each product).
    You can do all of this within Dreamweaver without third-party
    tools if you
    are especially fluent in all of those requirements above. If
    you are not,
    then you will have to buy some third-party ecommerce addons
    for Dreamweaver.
    Such things are available from a number of suppliers,
    particularly
    Cartweaver and WebAssist. Your ability to use them
    effectively will
    definitely depend on your fluency with the scripting
    environments.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Diamond Security" <[email protected]> wrote
    in message
    news:[email protected]...
    > Hi,
    >
    > I need help, I've been using Dreamweaver for a while now
    and im getting
    > the
    > hang of it. My boss wants me to design a website for our
    shop, including
    > being
    > able to buy from us online. Can i set this up on
    Dreamweaver or do i need
    > a
    > different software? Someone help me please!
    >
    > Thanks
    >

  • ColdFusion Script not work with Httpservice

    At first I use PHP to generate xml output on page then use
    the data to my httpservice with resultformat e4x. Everything is
    fine. But now I want to use coldfusion script since I'm planning to
    use ColdFusion as my web server. I have this script located on my
    server and generate the data in XML file then the XML file is used
    in my web, loaded through httpservice.
    My PHP code was like this :
    <?php
    define( "DATABASE_SERVER", "localhost" );
    define( "DATABASE_USERNAME", "root" );
    define( "DATABASE_PASSWORD", "" );
    define( "DATABASE_NAME", "MyCinema" );
    $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME,
    DATABASE_PASSWORD) or die(mysql_error());
    mysql_select_db( DATABASE_NAME );
    $Query = "SELECT * FROM film";
    $Result = mysql_query( $Query );
    $Return = "<movies>";
    while ( $film = mysql_fetch_object( $Result ) )
    $Return .= "<film><judul>".$film->JUDUL.
    "</judul><deskripsi>".$film->DESKRIPSI.
    "</deskripsi><genre>".$film->GENRE.
    "</genre><produser>".$film->PRODUSER.
    "</produser><produksi>".$film->PRODUKSI.
    "</produksi><homepage>".$film->HOMEPAGE.
    "</homepage><durasi>".$film->DURASI.
    "</durasi><url>".$film->URL."</url></film>";
    $Return .= "</movies>";
    mysql_free_result( $Result );
    print ($Return);
    ?>
    And now I try to get the same result using coldfusion script.
    At first I dont write the XML to file, I just cfoutput it just like
    I do with PHP just print result but it doesnt work out with my
    HTTPservice. Until I try to write it to XML file then coding my
    httpservice to read directly from that XML file. here is my
    coldfusion code.
    <cfcomponent>
    <cffunction name="a" returnType="Void" output="true"
    access="remote">
    <cfprocessingdirective suppresswhitespace="Yes">
    <cfquery name="GetFilm" datasource="myCinemaData">
    SELECT b.* FROM playing a, film b
    WHERE a.kode_film=b.kode_film AND a.start >
    <cfqueryPARAM value = "#DateFormat(Now())#"
    CFSQLType = "CF_SQL_STRING">
    </cfquery>
    <cfxml variable="userXML">
    <movies>
    <cfloop query="GetFilm">
    <cfoutput>
    <film>
    <judul>#GetFilm.JUDUL#</judul>
    <deskripsi>#GetFilm.DESKRIPSI#</deskripsi>
    <genre>#GetFilm.GENRE#</genre>
    <produser>#GetFilm.PRODUSER#</produser>
    <produksi>#GetFilm.PRODUKSI#</produksi>
    <homepage>#GetFilm.HOMEPAGE#</homepage>
    <durasi>#GetFilm.DURASI#</durasi>
    <url>#GetFilm.URL#</url>
    </film>
    </cfoutput>
    </cfloop>
    </movies>
    </cfxml>
    </cfprocessingdirective>
    <cffile action="write"
    file="#expandPath(".")#\userXML.xml" output="#userXML#">
    </cffunction>
    </cfcomponent>
    Because I need to create the XML files first I try to execute
    this coldfusion script first using webservice before I execute my
    Httpservice but the XML file creation is slower than the execution
    of my httpservice afterthat so it shows an error that my XML file
    isn't not available. What can i do? I've tried to show the output
    using cfoutput and run that script directly on my httpservice just
    like the way I use print result on PHP but it produce an
    error.

    ... I try to execute this coldfusion script first using
    webservice before I execute my Httpservice but the
    XML file creation is slower than the execution of
    my httpservice afterthat so it shows an error
    that my XML file isn't not available.
    Then it might help to apply a named lock to ensure that the
    Httpservice runs only after the web service call is complete. For
    example, apply an exclusive named lock on the code that calls the
    web service and a readonly lock of the same name to the Coldfusion
    code that interacts with the Httpservice.

  • AS3.0 socket script doesn't work with flex coldfusion local server

    I am having a real problem using my script in flex coldfusion
    project. I tried everything I can to get an answer including
    posting a question in two groups with no success.
    I created a class that goes and connect through a socket
    connection and it works fine under “basic” flex
    project, however when I try to use the package in a flex coldfusion
    project I keep getting error messages:
    *** Security Sandbox Violation ***
    Connection to domainName.com:60 halted - not permitted from
    http://localhost:8500/ProjectName/bin/fileName.swf
    Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048:
    Security sandbox violation:
    http://localhost:8500/ProjectName/bin/fileName.swf
    cannot load data from domainName.com:60. At
    com.elad.as3.socket::socketConnect$iinit()[C:\CFusionMX7\wwwroot\ProjectName\com\elad\as3 \socket\socketConnect.as:14]
    It looks to me that because there are two URL
    http://localhost:8500/ProjectName/bin/fileName.
    and
    C:\CFusionMX7\wwwroot\ProjectName\com\elad\as3\socket\socketConnect.as
    The player set the security in full effect and I cannot
    access other servers. I tried everything including setting the
    security and adding my local server to the approved servers.
    This is a real problem because I will not be able to test my
    application locally.
    Thanks in advance for the help,

    does anyone have any idea what could be going on here?  am i completely out to lunch?

Maybe you are looking for