Pass in ValueObject as argument to CFC???

Hi,
I am confused on how pass in arguments to the CFC when I am
sending a ValueObject in from Flex. I have this code.
public function saveEmployee( employeeVO : EmployeeVO ): void
var call:AsyncToken = service.saveEmployee( employeeVO );
call.addResponder( responder );
The parameter employeeVO in the above function contains all
the data the user typed in on my form. I want to pass this data to
my CFC as an argument, but not sure how to do so.
-Westside

Hi,
I will try that because I do have those extensions installed.
I got it to work without the extensions but I can't understand why
this code works:
public function saveEmployee( employeeVO : EmployeeVO ): void
var call:AsyncToken = service.saveEmployee( employeeVO,null
call.addResponder( responder );
By adding that null it seems to work. I have the cfc
accepting the employeeVO as a "struct". If I remove that null, then
it bombs.
Any idea why?
-Westside

Similar Messages

  • Passing multiple arguments to CFC ???

    I am passing two parameters to a CFC via WebService, as seen
    below. This works fine.
    WebService.MyCFC(argument1, argument2);
    However, I have some CFC functions that I am passing more
    than 10 arguments into. Instead of having a lengthy string of
    arguments on my above code, I would like to create an object
    (array?) that stores each argument. I did this when I was coding in
    CF7 using the ColdFusion tags that rendered Flex-like code. Below
    is the example I used:
    var editArguments:Object = {};
    editArguments.Argument1 = 'my first argument';
    editArguments.Argument2 = 'my second argument';
    WebService.MyCFC(editArguments);
    When trying this in Flex, I get the following error. I am
    unsure what I am doing wrong and I've Googled and Googled and
    cannot find my answer I am looking for. First of all, is it even
    possible to attempt what I am trying? Thanks!
    faultCode:EncodingError faultString:'Array of input arguments
    did not contain a required parameter at position 1'
    faultDetail:'null'

    any ideas?

  • How to pass a command line argument to a jsp file...

    Hi guys,
    I'm writing a jsp file in which I have some java codes. I want to pass some command line arguments to that jsp file. In other words, I have some files located somewhere on my C drive and I want to pass the path to these files to my jsp file. How can it be done? I have never done before.
    Any suggestion will be very hepful...
    Thanks....

    I dont know if I truly understand your problem...
    For instance, when you place the url of your jsp you can add, at the end some parameters. For example:
    http://myserver/myapp/myjsp.jsp?MyParameter=C:\Temp\JavaTutorial.html
    In your JSP, you can place this code on a scriplet to get the value:
    String path = request.getParameter("MyParameter");
    Hope it helps.

  • Pass dynamic Command line arguments

    Hi,
    I tried to pass dynamic command line argument to Web start using the method :
    "javaws URL -D foo -D bar"
    as explained in the "Unofficial JWS/JNLP FAQ" that " You can pass your own system properties to your app using -D switch ....", but I got the following error at the start;
    error occurred while launching/running the application.
    Category: Invalid Argument error
    Too many arguments supplied: {http://...URL/my.jnlp, -Did=123 }
    p.s. I already added the"<property name='' value=''/> in the <resourse>, and modified the main class to get the parameter using System. getProperty();
    Did anyone try to this method before? What's wrong of this?
    Thanks in advance for your help.

    Thanks.
    here below is the jnlp file:
    <jnlp spec="1.0+" href="$$name" codebase="$$codebase">
    <information>
    <title>GUI Application</title>
    <vendor>PS</vendor>
    <description>PS GUI WebStart Version</description>
    <icon href="logo.jpg" />
    <offline-allowed />
    </information>
    <resources>
    <j2se version="1.3" />
    <jar href="lib/gui.jar" />
    <property name="id" value="zbc" />
    <jar href="lib/classes12.zip" />
    <jar href="lib/j2ee.jar" />
    <jar href="lib/jaas.jar" />
    <jar href="lib/jce1_2_1.jar" />
    <jar href="lib/jdom.jar" />
    <jar href="lib/xerces.jar" />
    <jar href="lib/local_policy.jar" />
    <jar href="lib/log4j.jar" />
    <jar href="lib/orion.jar" />
    <jar href="lib/sunjce_provider.jar" />
    <jar href="lib/US_export_policy.jar" />
    </resources>
    <security>
    <all-permissions />
    </security>
    <application-desc main-class="GUIFrame">
    </application-desc>
    and in the main class "GUIFrame", i use System.getProperty("id") t get the parameter, if I hardcode the value of the "id" in this jnlp file and use javaws URL, everything's fine, but not the "javaws URL -Did=value" which will return the error as mentioned.
    Thanks again for your help.

  • Pass the command line argument (argc and argv) to a LabVIEW built shared library.

    Hello,
    I have successully use this trick to build a LabVIEW application that runs on Linux without X Display.
    http://digital.ni.com/public.nsf/allkb/5D6EC36DCF43343786257449006919E6
    I'd like to know if it's possible to pass the command line arguments ( ./TEST A B C D) directly into the shared library without having to pass the arguments using a array of strings which would require to write code using DSNewHandle, DSSetHandleSize, extract the arguments and ..... (I'm not proficient in C, but if I don't have a choice I will do it and improve my C skills).
    int main(int argc, char *argv[])
            Test(argc, argv);
            return 0;
    Thanks,
    Michel
    Solved!
    Go to Solution.

    Well, you can always flatten it back into a space separated single string and pass it like that. Basically reverse what the OS does when it calls your main function with the command line parameters. And while the first element in the array is always the program name itself you can just skip that here, but then format all the rest into a single string.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to invoke adobe life cycle webservice using c++ (how to pass blob structure as argument)

    We already wrote sample code (.NET C#) to access livecycle webservice(this convert the input file into pdf file) using below link from adobe
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=000088.html
    We want to write c++ client to invoke adobe life cycle webservice. I have sample code to invoke the given webservice using plain c++ but I am stuck up with 'how to pass BLOB structure as argument to CreatePDF() method' and
    plus 'how to get ouput as mapItem[]' . Is the code to convert to pdf works fine with .NET and java only? Not with c++ or VB?

    In this case the LiveCycle services are exposed as web services that can be consumed by any application language that can interact with web services. While the sample published are for c# and Java there is no reason that other web service aware languages (C++, Perl, etc) wouldn't work.
    I'm not a Microsoft C++ expert, but as far as I understand all you need to do is create a web reference and then have your C++ classes interact via the generated proxy classes. The syntax will be different, but the concept is the same

  • Passing variable number of arguments in a stored procedure

    Hi Team,
    i am facing a problem. I have a dynamic form which contains some checkboxes. The number of checkboxes are dynamically generated on querying the database. On the form submission i want to call a stored procedure that will update the values in the database. i want to know that is there any way to handle variable number of arguments in the stored procedure or can i get the variables through some session context and use it in my stored procedure.
    Any help is greatly appreciated.
    Thanks&Regards
    Saurabh Jain

    Hi Saurabh,
    The method in which stored procedures are called on form submit is something as follows.
    Let us take your scenario of a form which has multiple checkboxes and a submit button. On clicking the submit button, this form data is submitted using either get or post. The form's submit action invokes a procedure.
    The HTML form code will look something like this..
    htp.formOpen( curl => 'URL /myProcedure',
    cmethod => 'post' );
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'A');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'B');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'C');
    htp.formSubmit( cname => 'myButton',
    cvalue => 'OK');
    Now, whenever the submit button is clicked, all these form values are passed to our stored procedure 'myProcedure'.
    "myProcedure" looks something like this.
    procedure myProcedure
    myCheckbox IN sys.owa_util.vc_arr,
    myButton IN VARCHAR2
    is
    begin
    end myProcedure;
    The point to be noted here is that the name of the variable being passed in the procedure is the same as the name of the HTML element being created in the HTML form. So, there is a direct mapping between the elements in the HTML form and the procedure parameters.
    Another noteworthy point is that since you have multiple checkboxes in your HTML form, it is impractical to name all the checkboxes differently and then pass those many parameters to your procedure (Imagine a scenario where there are a hundred check-boxes in an HTML form!). So portal allows you to give the same name (cname) to all the checkboxes in your HTML form, and if multiple checkboxes are checked, it will return all the checkbox values in an array (Note the usage of "myCheckbox IN sys.owa_util.vc_arr" in myProcedure).
    You can check out this link for more information.
    Re: retrieving data from fields
    Thanks,
    Ashish.

  • Passing command line unicode argument to Java code

    I have to pass command line argument which is Japanese to Java main method. If I type Unicode characters on command-line window, it displays '?????' which is OK, but the value passed to java program is also '?????'. How do I get the correct value of argument passed by the command window? Below is sample program which writes to a file the value supplied by command line argument.
    public static void main(String[] args) {
    String input = args[0];
    try {
    String filePath = "C:/Temp/abc.txt";
    File file = new File(filePath);
    OutputStream out = new FileOutputStream(file);
    byte buf[] = new byte[1024];
    int len;
    InputStream is = new ByteArrayInputStream(input.getBytes());
    while ((len = is.read(buf)) > 0) {
    out.write(buf, 0, len);
    out.close();
    is.close();
    } catch (Exception e) {
    e.printStackTrace();
    }

    To clarify a little:
    If the "command line" means a console opened from the operating system, then the problem is that your machine's operating system can't handle the Unicode characters you want (at least, not in the console mode). If you can't configure the machine to accept Unicode on the command line, you'll have to investigate some other means of passing the argument to your app, as the other poster mentioned.

  • Test Stand: How does parameter's value is passed as command line argument?

    Hi All,
    This is my 1st Q on this board.
    I'm using Test Stand Sequence to call a subsequence where I call an executable file and passing few arguments to it.
    SuperSequence.seq => SubSequence.seq
    In SuperSequence.seq I have 3 parameters and their values are specified
    Parameters
    Name      Type    Value
    ==============================
    Name      string    "Nirvana"
    Address  string    "London"
    Tel           Number "123456"
    In SubSeq.seq I call and EXE with following parameters
    Executable Path Name: myApp.exe
    Argument Expressxion:  "Parameters.Name  Parameters.Address  Parameters.Tel"
    In the application I receive parameter names instead of their values?
    E.g. I recevie Parameters.Name  Parameters.Address  Parameters.Tel in myApp.exe as arguments.
    How do I make the values to be passed to myApp.exe instaed of parameter names?
    Cheers
    Nirvana

    Hi,
    You have to make a string containing the arguments that you require
    Try the following expression
    Parameters.Name  + " " + Parameters.Address + " " +Str( Parameters.Tel)
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Passing * as command line argument

    I need to take some arguments from cmd in my java program which need to be of this form:
    java myprogram 4574 10 *
    Everything else works fine but when it comes to the asterisk (*) it is replaced by the file list and the args[] in my program becomes
    4574
    10
    myprogram.class
    myprogram.java
    123.txt
    Now i know that instead of giving * if i give "*" the program would be fine.... but is there any way to pass only * (without quotes) in arguments and get the * character in my args array.

    Compiled with the free command-line Borland compiler and run from cmd:
    #include <stdio.h>
    void main(int argc,char *argv[]) {
    int i;
    for(i=0;i<argc;i++)
    printf("%d [%s]\r\n",i,argv);
    C:\temp\efemer34\xx>a *
    0 [C:\temp\efemer34\xx\a.exe]
    1 [*]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass Table name as argument in Stored Proc

    Hi ,
    I have a requirement wherein the table name has to be passed as an argument of SP and the output should be the count from that table based on some filter condition.
    Something like this:
    create or replace procedure Testing(p_table varchar2,p_count OUT integer) AS
    begin
    select count(1) into p_count from p_table;
    end;
    Getting the error on running above code:
    PL/SQL: ORA-00942: table or view does not exist
    Please let me know how can we do this?
    Thanks.

    Example :SQL> create or replace procedure Testing(
      2     p_table varchar2,
      3     p_count OUT integer) AS
      4  begin
      5     execute immediate 'select count(1) from '||p_table
      6             into p_count;
      7  end;
      8  /
    Procedure created.
    SQL> var n1 number;
    SQL> exec Testing('user_objects',:n1);
    PL/SQL procedure successfully completed.
    SQL> print n1
            N1
            37
    SQL>

  • Can I pass serialized object as argument through WebStart?

    I know I can pass argument through WebStart using <argument> element in the application-desc of the jnlp file.
    Does WebStart support placing a Java serialized string inside the <argument> element? The reason is I want my application to behave differently based on the input object(s).
    So my thinking is first to generate a serialized string form of my object , then place this serialized string inside the <argument> and then when my Application starts, maybe somehow Java deserializes it for me or may be I have to deserializes myself?
    Is this possible?
    Thanks
    -ken

    yes, you can. although I am not sure how long that string can be? what are you going to store in the string - what kind of information?
    I would generally store configuartion parameters in a seperate file. You could pass the path to the config file in your arguments...

  • Can you pass a session variable in a CFC bind?

    I have a page (dsp_compReqSCM.cfm) that (via a session variable) displays an application value.  From this page (via a CFFORM) I would like to have that session variable passed along to a cfc(getDistinct.cfc).  I can't quite get the syntax correct and am hoping to get some assistance.  When I code #session.this_appl# in dsp_ReqComps.cfm, I get an error stating Element not found PTS (which is the value of session.this_appl) and that the bind cannot occur.  If I pass session.this_appl (NO ##) in dsp_ReqComps.cfm, I get an error stating Element not found session and that the bind cannot occur.   If I pass 'session.this_appl' or "session.this_appl" in dsp_ReqComps.cfm, I get an error stating Element not found 'session (or "session) and that the bind cannot occur.
    dsp_compReqSCM.cfm calls dsp_ReqComps.cfm via cfform
    <!---dsp_ReqComps.cfm--->
    <cfwindow initshow="true" center="true" width="430" height="340">
    <cfform>
         <cfgrid name="componentsGrid"
                 format="html"
                 pagesize=10
                 striperows="yes"
                 bind="cfc:distinctComponents.getDistinct({cfgridpage},{cfgridpagesize},{cfgridsortcolumn} ,{cfgridsortdirection},#session.this_appl#})"
                 selectmode="row" >
             <cfgridcolumn name="Component_type" header="Component Type" width="400">
         </cfgrid>
    </cfform>
    </cfwindow>
    <!---getDistinct.cfc--->
    <cfcomponent>
        <cffunction name="getDistinct" access="remote" returntype="struct">
            <cfargument name="page">
            <cfargument name="pageSize">
            <cfargument name="gridsortcolumn">
            <cfargument name="gridsortdir">
            <cfargument name="appl_in"  type="string" required="true">
      <cfset var Qcomponents = ''>
        <cfif gridsortcolumn EQ "">
       <cfset gridsortcolumn = "ASC">
      </cfif>
            <cfif gridsortdir EQ "">
       <cfset gridsortdir = "ASC">
      </cfif>
       <cfquery name="Qcomponents" datasource="Tax">
          select DISTINCT(component_type) from ctl_components 
         where app_abbrev = #appl_in#
       </cfquery>
        <cfreturn QueryConvertForGrid(Qcomponents, page, pageSize)>
      </cffunction>
    </cfcomponent>
    Any advice you can give is greatly appreciated!
    Libby H.

    @Libby H
    There are 2 things.
    1) The name of the component the grid binds to(distinctComponents) is different from the name of the CFC(getDistinct).
    2) Session variables are also available to components. There is therefore no need to pass them explicitly to a function. In any case, it is always advisable to test for the existence of a session variable before using it.
    Your code would then be something like
    <cfform>
         <cfgrid name="componentsGrid"
                 format="html"
                 pagesize=10
                 striperows="yes"
                 bind="cfc:distinctComponents.getDistinct({cfgridpage},{cfgridpagesize },{cfgridsortcolumn},{cfgridsortdirection})"
                 selectmode="row" >
             <cfgridcolumn name="Component_type" header="Component Type" width="400">
         </cfgrid>
    </cfform>
    </cfwindow>
    <!---distinctComponents.cfc--->
    <cfcomponent>
        <cffunction name="getDistinct" access="remote" returntype="struct">
            <cfargument name="page">
            <cfargument name="pageSize">
            <cfargument name="gridsortcolumn">
            <cfargument name="gridsortdir">
      <cfset var Qcomponents = ''>
        <cfif gridsortcolumn EQ "">
       <cfset gridsortcolumn = "ASC">
      </cfif>
            <cfif gridsortdir EQ "">
       <cfset gridsortdir = "ASC">
      </cfif>
    <cfparam name="session.this_appl" default="your_default_value">
       <cfquery name="Qcomponents" datasource="Tax">
          select DISTINCT(component_type) from ctl_components 
         where app_abbrev = #session.this_appl#
       </cfquery>
        <cfreturn QueryConvertForGrid(Qcomponents, page, pageSize)>
      </cffunction>
    </cfcomponent>

  • How to pass a command line argument to the sequence?

    Hi,
    My GUI is written in VB.NET. I can read the command line argument in the GUI, using: Me.AxApplicationMgr.CommandLineArguments(). But I don't know how to pass it on to my sequence file which the GUI invokes. How do I read the command line argument from the sequence file?
    My purpose, is to have the same basic sequence execute different subsequences depending on starting conditions...
    I am using TestStand 3.0 with a VB.NET GUI, on Windows XP.
    I'd appreciate any help on the subject.
    Alan

    Hi Alan,
    One obvious way would be to add parameter(s) to the MainSequence and then modify the process model sequence file to use the new parameter(s) in the step "MainSequence Callback"  in either Single Pass or Test UUTs but I wouldn't recommend this approach.
    The sequence file to be run via the entry point can be found at "RunState.ProcessModelClient" and the lookup string to the MainSequence would be "RunState.ProcessModelClient.Data.Seq["MainSequence"] or .Seq[0] .
    Therefore you could quite easy use the SetVal method to setup a Local variable in the MainSequence of your Sequence File to receive the command line string.
    Also you could do this without altering the Process Model Sequence File by using the Callback Sequence ProcessSetup in your Sequence File.
    As an example.
    You have a string in your Locals of MainSequence called CmdLineStr.
    If you add the Callback Sequence ProcessSetup to your SequenceFile, then add an ActiveX Automation Adapter step which is setup for a PropertyObject and the reference is RunState.Caller.RunState.ProcessModel.Data.Seq[0].Locals.CmdLineStr.
    There is an extra RunState.Caller to the lookup string, that's because I am doing the work in a SubSequence of Entry Point Sequence.
    The method to use is SetValString and the parameters of the PropertyObject will be
    lookupString = ""
    options = 0 or 1
    newValue = where evey you have stored you command line string.
    Now when you run your sequence file you will find that the Locals.CmdLineStr will contain your parameter string.
    Hope this is of help to you.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to pass default value of argument to stored function?

    Hi,
    in procedure I don't have to pass all arguments, because I set it with name, but in stored function I have to set arguments with index som I must set all arguments. Some arguments have default value. So how to pass default value?
    thx for any comments

    It really helps me if someone tell me that it isn't possiblle.
    thx.

Maybe you are looking for

  • Printing errors (font substitution?) in Reader 9.0

    A client is having problems printing PDFs from Reader 9.0. The file is viewing correctly, but when she prints it, parts, but not all of the document text is printing as what she has described to me as 'Arabic looking' (I am going off her description,

  • Too many images in a slideshow for iDVD 6?

    I used iDVD 6.0.2 to import an album from iPhoto, add titles/captions and iTunes music, then burn a DVD. There are 295 slides, and the show stops after the 99th slide. I've read that this is a problem with the older versions of iDVD, but I have never

  • Changing feed URL from ODEO

    I used to use Odeo.com to publish my podcast feed and that is the URL I submitted to iTunes. I now wish to change to URL to a different site (my own). I am fully aware of the <iTunes:new-feed-url> tag system, but it does not help me as I do not have

  • How do I motion track just like the Plugin CameraTracker 1.0?

    On the plugin CameraTracker, it automatically detects points that can be motion tracked, and it does it very well. What got me thinking, is that it also carries on tracking when a tracking point goes out of screen. Here's an example: I am using Camer

  • Upgrading Photohop CS 5 PC to Photoshop CS6 for Mac

    Can I upgrade from Photoshop CS5 on a PC to Photoshop CS6 for the Mac. I have purchesed an iMac and am awaiting delivery. Regards David