Creating array of strings in Webi

In Webi I need to create array of string in one formula and want to use that formula in another formula, Now my issue here is how can I create a array in webi.
Please help me.
Thanks
Siva

Hi,
I didn't see any option for creating Array in WebI .
You will have to do it in Backend .

Similar Messages

  • Create array varible in TestStand 4.0

    Hi  gurus,
           I have a doubt that how can we create Array of string in TestStand 4.0 using C#.NET environment.
    I used following method, but failed to create array:
    objPropertyObj.SetValStringByOffset(10,PropertyOpt​ions.PropOption_InsertIfMissing,"SRU"); // exception here....
    The other following method creates array with empty size:
    objPropertyObj.NewSubProperty("SUBSTITUTE.SRU", PropertyValueTypes.PropValType_String, true, "Arrayw",10 );
    Please let me know how to set the length of the array at second method.
    Thank you,
    regards
    RKK

    You should post to the TS board.
    Try to take over the world!

  • "Using a CIN to Create an Array of Strings in LabVIEW" example crashes LV on Linux

    Tried to utilize this NI example: "Using a CIN to Create an Array of Strings in LabVIEW" (http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B4B282BE7EF907C8E034080020E74861&p_node=&p_source=External)
    Compiles OK with the makefile made by the LV's lvmkmf utility. Nevertheless when I try to run the VI (with the code loaded into the CIN, of course), LabVIEW 7.1.1 on a SUSE 9.3 Linux machine crashes:
    LabVIEW caught fatal signal
    7.1.1 - Received SIGSEGV
    Reason: address not mapped to object
    Attempt to reference address: 0x0
    Segmentation fault
    Any ideas? Did anybody try this on a Windows machine?

    H View Labs wrote:
    Tried to utilize this NI example: "Using a CIN to Create an Array of Strings in LabVIEW" (http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B4B282BE7EF907C8E034080020E74861&p_node=&p_source=External)
    Compiles OK with the makefile made by the LV's lvmkmf utility. Nevertheless when I try to run the VI (with the code loaded into the CIN, of course), LabVIEW 7.1.1 on a SUSE 9.3 Linux machine crashes:
    LabVIEW caught fatal signal
    7.1.1 - Received SIGSEGV
    Reason: address not mapped to object
    Attempt to reference address: 0x0
    Segmentation fault
    Any ideas? Did anybody try this on a Windows machine?
    This code is badly broken. In addition to resizing the actual handle to hold the number of string handles you also would need to create the string handles itself before attempting to write into them. NumericArrayResize is the fucntion to use as it will either resize an existing handle (if any) or create a new one if the value is uninitialized (NULL).
    /* resize strarr to hold handles to NUMSTRINGS strings */
    err = SetCINArraySize((UHandle)strarr, 0, NUMSTRINGS);
    if (err)
    goto out;
    /* perform this loop once for each element */
    /* of array of strings being created */
    for (i = 0; i < NUMSTRINGS;) {
    LStrHandle handle = (*strarr)->arg1[i];
    /* determine length of string that will be element of strarr */
    strsize = StrLen(str[i]);
    err = NumericArrayResize(uB, 1, &handle, strsize);
    if (err)
    goto out;
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    /* moves strsize bytes from the address pointed to */
    /* by str[i] to the address pointed to by the data pointer in the handle */
    MoveBlock(str[i], LStrBuf(*handle), strsize);
    /* manually set size of string pointed to by *strarr */
    (*((*strarr)->arg1[i]))->cnt = strsize;
    /* manually set dimSize of strarr */
    (*strarr)->dimSize = ++i;
    return noErr;
    out:
    return err;
    Rolf KalbermatterMessage Edited by rolfk on 06-30-2005 03:15 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I create a custom data type that is a 2D array of string by using TestStand API?

    Hi all,
    I'm new in TestStand:
    I'm able to create a custom data type that is a 1D array of string but I cannot find the way to create a 2D array of string.
    Can anyone help me?
    Thank you in advance.
    Federico

    I made it!!
    Indeed my 2D array is an item of a container:
    /*  Create a new container */
    RunState.Engine.NewPropertyObject(Locals.NewDataType,PropValType_Container,False,"",0)
    /*  Create an array of strings as item of the container */
    Locals.NewDataType.NewSubProperty("Array_2D",PropValType_String,True,"",0)
    /*  Reshape the array as an empty 2D array */
    Locals.NewDataType.GetPropertyObject("Array_2D",0).Type.ArrayDimensions.SetBoundsByStrings("[0][0]","[][]")
    being:
    NewDataType a local property (type Object)
    Attachments:
    AddCustomTypeAndCreateFileGlobals.seq ‏11 KB

  • How do I get ColdFusion to put information in the WSDL to show it returns an array of strings?

    How do I specify that the return value of my web service is an array of strings?
    Saying
       <cffunction name="getInfoSources" access="remote" returntype="string[]">
    produces the error:
    coldfusion.xml.rpc.CFCInvocationException: [coldfusion.xml.rpc.SkeletonClassLoader$UnresolvedCFCDataTypeException : Cannot resolve CFC datatype: string.]
    when I try to create the WSDL
    I know that I can specify "array", which puts into the WSDL:
    <wsdl:part name="getInfoSourcesReturn" type="impl:ArrayOf_xsd_anyType"/>
    I want users of the service to know that the array is specifically made up of _strings_.
    Thanks!
    -- Mabel :-)
    [email protected]

    What if you click Never remember for this site and later change your mind? There should be a way to remember the username and password later if you'd like. I installed the Saved Password Editor 2.6.3 extension and added in the information manually i.e. by choosing New and it still isn't making a difference. What happened to the live chat support Firefox used to have?

  • How can I return Array of String to client

    Hi all,
    I am a new learner about web services, can any one tell me how to return of get a String of array from OMElement ?
    I have two server side method want to create, first method receive an array of string and second method return an an array of String. How should I implement it.
    public org.apache.axiom.om.OMElement OneWayRequest() {
              //How Please help me
    public void LoadDummyNumberForInventory(
         org.apache.axiom.om.OMElement loadDummyNumberForInventory0) {
    //How get the String array ?
    }

    Hi all,
    I am a new learner about web services, can any one tell me how to return of get a String of array from OMElement ?
    I have two server side method want to create, first method receive an array of string and second method return an an array of String. How should I implement it.
    public org.apache.axiom.om.OMElement OneWayRequest() {
              //How Please help me
    public void LoadDummyNumberForInventory(
         org.apache.axiom.om.OMElement loadDummyNumberForInventory0) {
    //How get the String array ?
    }

  • Data Federator - Array as input to web service.

    Hi,
    I have an ASP.NET web service method that takes in an array of string for input. I am adding this web method as a data source in Data Federator. However when I look at the method's parameters in Operations Selection in Data Federator, the array of string becomes a string. It seems that Data Federator only passes one element value as an array to the method. Is there any way for Data Federator to see the array correctly so that I can pass an array of string to the web method via Data Federator?
    Thanks.

    hi,
    Data Federator does not support array types as input parameters. For the moment there is no Data Federator workaround for this limitation (the only possibility is to modify the WebService definition).
    thanks.

  • When you create a link to a web page in numbers and we export the PDF file, the link is offset by 3 rows. Example: if I put a link on the text in cell A1, I found the link A4. In fact, this feature becomes unusable. How can we solve this problem? Thank yo

    When you create a link to a web page in numbers "Mavericks" and we export the PDF file, the link is offset by 3 rows. Example: if I put a link on the text (with Cmd-K) in cell A1, I found the link A4. In fact, this feature becomes unusable. How can we solve this problem?
    Thank you.

    Hi again Raja!
    I did as you recommended and installed HTTPWatch and below is the outcome of that program. It is the exact string with the only exception of obfuscated servernames and portnumbers. The last part that begins with "sap_ep_baseurl=" makes me suspicious, is that part really correct? It looks like it's lacking things.
    Best regards
    Benny
    http://<server:port>/sap/bc/bsp/sap/Z_PURCHASE_REQ/process.htm?
    sap-syscmd=nocookie&sap-client=200&sap-language=sv&style_sheet=
    http%3A%2F%2F<server>%3A<port>%2Firj%2Fportalapps%2F
    com.sap.portal.design.portaldesigndata%2Fthemes%2Fportal%2Fsap_tradeshow%2F
    controls%2Fcontrols_ie6.css%3F7.0.10.0.0&sap-cssversion=7.0.10.0.0&sap-tray-type
    =null&sap-tray-padding=null&sap-accessibility=&sap-ep-version=7.00.200611091758&
    sap_ep_version=7.00.200611091758&sap_ep_baseurl=http%3A%2F%2F
    <server>%3A<port>%2Firj%2Fportal&matnr=9780198603641

  • [CS3][JS] How to turn negative number in array into string

    Hello,
    I have a script that compares the array of the geometric bounds of all text frames to the margins for a document (all pages having the same margins). Any frames that do not match the margins are flagged.
    In order to compare the array of text frame geometric bounds to two arrays of margins (because they are facing pages), I have to convert the numbers to strings.
    My problem is that in the following snippet of code that creates the two margin arrays, the negative of the variables become numbers again. This would not be too difficult to solve except that all the numbers have to be 4 decimal points before converted to strings.
    Thanks,
    Tom
    var myDoc = app.activeDocument;
    var marginY1 = myDoc.pages.item(0).marginPreferences.top.toFixed(4);
    var marginX1 = myDoc.pages.item(0).marginPreferences.left.toFixed(4);
    var marginY2 = (myDoc.documentPreferences.pageHeight - myDoc.pages.item(0).marginPreferences.bottom).toFixed(4);
    var marginX2 = (myDoc.documentPreferences.pageWidth - myDoc.pages.item(0).marginPreferences.right).toFixed(4);
    var marginsRHand = [marginY1, marginX1, marginY2, marginX2];
    var marginsLHand = [marginY1, -marginX2, marginY2, -marginX1];

    Well, I think I have solved it. But I don't know why this solves it.
    I would think that in the above script all the variables would be numbers and not strings. But the data browser says they are strings.
    The solution is:
    var marginsLHand = [marginY1, Number(-marginX2).toFixed(4), marginY2, Number(-marginX1).toFixed(4)]
    If someone can explain why now all variables in the arrays are strings and not numbers, I'll be happy.
    Tom

  • Mapping lookup up failure with input JavaBean with an array of strings

    To receive input data our Web service defines a JavaBean one element of which is
    an array of strings. When a test Java client calls the service method the call
    is completed successfully. When a Perl client calls the service method an exception
    is returned. If I understand BEA's Web service documentation, it isn't necessary
    to do development for the service specifically to enable correct processing of
    an array of strings.
    In our environment we are running WL 8.1 SP 1.
    Please review the problem documentation and explain to me the cause of the exception
    and what I must do to prevent it.
    Thank you.
    The exception:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
    during processing: weblogic.xml.schema.binding.DeserializationException: mapping
    lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
    (see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
    mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
    context=TypedSchemaContext{javaType=java.lang.String}
         at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
         at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
         at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
         at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
         at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
         at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
         at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
         at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
         at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
         at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
         at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
         at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
         [more]
    The XML generated for the Perl client:
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
    xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
    xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
    xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
    xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
    The XML generated for a test Java client:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
    xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
    xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
    xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
    xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
    xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
    xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
    The JavaBean:
    public class GIMServiceRequest implements Serializable {
         private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
         private String nodeId = null;
         private String incidentNbr = null;
         private String CSRCode = null;
         private String[] stopCodes = null;
         public void setStopCodes(String[] aStopCodes) {
              stopCodes = aStopCodes;
         public String[] getStopCodes() {
              return stopCodes;
         [more]
    The service build.xml file:
    <project name="GIMService" default="all" basedir=".">
         <target name="all" depends="ear"/>
    <target name="ear">
    <servicegen
    destEar="GIMService.ear"
    contextURI="GIMContext" >
    <service
         ejbJar="GIMServiceEJB.jar"
         targetNamespace="ncr.com"
                        serviceName="GIMService"
                        serviceURI="/GIM_URI"
                        generateTypes="True"
                        expandMethods="True"
                        style="rpc"
                        protocol="http" >
              <client
                   clientJarName="GIMService_client.jar"
                   packageName="com.ncr.gim.gimservice.client" >
              </client>
    </service>
    </servicegen>
    </target>
    </project>

    Hi Jeff,
    Looks like the Perl client is using an older (deprecated) schema
    namespace "http://www.w3.org/1999/XMLSchema" that is causing this
    failure.
    Hope this helps,
    Bruce
    Jeff Carey wrote:
    >
    To receive input data our Web service defines a JavaBean one element of which is
    an array of strings. When a test Java client calls the service method the call
    is completed successfully. When a Perl client calls the service method an exception
    is returned. If I understand BEA's Web service documentation, it isn't necessary
    to do development for the service specifically to enable correct processing of
    an array of strings.
    In our environment we are running WL 8.1 SP 1.
    Please review the problem documentation and explain to me the cause of the exception
    and what I must do to prevent it.
    Thank you.
    The exception:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
    during processing: weblogic.xml.schema.binding.DeserializationException: mapping
    lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
    (see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
    mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
    context=TypedSchemaContext{javaType=java.lang.String}
    at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
    at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
    at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
    at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
    at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
    at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
    at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
    at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
    at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
    at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
    at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
    at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
    [more]
    The XML generated for the Perl client:
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
    xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
    xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
    xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
    xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
    The XML generated for a test Java client:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
    xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
    xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
    xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
    xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
    xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
    xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
    The JavaBean:
    public class GIMServiceRequest implements Serializable {
    private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
    private String nodeId = null;
    private String incidentNbr = null;
    private String CSRCode = null;
    private String[] stopCodes = null;
    public void setStopCodes(String[] aStopCodes) {
    stopCodes = aStopCodes;
    public String[] getStopCodes() {
    return stopCodes;
    [more]
    The service build.xml file:
    <project name="GIMService" default="all" basedir=".">
    <target name="all" depends="ear"/>
    <target name="ear">
    <servicegen
    destEar="GIMService.ear"
    contextURI="GIMContext" >
    <service
    ejbJar="GIMServiceEJB.jar"
    targetNamespace="ncr.com"
    serviceName="GIMService"
    serviceURI="/GIM_URI"
    generateTypes="True"
    expandMethods="True"
    style="rpc"
    protocol="http" >
    <client
    clientJarName="GIMService_client.jar"
    packageName="com.ncr.gim.gimservice.client" >
    </client>
    </service>
    </servicegen>
    </target>
    </project>

  • Array of strings to vector

    Hi,
    I have an array of strings like:
    private String myStrArr[];
    myStrArr = new String[256];
    I have to get rid of hard coded size.
    Is it ok to use vector instead , or is there another way to get rid of hard coded size.
    If we can use vector instead , is there a solution similar for booleans??
    I also have an array of booleans:
    private boolean myBoolArr[];
    myBoolArr = new boolean[256]

    You can wrap the primitive booleans you have in the Boolean class via
    myList.add(new Boolean(primitiveBooleanValue));Even better, to save space, use the already existing Boolean values instead of creating new ones. If you are using Java 1.4, you can:
    myList.add(Boolean.valueOf(primitiveBooleanValue));Otherwise you can do one of these:
    myList.add( primitiveBooleanValue ? Boolean.TRUE : Boolean.FALSE );

  • Java.lang.ClassCastException while creating array descriptor

    ( This post was moved from SQL / PLSQL forum to here )
    Hi everyone, i used to pass string array from java to plsql. I wrote a java source, then i load db with loadjava. And i wrote java spec. Then i run the function but i am getting this error :
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    My Java Source is :
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    public class SplitterOracle3 {
    public static oracle.sql.ARRAY tokens2(String str,String delim)
    try
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Connection conn = new OracleDriver().defaultConnection( );
    OracleDriver ora = new OracleDriver();
    OracleConnection conn = (OracleConnection) ora.defaultConnection();
    //ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("MY_ARRAY", ((conn).getRealConnection());
    //Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    //Connection conn = ((DelegatingConnection) getDataSource().getConnection()).getInnermostDelegate();
    // get an initial context
    //OracleConnection oracleConnection = (OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection) wsConn);
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);
    String strarr[] = new String[47];
    strarr[0]="ahmet";
    strarr[1]="mehmet";
    int curIndex = 0;
    int nextIndex = 0;
    boolean nextIsLastToken = false;
    int i=0;
    while (true)
    nextIndex = str.indexOf(delim, curIndex);
    if (nextIsLastToken)
    //return false;
    break;
    if (nextIndex == -1)
    nextIsLastToken=true;
    nextIndex = str.length();
    strarr[i] = str.substring(curIndex, nextIndex);
    curIndex = nextIndex + 1;
    i++;
    ARRAY dirArray = new ARRAY(arraydesc, conn, strarr);
    return dirArray;*/
    catch(Exception ex)
    System.err.println(ex.getMessage());
    ex.printStackTrace();
    return null;
    public static void main(String[] args)
    String str="2000,2,123553168,1,10,64895,65535,27662,64860,64895,65535,27662,64860,0,,,,,,0,0,2491039806,,,,,,,,,0,0,1,,2491039106,,,,,,,,,,,,";
    String strarr[] = new String[47];
    long l1,l2;
    int j=0;
    l1 = System.currentTimeMillis();
    for ( int i=0; i<20000000; i++)
    strarr = tokens2(str,",");
    l2 = System.currentTimeMillis();
    System.out.println("Fark :"+ (l2-l1));
    The line has "ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);" causes this error.
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    But i could not find the solution. Can you help me?
    Thanks for responses.

    Hi,
    Did you try my suggestion from Re: java.lang.ClassCastException while create array descriptor
    Try replacing
    oracle.jdbc.driver.OracleConnectionwith
    oracle.jdbc.OracleConnectionRegards
    Peter

  • Prob while creating array in BPEL

    Hi Folks,
    I tried to create a string array in my BPEL to hold the values returned from my DB Adapter.
    I created an element like the following in my "ArraySample.xsd" file.
    <element name="myArr" type="xx"/>
              <complexType name="xx">
                   <sequence>
                        <element name="arr" type="xsd:string" maxOccurs="unbounded"/>
                   </sequence>
              </complexType>
    </element>
    Is there any other place I have to create any supporting stuffs like part name.
    Plss advise me. IF possible could any one give the step details of how to create an array in BPEL process.
    Thanks
    VP

    Hi PS,
    Plss refer only the bold letters of code, I'm able to append values to the array.
    arr[] = {1,2,3}
    While retrieving, for index 1 (arr[1]=123) it returns the entire value (appended value)
    if I go for arr[2], its throwing error expression is empty.
    myprocess.bpel:
    <variables>
    <variable name="inputVariable"
    messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable"
    messageType="client:BPELProcess1ResponseMessage"/>
    <variable name="list"
    messageType="client:BPELProcess1ArrayResponseMessage"/>
    <variable name="iterator" type="xsd:integer"/>
    <variable name="count" type="xsd:integer"/>
    <variable name="xpath" type="xsd:string"/>
    <variable name="Variable_Array" type="xsd:string"/>
    <variable name="temp" type="xsd:string"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="client"
    portType="client:BPELProcess1" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <assign name="Assign_1">
    <copy>
    <from expression="number(bpws:getVariableData('inputVariable','payload','/client:BPELProcess1ProcessRequest/client:input'))"/>
    <to variable="iterator"/>
    </copy>
    <copy>
    <from expression="0"/>
    <to variable="count"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('count') &lt; bpws:getVariableData('iterator')">
    <assign name="Assign_2">
    <copy>
    <from expression="bpws:getVariableData('count') + 1"/>
    <to variable="count"/>
    </copy>
    <copy>
    <from expression="string(bpws:getVariableData('count'))"/>
    <to variable="temp"/>
    </copy>
    <bpelx:append>
    <bpelx:from variable="temp"/>
    <bpelx:to variable="list" part="payload"
    query="/client:BPELProcess1ArrayResponse/client:array"/>
    </bpelx:append>
    </assign> </while>
    <assign name="Assign_4">
    <copy>
    <from expression="0"/>
    <to variable="count"/>
    </copy>
    <copy>
    <from expression="number(bpws:getVariableData('inputVariable','payload','/client:BPELProcess1ProcessRequest/client:input'))"/>
    <to variable="iterator"/>
    </copy>
    </assign>
    <while name="While_2"
    condition="bpws:getVariableData('count') &lt; bpws:getVariableData('iterator')">
    <assign name="Assign_5">
    <copy>
    <from expression="bpws:getVariableData('count') + 1"/>
    <to variable="count"/>
    </copy>
    <copy>
    <from expression="concat('/client:BPELProcess1ArrayResponse/client:array[',bpws:getVariableData('count'),']')"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('list','payload',bpws:getVariableData('xpath'))"/>
    <to variable="outputVariable" part="payload"
    query="/client:BPELProcess1ProcessResponse/client:result"/>
    </copy> </assign>
    </while>
    <reply name="replyOutput" partnerLink="client"
    portType="client:BPELProcess1" operation="process"
    variable="outputVariable"/>
    </sequence>
    </process>
    myprocess.xsd:
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/BPELProcess1"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="BPELProcess1ProcessRequest">
              <complexType>
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="BPELProcess1ProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    <element name="BPELProcess1ArrayResponse">
              <complexType>
                   <sequence>
                        <element name="array" type="string" maxOccurs="unbounded"/>
                   </sequence>
              </complexType>
         </element></schema>
    myprocess.wsdl:
    <definitions name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/BPELProcess1"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
         <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://xmlns.oracle.com/BPELProcess1" schemaLocation="BPELProcess1.xsd" />
              </schema>
         </types>
         <message name="BPELProcess1RequestMessage">
              <part name="payload" element="client:BPELProcess1ProcessRequest"/>
         </message>
         <message name="BPELProcess1ResponseMessage">
              <part name="payload" element="client:BPELProcess1ProcessResponse"/>
         </message>
    <message name="BPELProcess1ArrayResponseMessage">
              <part name="payload" element="client:BPELProcess1ArrayResponse"/>
         </message>
         <!-- portType implemented by the BPELProcess1 BPEL process -->
         <portType name="BPELProcess1">
              <operation name="process">
                   <input message="client:BPELProcess1RequestMessage" />
                   <output message="client:BPELProcess1ResponseMessage"/>
              </operation>
         </portType>
              <plnk:partnerLinkType name="BPELProcess1">
              <plnk:role name="BPELProcess1Provider">
                   <plnk:portType name="client:BPELProcess1"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    Edited by: user555738 on Oct 23, 2008 2:29 PM
    Edited by: user555738 on Oct 23, 2008 2:31 PM

  • How to store Array of Strings in MS-Access

    Dear all,
    i am facing a problame from the couple of days can any one plzzzzzzz guide what should i do to over come my problame....>
    I want to store a String array in Microsoft Access database but i couldn't find the way how can i do so
    public class ArrayJDBC {
    /** Creates a new instance of ArrayJDBC */
    public ArrayJDBC() {
    public static void main(String[] args){
    System.out.println("main started");
    new ArrayJDBC().enterArray();
    System.out.println("main after data entry");
    public void enterArray(){
    Connection con = null;
    PreparedStatement pstm = null;
    String dataSource = "checkArray";
    String query = "INSERT INTO array(Object) VALUES(?)";
    String[] strArray = {"one","two","three"};
    con = new JDBCConnection().makeConnection(dataSource);
    try{
    pstm = con.prepareStatement(query);
    System.out.println("pstmt created");
    pstm.setObject(1,strArray);
    System.out.println("array seted as object");
    int r = pstm.executeUpdate();
    System.out.println("data updated "+r);
    pstm.close();
    con.close();
    }catch(SQLException se){
    System.out.println("Data could not be update "+se);
    this is my class the conncection is already established.
    i use updateObject() method but it doesnt work..
    plz guide me that how can i store
    strArray in Microsoft Access and also tell me that what should be the data type in my database i.e ms-access

    Well easiest way to do that is to create a single String where the values from array will be separated by some separator for example semicolon so you will get "one;two;three" this string you will store in database as a text, then when you read it back you need to parse it again to get an array of Strings. I am originally C# programmer there i would do serialization to XML and store it into database try looking here http://iharder.sourceforge.net/current/java/xmlizable/ they are creating XML Serializer.
    Peter.

  • Replacing words in an array of strings

    hi
    im trying to create a method that takes three arrays of strings as parameters and replaces some words in one of them
    heres my code
    class A0
    public static void main (String[] args)
    int index;
    String[] in = {"life","is","a","bowl","of","pits"};
    String[] what={"pits", "bowl"};
    String[] with={"chocolates", "box"};
    String[] result=new String [in.length];
    result=findAndReplace(in, what, with);
    for (index=0;index<in.length;index++)
    System.out.print(result[index]+" ");
    static String[] findAndReplace (String[] in, String[] what, String[] with)
    int index1;
    int index2;
    String[] newString= new String [in.length];
    for (index1=0;index1<in.length;index1++)
    for (index2=0;index2<what.length;index2++)
    if (in[index1]==what[index2])
    newString[index1]=with[index2];
    else
    newString[index1]=in[index1];
    return newString;
    ok so it's supposed to print life is a box of chocolates, only it prints life is a box of pits???pls help

    i figured it out

Maybe you are looking for

  • Digital Output With Timer (Simulation)

    Hello everyone, I just learned how to make LabVIEW program a week ago. I try to make a simulation of Digital Output by LabVIEW (my attachment). In this simulation I have a slider as an input (0-10 V), two numeric control (upper limit and bottom limit

  • Integration directory - Editing Objects

    Hi all, I want to change the naming convention of some objects like configuration scenario name,party name,business service name etc in the Integration directory. For Eg:- If I try to change the configuration scenario name. DblClick the "Configuratio

  • OS X Leopard 10.5: MB021Z/A vs. MB427Z/A

    Hello. I am running OS 10.3.9 and I am soon to be moving up to 10.5 sometime next week. I have been looking at purchasing a full retail version on eBay and I have seen two different versions: MB021Z/A and MB427Z/A. Can anyone tell me the difference b

  • Taxonomy - how many training documents needed for automatic classification?

    Greetings, I have an example based taxonomy. I have trained the taxonomy manually with about two documents and expected it to classify automatically after that which it has not done. According to the URL below http://www.scribd.com/doc/7234683/Retrie

  • Visaconf.ini and Windows Vista

    When I click on a VISA Resource Name control under WinXP, the visaconf.ini is automatically created if not existent, with the aliases Alias1 = "'COM1','ASRL1::INSTR'" Alias2 = "'COM2','ASRL2::INSTR'" and so on.. In this way, I can see the COMx aliase