How to Pass a GUID as a parameter to Powershell commandlet from c#

I’m building a wrapper around custom built PowerShell command lets. I’m having difficulties in passing a GUID
parameter to a command let below which requires a GUID input from c# code.
Guid monid = Guid.Empty;
string monruleid = txt_monRuleId.Text.ToString();
monid = new Guid(monruleid);
RunspaceConfiguration runConfig = RunspaceConfiguration.Create();
PSSnapInException psEx = null;
PSSnapInInfo pssnap = runConfig.AddPSSnapIn("ServiceInfoCore", out psEx);
Runspace runspace = RunspaceFactory.CreateRunspace(runConfig);
runspace.Open();
Command mycommand = new Command("Get-OMS-AutoBugs");
mycommand.Parameters.Add("monitoringruleid", monid);
Pipeline pipeline = runspace.CreatePipeline();
pipeline.Commands.Add(mycommand);
Collection<PSObject> results = new Collection<PSObject>();
results = pipeline.Invoke();
runspace.Close();
Appreciate if someone can help with a code sample (or) with advices.
SYNTAX
    Set-OMS-AutoBug
[-MonitoringRuleId <Guid>]

Hi,
I’m writing to just check in to see if the suggestions were helpful. If you need further
help, please feel free to reply this post directly so we will be notified to follow it up.
We’d love to hear your feedback about the solution. By sharing your experience you can
help other community members facing similar problems.
Thanks for your understanding and efforts.
If you have any feedback on our support, please click here.
Best Regards
Anna
TechNet Community Support
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • How to pass Stages Guid dynamically in declarative workflow

    hello,
    How to pass Stages Guid dynamically in declarative workflow.
    Example For List we used to pass guid like this 
    System.Guid.Parse("{$ListId:Lists/Testlist;}")
    help me out to pass stage guid...
    any help would be appreciated!!!!
    Thanks regards, Vignesh.

    You need to make use of command line arguments. You can go through this link for example.
    http://www.freeos.com/guides/lsst/ch02sec14.html
    In your shell script(say test.sh) you can have
    exp fas/xxxxxx@fasbd001 file=audit_grn_28aug.dmp tables=audit_grn query=\"where org_grp_i=$1 \"$1 indicates it accepts the first argument from command line. if you want to pass 19, add that next to the script you're executing.
    From command line you can call this shell script say test.sh 19

  • How to pass  internal table values to parameter

    hi,
             how to pass  internal table values to parameter in selection screen.if is it possible means please sent codeings.
    thanks.
      stalin.

    hi,
    tables : mara.
    data :  begin of itab_mara occurs 0,
              matnr like mara-matnr,
              ernam like mara-ernam,
              end of itab_mara.
    selection-screen : begin of block blk1 with frame title text-001.
    parameters : p_matnr like mara-matnr.
    selection-screen : end of block blk1.
    select matnr ernam from mara into corresponding fields of itab_mara
                                                                    where matnr = p_matnr.
    loop at itab_mara.
    write :/ itab_mara-matnr,
               itab_mara-ernam.
    endloop.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • How to pass Order GUID to Survey addressed via URL

    Hi ,
    I have a requirement to attach a SURVEY to sales order.In the IC WC  Telesales screen we have created a link throgh which we call a ZView.In the ZView we are passing the Generated URL from  the survey we created in survey suite.
    Now we need to attach the survey to a particular sales order.We are able to read the GUID  in the Zview but we are in confusion as how to pass the GUID to http URL.
    Any suggestions will be highly appreciated.
    Regards,
    Sijo

    Thread is closed as there are no replies

  • SSRS How to pass a value for Hidden parameter ?

    Hello,
    I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
    Could someone please guide me, how to pass the value to this internal parameter in each of the following case - 
    1. Report is accessed through a Desktop application/Web application in Report Viewer.
    2. Report is accessed through the Url.
    3. Report is accessed through the Report Manager.
    Any quick help on this is highly appreciated.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi Vinay Pugalia,
    Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
    type of parameter is read-only and not accessible in parent report.
    This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
    So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
    As you have mentioned that I will also suggest you use the hidden parameter instead.
    More details information in this blog for your reference:
    SSRS – Understanding Report Parameter Visibility
    How to pass value to  hide parameter is the same as that of the visible parameter, similar thread for your reference:
    Passing the value in action property of a text box
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • How to pass an object as a parameter

    how do you pass an object as a parameter? (what type should it be ?)

    Well you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html]String
    Or you can take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html]Double
    And you can pass [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Event.html]Events
    and get yourself in trouble
    and you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html]Frame
    or maybe take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html]List
    but some will use [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html]Collection
    depends you your direction
    so if you need to know
    if you should use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html]Map
    then this is what to do
    just browse the [url http://java.sun.com/j2se/1.4.2/docs/api/]API

  • How to pass class object  as in parameter in call to pl/sql procedure ?

    hi,
    i have to call pl/sql proecedure through java. In pl/sql procedure as "In" parameter i have created "user defined record type" and i am passing class object as "In" parameter in call to pl/sql procedure. but it is giving error.
    so, anyone can please tell me how i can pass class object as "In" parameter in call to pl/sql procedure ?
    its urgent ...
    pls help me...

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS

    Hi experts,how to pass select options value as a export parameters to a zclass.
    can  give me some idea.
    Thanks
    sai

    As Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
    So - assuming you have the following in your program:
    DATA: wa TYPE sflight.
            SELECT-OPTIONS so_car FOR sflight-carrid.
    you can create a publically-visible type in your class using direct type entry and the code
    TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
    and use this to define the importing parameter of the method.
    The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
    Hope this helps.
    Regards
    Jon.

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

  • How to passing multiple values for a parameter of discoverer(url parameters

    Hi All,
    I am trying to pass multiple values for a parameter of disco report. I am trying to include my url for discoverer viewer report. the values has the following
    'jeff,mark'
    'sfophiee,angela'
    Thanks and Regards
    Venkat

    Hello Venkat,
    I know there are some problems with 10.1.2.0.2, maybe if you haven't done yet you can try with 10.1.2.2, assuming this version should be working for multiple parameter values :
    OracleAS Discoverer 10.1.2.2 is installed with the following patch :
    Patch 4960210 PLACEHOLDER BUG FOR AS/DS 10G R2 PATCH SET 2 10.1.2.2
    So, once installed you can try adding your parameter as param_<parameter_name>='sfophiee,angela'
    Hope this helps, otherwise feel free to log a Service Request to Support.
    Best Regards,
    Gianluca

  • How to pass a Class as a parameter of a method?

    I have a method like below. Inside this method I need to create a variable that his type is the type of the class I have passed as a method's parameter.
    For example, if I call the method like this "Meth1(ClassPerson);" insed the method I need to declare a  variable of class "ClassPerson", but if I call like "Meth1(ClassCity);" I need the same variable to be declared as a ClassCity.
    public function Meth1( /*I dont know what to put here*/   ):void{
         /*I dont know what to put here to declare my variable*/
         /*here
         comes
         more
         code
         using
         the
         variable*/
    I tried as below but dont worked:
    public function Meth1( classtype:Class):void{
         var var1:classtype = new classtype();
    Can someone help me?

    evyatarBH, after declare the variable like you said an error occurs when I try to access some property of the variable. I receive a mesage telling that this property dont exists.
    public function Meth1( classtype:Class ):void{
         var var1:* = new ClassFactory(classe);
         //when I try to do something like the line below the error appear
         inputtext1.text = var1.fieldname;
    rashare, I can't do this because I can't declare the object before the method is called. I must inform to the method only which class I will use, but the object must be created only inside the method.

  • How to pass (String[] args), as a parameter.

    * StringMethods
    * @author (Robin)
    * @version (1)
    public class StringMethods
        private String[] args;
        private int numArgs;
        public void printIt(String[] args)
            System.out.print ("You have entered " + numArgs + " Strings");
                if (numArgs > 10)
                    int temp = numArgs;
                    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
                    numArgs = temp;
            for (int i = 0; (i < numArgs) && (i < 10); i++)
            System.out.println ("[" + i + "] : " + args[i] + " is " + (args).length() + " characters long.");
    public void getArgs(String[] input)
    numArgs = input.length;
    arraycopy(input, 0, args, 0, numArgs-1);
    arraycopy(input, 0, args, 0, numArgs-1)This is my method class for my main method StringArray.
    What I want to know is how to pass command line arguments, i.e. {"example1", "example2", "example3"} from my main method to my method class?

    * StringMethods
    * @author (Robin)
    * @version (1)
    public class ArgMethods
    private String[] args = new String[0];
    private int numArgs;
    public String[] input = {"null", "null"};
    // constructor that takes string args to be manipulated by methods
    public ArgMethods(String[] input)
    numArgs = input.length;
    String[] args = new String[numArgs];
    System.arraycopy(input, 0, args, 0, input.length);
    public void printIt()
    if (args.length > 0)
    System.out.print ("You have entered " + numArgs + " Strings");
    if (numArgs > 10)
    int temp = numArgs;
    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
    numArgs = temp;
    for (int i = 0; (i < numArgs) && (i < 10); i++)
    System.out.println ("[" + i + "] : " + args[i] + " is " + (args).length() + " characters long.");
    else
    System.out.println ("You must enter at least one String at the command line.");
    public void reverseIt()
    if(args.length > 0)
    int next = args.length-1;
    for (int index = 0; index < args.length/2; index++)
    String temp = args[index];
    args[index] = args[next];
    args[next] = temp;
    next--;
    * StringArray
    * @author (Robin)
    * @version (1)
    public class stringArray
    public static void main (String[] args)
    int numArgs = args.length;
    // correct for output if strings less than 10 and greater than 0
    if (numArgs > 0)
    System.out.print ("You have entered " + numArgs + " Strings");
    if (numArgs > 10)
    int temp = numArgs;
    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
    numArgs = temp;
    for (int i = 0; (i < numArgs) && (i < 10); i++)
    System.out.println ("[" + i + "] : " + args[i] + " is " + (args[i]).length() + " characters long.");
    else
    System.out.println ("You must enter at least one String at the command line.");
    ArgMethods test = new ArgMethods( args );
    // test.printIt();
    // test.reverseIt();
    // test.printIt();
    *almost finished -- posting this up here so i can get it at home ((only accessible e-mail down plus can't find pen drive))..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass a single element in an array to XSL from BPEL

    In a bpel (2.0) process I have a for-each loop iterating through a list in the original input document.  Within that loop I need to construct an  input document  for a call to a web service based on data in the current node of the list objects I am looping through.
    Constructing the input document via BPEL assign activity copies within the for-each loop is an option but due to the complexity of that document I would prefer to use XSL.  But I don't know how to pass the index information (ie. the for-each counter) into XSL and use it there (and I would prefer not to have to do so, since that will prevent use of the XSL GUI in jdev), so I would prefer to send  the current node of the list as input to XSL instead.
    Is it possible to pass a sub-section of an XML document (e.g. one node in the array) as input into XSL rather than the whole document?  In other words, I would like to send the current array element from the original input document rather than the entire original input document because I will be using the data within that array element to create the web service input document.
    Example:
    <forEach parallel="no" counterName="i"
                         name="ForEachEntry">
                  <startCounterValue>1</startCounterValue>
                  <finalCounterValue>$numTimeEntries</finalCounterValue>
    If I used the BPEL assign activity to populate the input document I would need lots of copies similar to this:
                  <copy>
                      <from>$inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]/ns3:origtransactionreference</from>
                      <to>$InvokeOteDetailAbsenceErrorStatusService_OteAbsenceDetailFailureService_InputVariable.OteAbsenceDetailFailureServiceInput_msg/ns19:OrigTransactionReference</to>
                  </copy>
    I would prefer to send the current list object as an input variable into an XSL transform: 
         $inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]
    Is there syntax in bpel that would do that?
    Thanks

    You need use While Element and use Array like Element[number]
    With While element you iterate <employee> node
    and with Element[number] you can extract information from that node.
    I wrote a BPEL that scan a XML file, the input is:
    <cliente>
            <codigo>01</codigo>
            <nombre>Deiby Mauricio Gomez</nombre>
                    <productos>
                            <producto>
                                    <nombre>Camisa Polo</nombre>
                                    <precio>50</precio>
                            </producto>
                            <producto>
                                    <nombre>Pantalon Lona</nombre>
                                    <precio>100</precio>
                            </producto>
                    </productos>
            </cliente>
            <cliente>
            <codigo>02</codigo>
            <nombre>Julio Cesar Ayapan</nombre>
                    <productos>
                            <producto>
                                    <nombre>Camisa Polo</nombre>
                                    <precio>50</precio>
                            </producto>
                    </productos>
            </cliente>
    In my BPEL I added up all article prices and after that I write to txt file the client and the Total.
    Example:
    Deiby Gomez, 150
    Cesar Ayapan, 50
    My while element is this (Please pay attention in bold words):
      <while name="While1"
               condition="bpws:getVariableData('variable1')&lt;=count(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente'))">
          <sequence>
            <assign name="Assign1">
              <copy>
                <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:cantidad"/>
              </copy>
              <copy>
                <from variable="Receive1_input_files" part="body"
                      query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:id"/>
              </copy>
            </assign>
            <invoke name="Invoke1" inputVariable="Invoke1_process_InputVariable"
                    outputVariable="Invoke1_process_OutputVariable"
                    partnerLink="ValidacionBancos2WS" portType="ns5:BPELProcess1"
                    operation="process" bpelx:invokeAsDetail="no"/>
            <switch name="Switch1">
              <case condition="bpws:getVariableData('Invoke1_process_OutputVariable','payload','/ns5:processResponse/ns5:resultado')='true'">
                <bpelx:annotation>
                  <bpelx:pattern>Si el cliente es aprobado</bpelx:pattern>
                  <bpelx:general>
                    <bpelx:property name="userLabel">Si Aprobado</bpelx:property>
                  </bpelx:general>
                </bpelx:annotation>
                <sequence>
                  <assign name="Assign4">
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:id"/>
                    </copy>
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query="/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:nombre"/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:nombre"/>
                    </copy>
                    <copy>
                      <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                      <to variable="Approved_Write_input" part="body"
                          query="/ns7:clientes/ns7:cliente/ns7:total"/>
                    </copy>
                  </assign>
                  <invoke name="Invoke2" inputVariable="Approved_Write_input"
                          partnerLink="fileAdapterWriteApproved"
                          portType="ns6:Write_ptt" operation="Write"
                          bpelx:invokeAsDetail="no"/>
                </sequence>
              </case>
              <otherwise>
                <sequence name="Sequence1">
                  <assign name="Assign5">
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query='/ns4:clientes/ns4:cliente[number(bpws:getVariableData("variable1"))]/ns4:codigo'/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:id"/>
                    </copy>
                    <copy>
                      <from variable="Receive1_input_files" part="body"
                            query="/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:nombre"/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:nombre"/>
                    </copy>
                    <copy>
                      <from expression="sum(bpws:getVariableData('Receive1_input_files','body','/ns4:clientes/ns4:cliente[number(bpws:getVariableData(&quot;variable1&quot;))]/ns4:productos/ns4:producto/ns4:precio'))"/>
                      <to variable="Rechazados_Write_input" part="body"
                          query="/ns9:clientes/ns9:cliente/ns9:total"/>
                    </copy>
                  </assign>
                  <invoke name="Invoke3"
                          inputVariable="Rechazados_Write_input"
                          partnerLink="fileAdapterWriteRechazados"
                          portType="ns8:Write_ptt" operation="Write"
                          bpelx:invokeAsDetail="no"/>
                </sequence>
              </otherwise>
            </switch>
            <assign name="Assign2">
              <copy>
                <from expression="''"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:id"/>
              </copy>
              <copy>
                <from expression="bpws:getVariableData('variable1')+1"/>
                <to variable="variable1"/>
              </copy>
              <copy>
                <from expression="''"/>
                <to variable="Invoke1_process_InputVariable" part="payload"
                    query="/ns5:process/ns5:cantidad"/>
              </copy>
            </assign>
          </sequence>
        </while>

  • How to pass a file with parameters to a shell script from java

    I have a sh script running on linux. This script prompts when started prompts for 4 questions, for which the answers are 1, 1, 1, Y. So now I need to invoke this from a java program and pass the parameters in a file from jave to the script. Can anyone tell me how to code this in java. The script works fine from command line.
    Thanks in advance.

    Here is the standard answer to all questions involving Runtime.exec(), enjoy:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to pass an "object" as a parameter in an web services request?

    I am developing a simple web service client and server (using Eclipse for auto code generation). I am able to pass String and Byte array from the client. However, there is a parameter "statusInfo" which is an object of the class "cz.unmz.namespaces.csn369791.SendCertificatesRequestStatusInfo" and I have no idea of how to do so.
    Below is an extract of the wsdl file:
       <xs:element name="SendCertificatesRequest">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="callerID" type="xs:string"/>
          <xs:element name="messageID" type="xs:string" minOccurs="0" maxOc-curs="1"/>
          <xs:element ref="certificateSequence"  minOccurs="0" maxOccurs="1"/>
          <xs:element name="statusInfo">
           <xs:simpleType>
            <xs:restriction base="xs:string">
             <xs:enumeration value="new_cert_available_notification"/>
             <xs:enumeration value="ok_cert_available"/>
             <xs:enumeration value="failure_inner_signature"/>
             <xs:enumeration value="failure_outer_signature"/>
             <xs:enumeration value="failure_syntax"/>
             <xs:enumeration value="failure_request_not_accepted"/>
             <xs:enumeration value="failure_internal_error"/>
            </xs:restriction>
           </xs:simpleType>
          </xs:element>
         </xs:sequence>
        </xs:complexType>
       </xs:element>Below is an extract of the auto-gen SendCertificatesRequest.java file:
       private java.lang.String callerID;
       private java.lang.String messageID;
       private byte[][] certificateSequence;
       private cz.unmz.namespaces.csn369791.SendCertificatesRequestStatusInfo statusInfo;
       public SendCertificatesRequest(
          java.lang.String callerID,
          java.lang.String messageID,
          byte[][] certificateSequence,
          cz.unmz.namespaces.csn369791.SendCertificatesRequestStatusInfo) {
          this.callerID = callerID;
          this.messageID = messageID;
          this.certificateSequence = certificateSequence;
          this.statusInfo = status = statusInfo;
       public void setStatusInfo(cz.unmz.namespaces.csn369791.SendCertificatesRequestStatusInfo) {
          this.statusInfo = statusInfo;
       Below is the auto-gen SendCertificatesRequest.java file:
    * SendCertificatesRequestStatusInfo.java
    * This file was auto-generated from WSDL
    * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
    package cz.unmz.namespaces.csn369791;
    public class SendCertificatesRequestStatusInfo implements java.io.Serializable {
        private java.lang.String _value_;
        private static java.util.HashMap _table_ = new java.util.HashMap();
        // Constructor
        protected SendCertificatesRequestStatusInfo(java.lang.String value) {
            _value_ = value;
            _table_.put(_value_,this);
        public static final java.lang.String _new_cert_available_notification = "new_cert_available_notification";
        public static final java.lang.String _ok_cert_available = "ok_cert_available";
        public static final java.lang.String _failure_inner_signature = "failure_inner_signature";
        public static final java.lang.String _failure_outer_signature = "failure_outer_signature";
        public static final java.lang.String _failure_syntax = "failure_syntax";
        public static final java.lang.String _failure_request_not_accepted = "failure_request_not_accepted";
        public static final java.lang.String _failure_internal_error = "failure_internal_error";
        public static final SendCertificatesRequestStatusInfo new_cert_available_notification = new SendCertificatesRequestStatusInfo(_new_cert_available_notification);
        public static final SendCertificatesRequestStatusInfo ok_cert_available = new SendCertificatesRequestStatusInfo(_ok_cert_available);
        public static final SendCertificatesRequestStatusInfo failure_inner_signature = new SendCertificatesRequestStatusInfo(_failure_inner_signature);
        public static final SendCertificatesRequestStatusInfo failure_outer_signature = new SendCertificatesRequestStatusInfo(_failure_outer_signature);
        public static final SendCertificatesRequestStatusInfo failure_syntax = new SendCertificatesRequestStatusInfo(_failure_syntax);
        public static final SendCertificatesRequestStatusInfo failure_request_not_accepted = new SendCertificatesRequestStatusInfo(_failure_request_not_accepted);
        public static final SendCertificatesRequestStatusInfo failure_internal_error = new SendCertificatesRequestStatusInfo(_failure_internal_error);
        public java.lang.String getValue() { return _value_;}
        public static SendCertificatesRequestStatusInfo fromValue(java.lang.String value)
              throws java.lang.IllegalArgumentException {
            SendCertificatesRequestStatusInfo enumeration = (SendCertificatesRequestStatusInfo)
                _table_.get(value);
            if (enumeration==null) throw new java.lang.IllegalArgumentException();
            return enumeration;
        public static SendCertificatesRequestStatusInfo fromString(java.lang.String value)
              throws java.lang.IllegalArgumentException {
            return fromValue(value);
        public boolean equals(java.lang.Object obj) {return (obj == this);}
        public int hashCode() { return toString().hashCode();}
        public java.lang.String toString() { return _value_;}
        public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
        public static org.apache.axis.encoding.Serializer getSerializer(
               java.lang.String mechType,
               java.lang.Class _javaType, 
               javax.xml.namespace.QName _xmlType) {
            return
              new org.apache.axis.encoding.ser.EnumSerializer(
                _javaType, _xmlType);
        public static org.apache.axis.encoding.Deserializer getDeserializer(
               java.lang.String mechType,
               java.lang.Class _javaType, 
               javax.xml.namespace.QName _xmlType) {
            return
              new org.apache.axis.encoding.ser.EnumDeserializer(
                _javaType, _xmlType);
        // Type metadata
        private static org.apache.axis.description.TypeDesc typeDesc =
            new org.apache.axis.description.TypeDesc(SendCertificatesRequestStatusInfo.class);
        static {
            typeDesc.setXmlType(new javax.xml.namespace.QName("http://namespaces.unmz.cz/csn369791", ">>SendCertificatesRequest>statusInfo"));
         * Return type metadata object
        public static org.apache.axis.description.TypeDesc getTypeDesc() {
            return typeDesc;
    }    In the client (an auto-gen JSP file), Eclipse has generated the following two lines of code:
    cz1unmz1namespaces1csn3697911SendCertificatesRequest_4id.setMessageID(messageID_5idTemp);
    cz1unmz1namespaces1csn3697911SendCertificatesRequest_4id.setMessageID(callerID_6idTemp);    I have also added the following line for the parameter "certificateSequence" (I have already prepared a Bytearray of certificateSequence)
    cz1unmz1namespaces1csn3697911SendCertificatesRequest_4id.setCertificateSequence(certificateSequence);    Can anyone suggest a way of passing the parameter "statusInfo"? Thanks.
    Edited by: stupidtss on Oct 28, 2009 12:32 AM

    You want something like this:
    DECLARE
      lio_success  VARCHAR2( 2000 );
      li_id        NUMBER;
      li_dep_id    NUMBER;
      li_sel_id := NUMBER;
      li_date DATE;
      lo_date DATE;
      lio_return_message xyz_bpe_rec_fn.xyz_bpe_rec_col;
      l_ret xyz;
    BEGIN
      lio_success := 'some value';
      li_id := NULL;     -- or some number
      li_dep_id := NULL; -- or some number
      li_sel_id := NULL; -- or some number
      li_date DATE := sysdate;
      lio_return_message.col1 := somevalue;
      lio_return_message.col2 := somevalue;
      lio_return_message.coln := somevalue;
      l_ret := get_xyz( lio_success
                      , li_id
                      , li_dep_id
                      , li_sel_id
                      , li_date
                      , lo_date
                      , lio_return_message );
    END;
    /

Maybe you are looking for

  • Error while deploying web application in OAS

    I was trying to deploy a web application in OAS through enterprise manager. But I get the following error. Can any one please help me. An error occurred when processing the data submitted. Find the appropriate field and enter the correct information

  • Role of a Business Analyst in SAP

    HI, Can some tell me what is role of a business analyst in SAP?. I know BA is gathers requirement from Client and gives it to the technical team. I am little confused to what it exactly is the work . A SAP consultant also configures according the cli

  • Web Previewer not working in 9iDS

    I'm trying to get a generated forms module to run automatically in the web previewer after I generate it. In the Forms Generator Options dialog under the Run tab I have "Run as a Web Form" and "Run Form Automatically" boxes checked. JInitiator 1.3.1.

  • Lost Append structure on adding standard field in exctractor 2LIS_13_VDITM

    Hi, In 2LIS_13_VDITM i have appended structure. Now i required to pull in another standard field from from the extractor from LBWE maintenance. One doing that and activating ii somehow lost the custom appended structure from the extract structure. I

  • Web Services - What is the right strategy to follow?

    Hi, I want to consume web services directly into the database, the application is all to be within the database no website or clients. Based on the calls to the external provider I then want to be able to send request back. I want to use pl/sql insid