How to assign an expression to an array of strings

i'm assuming this is simple, but have searched the forums and googled and a can't seem to make this work
all i need to do is create an element in the "to" array
here's info from the wsdl:
8< snip -------
<xsd:complexType name="ArrayOfString">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
8< snip -------
<message name="sendmsgInput">
<part name="session_id" type="xsd:string" />
<part name="api_id" type="xsd:int" />
<part name="user" type="xsd:string" />
<part name="password" type="xsd:string" />
<part name="to" type="tns:ArrayOfString" />
8< snip ---------
here's an example of the XML i need to send:
<to xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
<item xsi:type="xsd:string">2799912345</item>
<item xsi:type="xsd:string">27999123134</item>
</to>
i'm having trouble making the "Assign" activity work using copy, append or insert-after
i'm new to BPEL and i suspect an expert can whip out the copy XML for this in no time
if you're that expert, please reply
thanks
brett

sorry about nto givng a detailed reply to your question but i hope this link would help you out.
http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial3-DataManipulationTutorial.pdf

Similar Messages

  • [b]how to assign whole expression to a temporary variable[/b][/b]

    Good afternun. Can someone help me how to assign the whole expression to a temporary variable. The expression is
    id = catDao.findByPK(info.getCategoryId());
    Thanks in advance and may I know how to validate the temporary variable?

    You can do this with an anonymous class and a command pattern.
    interface LazyEval {
       public Object getValue();
    LazyEval le = new LazyEval() {
      public Object getValue() {
        return catDao.findByPK(info.getCategoryId());
    id = le.getValue();However, this sound like a solution to a problem which should be done another way.

  • How to find the mode of an array of strings

    Hey guys,
    So I came across this little problem that I thought I could solve relatively easily, but it turned out quite messy.
    I have this array of strings and I want to find the most frequent entry of that array. Let's say I have the following array.
    apple
    apple
    kiwi
    orange
    apple
    the mode would give me apple. I thought about converting the strings into a number and then find the mode as usual.
    But if the string was too long, it seems a single number cant be used to represent it.
    Any ideas on a clean way to do this?
    Solved!
    Go to Solution.

    chembo wrote:
    This may work also
    You should probably link to the thread where this solution was first presented instead.
    Since the question was: "I have this array of strings and I want to find the most frequent entry of that array", here's is a more tailored solution to the actual question.
    Still, my more traditional approach outlined in the first answer would probably be more efficient, because it does not generate any large data structures. Try it!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MostFrequentStringEntry.vi ‏8 KB
    MostFrequentString.png ‏6 KB

  • How to assign an expression to a statement Step in TestStand automatically?

    Hi,
    I am using VC++ and I am trying to create a statement step inside a SequenceFile already created. I can actually create my Statement type of step and insert it at the right place. Unfortunately, I can't find a way to set the Expression for this step. How can I do it?
    Here is what I tried:
    TS:tepPtr step = engine->NewStep(TS::NoneAdapterKeyName, TS:tepType_Statement);
    // Assign its name to the step
    _bstr_t calledName(stepName);
    step->put_Name(calledName);
    // Get all the sequence file variables into a PropertyObject
    // TS:ropertyObject variables = TS::Execution.GetFileGlobals ( seqFile );
    // Expression construction
    _bstr_t expression("resourceHeader=ResStr(");
    expression += _bstr_t(id_ptr) + ")";
    step->CustomActionExpression.Assign(expression);
    I get the expressions created but nothing in the Expression field.
    NB: I use TS 4.0
    Any hints are welcome.
    - Eric

    Works fine.
    But as you are looking familiar with the kind of programming I do, can I ask another question?
    There it is...
    I highly inspire myself from a solution found on a discussion. I would like to create SequenceFile Global variables for a SequenceFile object but can't get it to work. Here is the code that should do it:
    TS:equenceFilePtr CreateSeqFileGlobals(TS:equenceFilePtr seqFile) {
    TS:ropertyObjectPtr propObjPtr = seqFile->AsPropertyObject();
    propObjPtr->SetValString("Data.FileGlobalsDefaults.resourceHeader", 1 ,""); // resourceHeader
    propObjPtr->SetValString("Data.FileGlobalsDefaults.resourceFail", 1, ""); // resourceFail
    seqFile->IncChangeCount(); // Signify the file changed
    return(seqFile);
    Any idea why this doesn't do what I expect it to do?
    Regards,
    - Eric

  • How to execute an expression which is in a string

    hi
    i am facing one interesting problem
    i want to evaluate an expression like
    sin^2 (theta) * cos^2 (phi) which i am getting in string object
    something like expression entered by an user
    and i want to evaluate it in a program
    how do i do that
    i mean how to treat this string as a statement
    thanx in advance as usual

    Here's one of probably many.
    http://tp.lc.ehu.es/anonym/java/eval.html
    Google is your friend.
    http://www.google.com/search?hl=en&q=java+eval&btnG=Google+Search

  • How to assign values to instances of a method created via an array

    i have created an array of the PlayerRecord instance called currentPlayers and im trying to use another array of Strings to give names to the players (currentPlayers[instance].name) but it is failing horribly
    when i try to name them one at a time as seen in the code here it seems to compile fine, but when i test it with a System.out.println(currentPlayers[0].name); it tells me "Exception in thread "main" java.lang.NullPointerException"
    Im assuming this happens because the instances of PlayerRecord were created using an array, therefore i could not give the PlayerRecord a name value to begin with, but shouldnt currentPlayers[0].name = namesarray[0]; make up for that and give the value in namesarray[0] to currentPlayers[0].name? therefore allowing me to display the value held in currentPlayers[0].name without the error?
    public class Round
         public static PlayerRecord[] currentPlayers = new PlayerRecord[15];
         public Round(String[] namesarray)
         currentPlayers[0].name = namesarray[0];
         System.out.println(currentPlayers[0].name);     
    public class test
      public static void main (String[] args)
      String[] namelist= {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l","m", "n", "o", "p"};
      Round one = new Round(namelist);
    public class PlayerRecord
         public String name;
         public PlayerRecord(String playername)
              name = playername;
    }

    unfortunately the rest of the program relies on being
    able to change the number of elements in the array,
    so in the end a variable would take the place of the
    15 in
    public static PlayerRecord[] currentPlayers =
    new PlayerRecord[15];so that would not work
    It 'works', just not the way you supposed it would. :^)
    It initializes an array of 15 elements with references to type Round. You need to assign those references to instances. The only way to create instances is via the 'new' keyword.
    im surprised java isnt up there in the top reasons
    for suicide
    It's too early in the week for me to start drinking.....
    actually now that i think about it, i could make it
    work by having a definite amount of elements in the
    array, but the array of names cannot be read since
    they are connected to the Round method
    Correct me if I am wrong, but you do already have a definite number of elements in your array. 15.
    so basically the creation of the array of
    currentPlayers has to be before the Round method, yet
    the naming of the players has to happen in the Round
    method, is there any way this can be done?
    Round is not a method. It is your class's constructor (I think). Right before calling the setter for 'name', call 'new' and assign the created Round instance to that array element (in your case '0').
    Then call 'name'.
    Message was edited by:
    s34nsm411- Saish

  • How to assign element to String[] array?

    For example::
    String[] array={ "abcd" , "1234","Noman","java"} ;
    Suppose i want to replace ' 2 ' by ' x ' how i will do that ?

    As PhHein said: String are immutable.
    You can do like this:
        String[] strA = new String[]{ "abcd" , "1234","Noman","java"} ;
        for ( int i = 0; i<strA.length; i++) {
          String string = strA;
    if(string.contains("2")){
    string = string.replace('2', 'x');
    strA[i] = string;
    System.out.println(string);
    System.out.println(Arrays.toString(strA));                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can i asign value to variables stored in an array of string?

    hi
    how can i asign value to variables stored in an array of string. i need to do it so that i can evaluate a math expression by usin those values. for example, i have a string array like [x, y, z, k]. now i need to asign 2.0 to x, 3.0 to y and so on. then if i type x+y, the program should evaluate the expression by usin x=2.0 and y=3.0. i am usin JEP for parsing and evaluating.
    any help or suggestion would be much apreciated.
    here is how i got the array
    System.out.println("Type first expression");
    BufferedReader br1 = new BufferedReader( new
                         InputStreamReader(System.in));
    String expression1 = br1.readLine();
    Jep jep = new Jep();
    Node node1 = jep.parse(expression1);
    TreeAnalyzer Ta1 = new TreeAnalyzer(node1);
    Map<Variable, Integer> map1 = Ta1.getVariables();
    /**The following will convert the variable names to a sorted array*/
         /**with the result in varNames.*/
    String[] res1 = new String[map1.size()];
                int i=0;
                for(Variable v:map1.keySet())
                    res1[i++]=v.getName();  
    System.out.println(Arrays.toString(res1));

    I could not use HashMap as those variables are to be retrieved from any expression typed by user and thus unknown to me beforehand.
    System.out.println("Type first expression");
    BufferedReader br1 = new BufferedReader( new
                         InputStreamReader(System.in));
    String expression1 = br1.readLine();
    Jep jep = new Jep();
    Node node1 = jep.parse(expression1);
    TreeAnalyzer Ta1 = new TreeAnalyzer(node1);
    Map<Variable, Integer> map1 = Ta1.getVariables();then i have converted them to a sorted array
    String[] res1 = new String[map1.size()];
                     int i=0;
                     for(Variable v:map1.keySet())
                         res1[i++]=v.getName();              
                     System.out.println(Arrays.toString(res1));now i need to assign random double values to those variables.
    and then use those double values for variables when evaluating the expression.
    pls help.

  • How to correct copy/append/insert a array

    Hi @ all,
    I have a message type I'd like to iterate through and extract values from array (1).
    Then place into another array (2):
    TestOutputVariable(Array (1)):
    <roottest>
    <AAA>
    <BBB>result1.1</BBB>
    <BBB>result1.2</BBB>
    <testname>test1</testname>
    </AAA>
    <AAA>
    <BBB>result2.1</BBB>
    <BBB>result2.2</BBB>
    <testname>test2</testname>
    </AAA>
    </roottest>
    ReportInputVariable(Array(2)):
    <rootreport>
    <AAA>
    <name/>
    </AAA>
    </rootreport>
    for example ReportInputVariable must be like:
    <rootreport>
    <AAA>
    <name>test1
    </AAA>
    <AAA>
    <name>test2
    </AAA>
    </rootreport>
    <while name="While_1"
    condition="bpws:getVariableData('count') >= bpws:getVariableData('iterator')">
    <assign name="AssignTests">
    <copy>
    <from variable="TestOutputVariable"
    part="parameters"
    query="/ns2:getTests/ns2:result/ns2:roottest/ns2:AAA[bpws:getVariableData('iterator')]/ns2:testname"/>
    <to variable="ReportInputVariable" part="payload"
    query="/client:ReportBPELProcessProcessResponse/client:result/client:rootreport/client:AAA[bpws:getVariableData('iterator')]/client:name"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('iterator') + 1"/>
    <to variable="iterator"/>
    </copy>
    </assign>
    </while>
    But exception: XPATH returns null node...
    How to populate Array(2)?

    Ok let's see (staying in english is allright I hope... eventhough my is getting really bad).
    As I said I only can extract the data until now, haven't tried to write it to an array. In addition don't copy the code I give here because it's only to give you an hint. But the JDeveloper is a really cool tool to "click" the right expressions together...
    So the trick is to "build" the xpath to access the arrayfield you want to fetch. Therefore at first you need an counter:
    <assign><copy><from expression="1"><to variable="counter"></copy></assign>
    Now you're going to build your xpath:
    <copy><from expression="concat('/roottest/AAA[',bpws:getVariableData('counter'),']')"/>
    <to variable="xpathPosition"/>
    </copy>
    Now you an xPath which is pointing to the child elements of your first node <AAA>. You use these expression now for the copy process:
    <copy>
    <from expression="bpws:getVariableData(???, ???, concat(bpws:getVariableData('xpathPosition'),'/testname'))"/>
    <to variable="output"/>
    </copy>
    Notice that ??? stands for Variable and Part name - still fighting with the syntax. The main point is that concat gives you the xpath expression to the array field you want (for counter = 1 eg. "/roottest/AAA[1]/testname") - that's it.
    To assign the value to an array - sorry, haven't tried it but the link I posted seemed good. The problem is that in order to insert the data into an array you have to append a new element into the array and therefore use one of the extended functions (=bpelx).
    Viel Spaß damit :-)

  • How to store logical operator in an array in java

    how to store logical operator in an array in java.
    Array should not be String type if i pass an element of that array it should be considered as logical operator

    my exact requirment is like this, i need some logic
    to convert string like this "2 Equals 3 AND 4 greater
    than 7" to condition like this
    2 == 3 && 4 >7 which i can pass to if
    condition.So you want to create an expression parser?
    No need for something as ugly as what you think you need, a simple nested conditional will do it for just the few logical operations.

  • How to correct copy/append/insert a array in BPEL

    BPEL
    Hi @ all,
    I have a message type I'd like to iterate through and extract values from array (1).
    Then place into another array (2):
    TestOutputVariable(Array (1)):
    <roottest>
    <AAA>
    <BBB>result1.1</BBB>
    <BBB>result1.2</BBB>
    <testname>test1</testname>
    </AAA>
    <AAA>
    <BBB>result2.1</BBB>
    <BBB>result2.2</BBB>
    <testname>test2</testname>
    </AAA>
    </roottest>
    ReportInputVariable(Array(2)):
    <rootreport>
    <AAA>
    <name/>
    </AAA>
    </rootreport>
    for example ReportInputVariable must be like:
    <rootreport>
    <AAA>
    <name>test1
    </AAA>
    <AAA>
    <name>test2
    </AAA>
    </rootreport>

    Ok let's see (staying in english is allright I hope... eventhough my is getting really bad).
    As I said I only can extract the data until now, haven't tried to write it to an array. In addition don't copy the code I give here because it's only to give you an hint. But the JDeveloper is a really cool tool to "click" the right expressions together...
    So the trick is to "build" the xpath to access the arrayfield you want to fetch. Therefore at first you need an counter:
    <assign><copy><from expression="1"><to variable="counter"></copy></assign>
    Now you're going to build your xpath:
    <copy><from expression="concat('/roottest/AAA[',bpws:getVariableData('counter'),']')"/>
    <to variable="xpathPosition"/>
    </copy>
    Now you an xPath which is pointing to the child elements of your first node <AAA>. You use these expression now for the copy process:
    <copy>
    <from expression="bpws:getVariableData(???, ???, concat(bpws:getVariableData('xpathPosition'),'/testname'))"/>
    <to variable="output"/>
    </copy>
    Notice that ??? stands for Variable and Part name - still fighting with the syntax. The main point is that concat gives you the xpath expression to the array field you want (for counter = 1 eg. "/roottest/AAA[1]/testname") - that's it.
    To assign the value to an array - sorry, haven't tried it but the link I posted seemed good. The problem is that in order to insert the data into an array you have to append a new element into the array and therefore use one of the extended functions (=bpelx).
    Viel Spaß damit :-)

  • How to assign sessionscope variable to the bind variable in Query of VO

    Hi all,
    I want to know how to assign a sessionscope variable in the binvariable of Query in VO
    My sessionscope variable holds the value of currently selected column in the table. eg:empname of the currently selected column which is in empdetails table...
    I want display the schemes available for the selected employee in the next table..The schemes are in another table named empschemes which has the empname and empschemes as column
    I have created a vo for empschemes table with bind variable 'scheme_bind'..I need to set the sessionscope variable '#{sessionScope.empname}" to the bind variable.
    Its urgent,..Pls do reply asap
    Thanks in advance
    Nasrin

    HI,
    You can use
    adf.context.sessionScope.get("YourSessionVariable")this code for assigning VO's bind variable value.write this code where you create bind variable and do not forget click on expression radio button.
    Rafat

  • How to redirect output to a byte array?

    I've Googled this, and looked around in the tutorials, but I haven't found a simple example of how to assign an output to a byte array. Maybe I'm just too much of a newbie to know how to navigate the documentation, but...
    What I need is for this code (which does exactly what I want) to put the output in a byte array instead of in the file "test.txt". How do I accomplish that?
    Thanks,
    --gary
    FileWriter writer = null;
            try {
              writer = new FileWriter("test.txt");
                MinimalHTMLWriter htmlWriter = new MinimalHTMLWriter(writer,
                  (StyledDocument)textRegion.getDocument());
              htmlWriter.write();
            catch (IOException ex) {
                ... etc...

    Thanks, That works fine!
    --gary                                                                                                                                                                                                                               

  • How to build regular expression

    I am trying to build a regular expression that will search the following array of strings for the sequence 3.1
    Read Modem Information:
    Device Type .......................... 2
    Serial Number ........................ 11437
    Primary Phone Number ................. 1800...
    Secondary Phone Number ............... 1800...
    Modem Software ....................... BOOT.3.1 Jun 17 2004 17:02:26
    Bracelet Software .................... 4.0
    Validation Number .................... Default
    Login Name ........................... Default
    Login Password ....................... Default
    Case Number .......................... Default
    Primary Encryption Key ............... Default        
    Secondary Encryption Key ............. Default        
    Dialing Format ....................... True
    Call In Format ....................... True
    Modem Download Flag is Clear ......... True
    SCRAM Download Flag is Clear ......... True
    SCRAM Char Table Load Flag is Clear .. True
    Download Inhibit ..................... True
    Exiting Boot (8 sec) ................. Switching to operating memory.
    Main Revision ........................ SLCP.3.1 Jun 17 2004 17:02:46
    Reset ................................ Complete
    This is my first real foray into regular expressions and so I am lost trying to understand the help file.
    Thanks!
    Tay
    Message Edited by slipstick on 09-25-2008 09:34 AM

    I think the OP was puzzled about how to form a RE.
    For the specific case or how to find the exact string "3.1", and to not match anything else, the RE is "3\.1"
    Why?
    For the most part, a RE search string is an exact character match. However things change when certain "special characters" are included in the search string. The RE help message says what they are, but the descriptions can be a bit daunting at first.
    As a first example of special characters, the RE of "." (The single character fullstop) will match ANY single character. Thus a RE of "3.1" will match "3.1", "301", "3Z1", but not "31" or 3aa1".
    Another special character is "*". It modifies the match to allow zero or more of the preceeding bit. So "3.*1" matches "3", followed by any number of any character (including no characters), followed by "1". so it will match "31", "301", "3ABC51", "31111111"
    The action of a special character is cancelled by preceeding it with a backslash. So in the example above "3\.1" matches ONLY the string "3.1"
    The best way to discover exactly how RE's work is to try some out. Make a VI containing Match Pattern, and suitable controls and indicators. Work through the examples and see how they operate. Now try your own!

  • How to assign array1 to array2?

    Dear All
    I am trying to do a array question but I am not good in arrays.
    For example, if I had created the following
    int[]array1 = { 1,2,3,4,5,6,7,8,9 };
    and I wish to assign this array1 to another array which is array2 . How can I do it ? Because I tried doing this and hit error.
    int[]array2 = array1[];
    I am prompt a message that a .Class expected.
    I am creating the above in a public static void main environment.
    Please advise.
    Thank you.

    dont use the second [].
    int[]array2 = array1;

Maybe you are looking for

  • How to insert sql code in module (not form) other than API?

    I generated module as web pl/sql in Oracle Design Editor 6i. I have different user types with different privileges. I want to do some permission checking before a user can reach the tables. All the help are related to API and Form. Is there a way to

  • [Solved] Can't find what messes up my locales

    Hi, First of all, I'd like to say that I did follow the beginner's guide and the locale wiki entry before posting here. I spents many hours trying to correct the issue myself but I can't think of anything but ugly fixes now... Please note that I've d

  • Table of Contents Slider Issues

    I have been told by iBooks that on my iBook that I have published that when you look at The TOC (Table of Contents) in landscape mode the slider either doesn't move or it goes back to the first page (copyright page).  Any ideas how I solve this? 

  • File upload component and text area issue

    Hi guys, I have static text, text area and button on the same page. Text area binded to session bean value and all works fine (I can input text into text area and press button to save changes). After adding file upload component to the same page I ha

  • Good places online to watch other's Video work

    Hi, I love video editing! I get a lot of inspiration from seeing what others do with their videography too! I was wondering if anyone has any recommendations for good online sites/forums where people post their work. Not really short films, but more