Array types

I came to know that PostgreSQL supports array types. i. e., an attribute can be decomposed further.
see this example:
CREATE TABLE XYZ ( ID SERIAL, MONTH_WISE_SAL INTEGER[ ][ ]);
Why does'nt Oracle implement this?
Is it because it violates the First Normal form ???

Who told you Oracle hasn't implemented it?
Look up varrays, nested tables, and nested table types containing varrays, and any combination thereof, depending on what you want to do.

Similar Messages

  • Assigning value to array type variable in a loop

    Hi
    I have a scenario in which i am assigning value from a array type variable(x) to the invoke variable of a database adapter. The variable x is exact replica of the invoke variable.
    My copy operation in assign activity looks like this-
    <copy>
    <from variable="Var" part="InputParameters"
    query="/ns7:InputParameters"/>
    <to variable="Invoke_call_XXDPI_EDI_852_PKG_InputVariable"
    part="InputParameters"
    query="/ns7:InputParameters *(* bpws:getVariableData('iterator') *)* "/>
    </copy>
    It is inside a while loop activity.
    PS *()* are square brackets
    But it is erroring out at run time.
    Does anybody has an alternate idea to assign value to an array type?.
    i have seen that while extracting value from an array type variable it works fine
    A similar kind of operation is shown below.
    <copy>
    <from variable="Var" part="InputParameters"
    query="/ns7:InputParameters *(* bpws:getVariableData('iterator') *)* "/>
    <to variable="Invoke_call_XXDPI_EDI_852_PKG_InputVariable"
    part="InputParameters"
    query="/ns7:InputParameters"/>
    </copy>
    Thanks
    Ayush
    Edited by: Ayush fujitsu on Aug 14, 2009 4:36 AM

    Hi Ayush
    I suppose you are getting some error like "source node returns multiple elements".
    In second case there is no problem because you are assigning *InputParameters[bpws:getVariableData('iterator')]* (+suppose InputParameters[1]+) to target. Here it works fine because you are fetching oonly 1 value from source and assigning it to the target.
    Now in first case you are saying copy InputParameters to target[1] suppose. You know that source is an array which contains multiple index so which index field from the source will be assigned to the target.
    Try your process with only 1 source value it will work but when multiple values will be there it will fail. You have to merge both the cases and it will look like
    *<copy>*
    *<from variable="Var" part="InputParameters"*
    query="/ns7:InputParameters ( bpws:getVariableData('iterator') ) "/>
    *<to variable="Invoke_call_XXDPI_EDI_852_PKG_InputVariable"*
    part="InputParameters"
    query="/ns7:InputParameters ( bpws:getVariableData('iterator') ) "/>
    *</copy>*
    And the easiest way to do this is by the transform activity as said above.
    Regards
    Suryaveer
    Edited by: Suryaveer on Aug 15, 2009 11:19 PM

  • Associative array type for each blob column in the table

    i am using the code in given link
    http://www.oracle.com/technology/oramag/oracle/07-jan/o17odp.html
    i chnages that code like this
    CREATE TABLE JOBS
    JOB_ID VARCHAR2(10 BYTE),
    JOB_TITLE VARCHAR2(35 BYTE),
    MIN_SALARY NUMBER(6),
    MAX_SALARY NUMBER(6),
    JOBPIC BLOB
    CREATE OR REPLACE PACKAGE associative_array
    AS
    -- define an associative array type for each column in the jobs table
    TYPE t_job_id IS TABLE OF jobs.job_id%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_job_title IS TABLE OF jobs.job_title%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_min_salary IS TABLE OF jobs.min_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_max_salary IS TABLE OF jobs.max_salary%TYPE
    INDEX BY PLS_INTEGER;
    TYPE t_jobpic IS TABLE OF jobs.jobpic%TYPE
    INDEX BY PLS_INTEGER;
    -- define the procedure that will perform the array insert
    PROCEDURE array_insert (
    p_job_id IN t_job_id,
    p_job_title IN t_job_title,
    p_min_salary IN t_min_salary,
    p_max_salary IN t_max_salary,
    p_jobpic IN t_jobpic
    END associative_array;
    CREATE OR REPLACE package body SHC_OLD.associative_array as
    -- implement the procedure that will perform the array insert
    procedure array_insert (p_job_id in t_job_id,
    p_job_title in t_job_title,
    p_min_salary in t_min_salary,
    p_max_salary in t_max_salary,
    P_JOBPIC IN T_JOBPIC
    ) is
    begin
    forall i in p_job_id.first..p_job_id.last
    insert into jobs (job_id,
    job_title,
    min_salary,
    max_salary,
    JOBPIC
    values (p_job_id(i),
    p_job_title(i),
    p_min_salary(i),
    p_max_salary(i),
    P_JOBPIC(i)
    end array_insert;
    end associative_array;
    this procedure is called from .net. from .net sending blob is posiible or not.if yes how

    Ok, that won't work...you need to generate an image tag and provide the contents of the blob column as the src for the image tag.
    If you look at my blog entry -
    http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/
    and download that Whitepaper that I talk about you will find an example of how to do what you want to do. Note the majority of that whitepaper is discussing other (quite advanced) topics, but there is a small part of it that shows how to display an image stored as a blob in a table.

  • Returning an array type from a local method in Web Dynpro Java application

    Hi,
    In my project, we have a requirement to display 18 rolling months along with the year, starting from current month.
    How I am going to approach is that I will get the system date and get the current month and send the month and year value to a local method which will return 18 rolling months along with the year.
    But, when I tried to create a new method there is no option to return an array type. It was greyed out.
    So, we can not return an array type from a method from Web Dynpro for Java application?
    If so, what is the alternative and how am I going to achieve it?
    I will appreciate your help!
    Regards
    Ram

    HI
    You can create new methods in
      //@@begin others
      private ArrayList MyMethod(){
           // ** Put your code here
           return new ArrayList();
      //@@end
    Other option are create a context node with cardinality 0...n with one or more attributes, and in your method create the needed registers into this node. To read this values, you only need to read your context node.
    Best regards
    Edited by: Xavier Aranda on Dec 2, 2010 9:41 AM

  • Using XSLT "adapter" for invoking a WS with SOAP-ENC array type param.

    Hello,
    I had to write a BPEL process that calls inside it a web service which has as an input an array parameter and as an output, also an array. I already know that BPEL has limitations regarding using the SOAP-ENC Array type. I tried to rewrite the web service in order to use a literal encoding of the array parameters (using "maxOccurs" attribute), but unfortunately, the OC4J container 9.0.4 that I have to use doesn't allow this. It only allows the SOAP-ENC types for array types.
    I started to write, inside the BPEL process, some "adapters" XSLT transformations before and after the invoking of the web service that uses SOAP-ENC array. The XSLT transformation before the web service invoking will translate the input array parameter defined with no SOAP encoding types (based on "maxOccurs" attribute) into a SOAP-ENC type, as it is expected by the web service. The XSLT transformation after the web service invoking will translate the returned array SOAP-ENC type into a data type defined with no SOAP encoding types (based on "maxOccurs" attribute).
    The approach is pretty hairy, from the XSLT point of view and it introduces a supplementary delay due to the XSLT processing needed, but it works. The only think is that when I build the service, I obtain the following error message:
    [bpelc] [Error] GCDBWebservice?WSDL:30:42: src-resolve.4.2: Error resolving component 'SOAP-ENC:Array'. It was detected that 'SOAP-ENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema ...
    But in spite of this, the process is built and deployed successfully and I was able to run it from the BPEL console.
    Do you think that this approach could hide some other future problems that I can't see in this moment?
    Thanks,
    Marinel

    Please help me for this.
    I am new to Webservices and SOAP.
    I am facing problem when i am calling a "add" method in the .net webservices with the following code but it gives correct result when i'm calling the "HelloWorld" method present in the webservice.
    I think it will happening because, when i'm going to pass any parameter to the "add method , it does not process it.It will return me 0.
    Please help me in this.
    The code is:
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import org.w3c.dom.*;
    import org.apache.soap.util.xml.*;
    import org.apache.soap.*;
    import org.apache.soap.encoding.*;
    import org.apache.soap.encoding.soapenc.*;
    import org.apache.soap.encoding.literalxml.*;
    import org.apache.soap.rpc.*;
    import org.apache.soap.transport.http.SOAPHTTPConnection;
    import org.apache.soap.transport.*;
    import org.apache.soap.messaging.*;
    import org.apache.xerces.parsers.*;
    import org.apache.xerces.dom.DocumentImpl;
    public class testClient {
    public static void main(String[] args) throws Exception {
    URL url = new URL ("http://Eurotele-it3/webService1/Service1.asmx");
    //Map the Types.
    SOAPMappingRegistry smr = new SOAPMappingRegistry ();
    StringDeserializer sd = new StringDeserializer ();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("http://Eurotele-it3/WebService1/Service1","addResult"),Integer.class,null,sd);
    // create the transport and set parameters
    SOAPHTTPConnection st = new SOAPHTTPConnection();
    // build the call.
    Call call = new Call();
    call.setSOAPTransport(st);
    call.setSOAPMappingRegistry(smr);
    call.setTargetObjectURI ("http://Eurotele-it3/WebService1/Service1/add");
    call.setMethodName("add");
    //call.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    params.addElement(new Parameter("x",Integer.class,"10",null));
    params.addElement(new Parameter("y",Integer.class,"20",null));
    call.setParams(params);
    Response resp = null;
    try {
    resp = call.invoke (url,"http://Eurotele-it3/WebService1/Service1/add");
    catch (SOAPException e) {
    System.err.println("Caught SOAPException (" + e.getFaultCode () + "): " +e.getMessage ());
    return;
    // check response
    if (resp != null && !resp.generatedFault()) {
    Parameter ret =resp.getReturnValue();
    Object value =ret.getValue();
    System.out.println ("Answer--> " +value );
    else {
    Fault fault = resp.getFault ();
    System.err.println ("Generated fault: ");
    System.out.println (" Fault Code = " + fault.getFaultCode());
    System.out.println (" Fault String = " + fault.getFaultString());
    This is the complete WSDL format:
    <?xml version="1.0" encoding="utf-8" ?>
    - <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://Eurotele-it3/WebService1/Service1" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://Eurotele-it3/WebService1/Service1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    - <wsdl:types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://Eurotele-it3/WebService1/Service1">
    - <s:element name="HelloWorld">
    <s:complexType />
    </s:element>
    - <s:element name="HelloWorldResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="HelloWorldResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="add">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="x" type="s:int" />
    <s:element minOccurs="1" maxOccurs="1" name="y" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="addResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="addResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    - <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
    </wsdl:message>
    - <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
    </wsdl:message>
    - <wsdl:message name="addSoapIn">
    <wsdl:part name="parameters" element="tns:add" />
    </wsdl:message>
    - <wsdl:message name="addSoapOut">
    <wsdl:part name="parameters" element="tns:addResponse" />
    </wsdl:message>
    - <wsdl:portType name="Service1Soap">
    - <wsdl:operation name="HelloWorld">
    <wsdl:input message="tns:HelloWorldSoapIn" />
    <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
    - <wsdl:operation name="add">
    <wsdl:input message="tns:addSoapIn" />
    <wsdl:output message="tns:addSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    - <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="HelloWorld">
    <soap:operation soapAction="http://Eurotele-it3/WebService1/Service1/HelloWorld" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    - <wsdl:operation name="add">
    <soap:operation soapAction="http://Eurotele-it3/WebService1/Service1/add" style="document" />
    - <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    - <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    - <wsdl:service name="Service1">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
    - <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
    <soap:address location="http://eurotele-it3/webService1/Service1.asmx" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

  • Problem with array type in SOAP response for sync interface

    Hi,
    We have a Synchronous Interface from SAP -->PI-->Unifier .The WSDL response has array type and when WSDL is imported it is showing red (I was able to activate  and use it in mapping) .We are able to send the request successfully and when retrieving the response we are getting mapping error .Please find the attachment for reference and response message from unifier .I feel that the error is because of array type .Could someone throw some light how we can solve this soon as it was a bit urgent .
    http://scn.sap.com/thread/326591
    I tried to create the Data Type and use the same instead of using the WSDL from External Definition but did not helped.Request your help in this.I have attached the WSDL for reference .
    The response is received as shown below which is giving mapping error :
    <ns1:getUDRDataResponse xmlns:ns1='http://diran:12020/ws/services/mainservice' soapenv:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><getUDRDataReturn href='#id0'/></ns1:getUDRDataResponse>
    The complete response looks like below where PI is not able to receive (this is retrieved from SOAP UI)
    <?xml version="1.0" encoding="utf-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    - <soapenv:Body> 
    - <ns1:getUDRDataResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://general.service.webservices.skire.com"> 
    <getUDRDataReturn href="#id0" /> 
    </ns1:getUDRDataResponse>
    - <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:XMLObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="mainservice"> 
    <errorStatus soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array" /> 
    <statusCode xsi:type="xsd:int">200</statusCode> 
    <xmlcontents xsi:type="xsd:string"><?xml version="1.0" encoding="UTF-8"?> <report> <report_header> <c1>Name</c1> <c2>Number</c2> <c3>Status</c3> <c4>Location</c4> <c5>Phase</c5> </report_header> <report_row> <c1>Test - Sprint 1 - v10</c1> <c2>GB424</c2> <c3>Active</c3> <c4>/North Sea</c4> <c5></c5> </report_row> <report_row> <c1>Test Training 3</c1> <c2>GB424-TRN3</c2> <c3>Active</c3> <c4>/North Sea</c4> <c5></c5> </report_row> </report></xmlcontents> 
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>

    Hi Praveen and Mark,
    Thanks for the help.I tried to use XSLT mapping for request and try to read Response as a single string but i was getting an error in SXMB_MONI with Cannot display document format,Do you want too save it to harddisk and i could not get rid of this even after pressing Yes in popup .
    Can some one help to extract only the xmlcontents  from the above response and map it to target where the target structure looks like
    <report>
    <report_header>
    <report_row>
    Please help .

  • Deserializer not found for array Type...

    I hava a web-Servicd deployed in AXIS - is Takes an array of a complex type and returns one.
    Everytime i run the service the service properly does the processing and returns the correct Object.
    When the client receives the REsponse i get the following exception
    - Exception:
    org.xml.sax.SAXException: No deserializer defined for array type {urn:SchufaService}Response
         at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeserializer.java:304)
         at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:428)
         at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
         at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
         at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
         at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
         at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
         at org.apache.axis.client.Call.invoke(Call.java:2272)
         at org.apache.axis.client.Call.invoke(Call.java:2171)
         at org.apache.axis.client.Call.invoke(Call.java:1691)
         at de.awe.client.SchufaServiceSoapBindingStub.getInformation(SchufaServiceSoapBindingStub.java:329)
         at de.awe.client.SessionClient.main(SessionClient.java:45)here is my .wsdd file - i think i did the correct bean and type mappings:
    <deployment xmlns="http://xml.apache.org/axis/wsdd/"
                xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <handler name="session" type="java:org.apache.axis.handlers.SimpleSessionHandler">
    </handler>
    <service name="SchufaService" provider="java:RPC">
      <requestFlow>
           <handler type="soapmonitor"/>
        <handler type="session"/>
      </requestFlow>
      <responseFlow>
           <handler type="session"/>
        <handler type="soapmonitor"/>
      </responseFlow>
      <parameter name="scope" value="session"/>
      <parameter name="className" value="de.awe.webservice.SchufaService"/>
      <parameter name="allowedMethods" value="*"/>
      <beanMapping qname="SchufaService:Person" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.model.Person"/>
      <beanMapping qname="SchufaService:Address" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.model.Address"/>
      <beanMapping qname="SchufaService:Request" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.model.Request"/>
      <beanMapping qname="SchufaService:Response" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.xml.Response"/>
      <beanMapping qname="SchufaService:ResponseAuskunft" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.xml.ResponseAuskunft"/>
      <beanMapping qname="SchufaService:ResponseFehlerbehandlung" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.xml.ResponseFehlerbehandlung"/>
      <beanMapping qname="SchufaService:ResponseNachbehandlung" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.xml.ResponseNachbehandlung"/>
      <beanMapping qname="SchufaService:Textdaten" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.model.Textdaten"/>
      <beanMapping qname="SchufaService:Merkmal" xmlns:SchufaService="urn:SchufaService" languageSpecificType="java:de.awe.model.Merkmal"/>
      <typeMapping
            xmlns:ns="http://localhost:8080/axis/services/SchufaService"
            qname="ns:ArrayOf_tns1_Request"
            type="java:de.awe.client.Request[]"
            serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
            deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          />
      <typeMapping
            xmlns:ns="http://localhost:8080/axis/services/SchufaService"
            qname="ns:ArrayOf_tns1_Response"
            type="java:de.awe.client.Response[]"
            serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
            deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          />
    </service>
    </deployment>Please tell me where to find the error...
    Thanks a lot

    Hi,
    Can you paste the client's code in here? this error is usually on the client side where in the array type was not mapped properly.
    thanks,
    leighsy
    I hava a web-Servicd deployed in AXIS - is Takes an
    array of a complex type and returns one.
    Everytime i run the service the service properly does
    the processing and returns the correct Object.
    When the client receives the REsponse i get the
    following exception

  • Character array type conversion problem

    Hi, I'm using BlazeDS (v3.0.0.544) to remotely call Java code on the server from my Flex client. I'm having trouble when converting a character array type from Java to ActionScript and vice-versa. In my Flex code, if the ActionScript class uses a String type to map to the char[] then the char[] is successfully converted from Java to ActionScript, but not from ActionScript to Java.
    // Extract from ActionScript code
    private var m_charArray:String;
    public function get charArray():String
    return m_charArray;
    public function set charArray(value1:String):void
    m_charArray = value1;
    Alternatively, if my ActionScript class uses an Array type then I can successfully send data from the client and populate a char[] field on the server, but can't send an updated char[] back to my ActionScript class.
    In fact the Flex console reports:
    TypeError: Error #1034: Type Coercion failed: cannot convert "myString" to Array.
    The code this time:
    // Extract from ActionScript code
    private var m_charArray:Array;
    public function get charArray():Array
    return m_charArray;
    public function set charArray(value1:Array):void
    m_charArray = value1;
    All the other types I have tried work successfully, it's only with char arrays that I've hit a problem.
    Any help would be appreciated, thanks.

    Hi Graeme,
    It is how it works. I can see the inconsistency. You can find an example how of echo char[] in blazeds\trunk\qa\apps\qa-regress\testsuites\mxunit\tests\remotingService\dataTypes\CharTy pesTest.mxml. It echos a char[] in return of a string. You can get the char in a string easily string.charAt() and get its length using length(). I think it may be the reason remoting decided to use a string to represent a char[] instead of a generic objects array. It should be more memory efficient. However, I can see that it can turn into problem as what you descibed. When the data has to send back to server, it has to convert back to array. If the char[] type is used inside an object, it is impossible to do the conversion unless the getter and setter are generic
    public function get charArray():Object
    return m_charArray;
    public function set charArray(value1:Object):void
    if (value1 is String)
    m_charArray = new Array();
    //copy the string elements to it
    else
    m_charArray = value1;
    I know it is ugly, but it the only work around I can think of. I think it needs to log a bug to correct this conversion behavior
    William

  • Calling a stored proc that has a parameter of a user-defined (array) type

    Hi,
    Hope someone can help me on this, because I am really struggling...
    From a c-program, I am calling stored procedures using the OCI Interface. Everything is OK, when using the standard types (integer, string, date), but I am encountering problems when one of the parameters is of a type that is defined in the database as an array. My application calls multiple array-type parameters in one call, but for the sake of simplicity, I created a test application to only use one.
    The following call is working (but it needs to be called using the OCI functions):
    BEGIN
    p_test_table_num (pin_num1 => T_ARRAY_EH_DEP(1,2,3));
    END;
    My first step was to have the following combination:
    statement: begin p_test_table_num(:pin_num1);end;
    parameter: pin_num1
    value: t_array_eh_dep(1,2,3)
    That lead to the error (when executing the statement): wrong number or types of arguments
    Second idea (after a lot of browsing):
    statement: begin p_test_table_num(t_array_eh_dep(:pin_num1));end;
    parameter: pin_num1
    value: 1,2,3
    This leads to the error: numeric or value error: number precision too large.
    My bind function call looks like:
    if (res = OCIBindByName(stmthp, &bndArray[parCount], errhp, (text *) curPar,
    -1, (dvoid *) curVal, (sb4) sizeof(curVal), SQLT_NUM, (dvoid *) 0,
    (ub2 *) 0, (ub2) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    (in this function curPar is the name of the parameter and curVal contains the value)
    I also investigated the BindArrayOfStruct, but I concluded that this is to execute a stored procedure multiple times using different values for the parameters, and that is not what I want.
    I really hope someone can give me a direction to look in. I also need to call string and date arrays in the same way...
    Thanks
    Margit

    For those who are interested, I found the solution myself...
    To use any user-defined type, you need to perform the following steps:
    1. OCIBindByPos or OCIBindByName as you would bind a normal parameter
    2. OCITypeByName to get a reference to the type definition in Oracle
    3. OCIObjectNew to create a reference to the array (OCI_TYPECODE_VARRAY)
    4. Assign a value to the column, for instance use OCIStringAssignText, OCINumberFromInt, OCIDateFromText
    5. OCICollAppend ( to add the value from step 4 to collection)
    6. OCIBindObject
    7. OCIStmtExecute
    8. OCITransCommit
    Example:
    if (res = OCIBindByName(stmthp, &bndArray[parCount], errhp, (text *) curPar,
    -1, (dvoid *) curVal, (sb4) sizeof(curVal), SQLT_NTY, (dvoid *) 0,
    (ub2 *) 0, (ub2) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    if (res = OCITypeByName(envhp, errhp, svchp,
    (CONST text *) currentUserName, (ub4) strlen((CONST char *) currentUserName), /*schema*/
    (CONST text *) "T_ARRAY_EH_DEP", (ub4) strlen((CONST char *) "T_ARRAY_EH_DEP"), /* type */
    (CONST text *) 0, (ub4) 0, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER,
    &type_array_eh_dep) != OCI_SUCCESS){
    checkerr(errhp, "OCITypeByName", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    OCIArray* eh_dep_array = (OCIArray*)0;
    OCINumber eh_dep_num;
    OCIObjectNew(envhp, errhp, svchp, OCI_TYPECODE_VARRAY, type_array_eh_dep,
    (dvoid*) 0, OCI_DURATION_DEFAULT, TRUE, (dvoid**)&eh_dep_array);
    /* get the values from the incoming array */
    curArrayItem = SOM_AtrValGetStrList(arrayValuesListMem,
    arrayValuesListAtr, arrayValueCount);
    do {
    if (STR_Eq(curArrayItem, "NULL")){
    OCICollAppend(envhp, errhp, (CONST dvoid *)0, &null_ind,
    (OCIArray*) eh_dep_array);
    else{
    tmpInt = atoi(curArrayItem);
    OCINumberFromInt(errhp, &tmpInt, sizeof(int), OCI_NUMBER_SIGNED,
    &eh_dep_num);
    OCICollAppend(envhp, errhp, (CONST dvoid *)&eh_dep_num, (CONST dvoid *) 0,
    (OCIArray*) eh_dep_array);
    arrayValueCount = arrayValueCount + 1;
    curArrayItem = SOM_AtrValGetStrList(arrayValuesListMem,
    arrayValuesListAtr, arrayValueCount);
    printf( "curArrayItem = %s\n", curArrayItem );
    } while (STR_Eq(curArrayItem, "%%%") == falseCN);
    arrayValueCount = arrayValueCount + 1; /* skip the %%% */
    if (res = OCIBindObject(bndArray[parCount], errhp,
    (OCIType *)type_array_eh_dep, (dvoid **) &eh_dep_array,
    (ub4 *) 0, (dvoid **) 0, (ub4 *) 0) != OCI_SUCCESS){
    checkerr(errhp, "OCIBindObject", res);
    OCIHandleFree(stmthp, OCI_HTYPE_STMT);
    return -1;
    }

  • Problem in adding "TableLayoutPanel" control array type functionality on windows form dynamically using drag and drop

    Environment: -
     (Application Machine)
    OS Name             : -
    Microsoft Windows 7 Professional/XP SP2/SP3            
    OS Bit Version      : -
    32 Bit                     
    Application Name: - Designer.exe                                  
    IDE                  
        : - Visual Studio 2008                        
    EXE Application development: -
    VB. Net
    Application Type: -
    Application “Designer.exe” was designed in vb6.0 and now, it has been upgraded to Visual Studio 2008 and it works properly.
    Product Description: -
                 We have an application Designer.exe, which is used for designing “Forms”.
    It has menu option with following option like Panel, Text Box, Combo Box, Button etc. We drag any of this menu items and place it to form.
    Requirement: -
    We have
    critical requirement in product. In Designer.exe, we need to align form margin, while we increase or decrease window. And for that we have searched that 
     “TableLayoutPanel” components can be helpful.
    Problem description: -
    Earlier code was in vb6.0, now it has upgraded to Visual Studio 2008. In vb6.0, we have used control array for memory utilization with Combo Box, Group Box, and Text
    Box etc.
    But, for alignment we have to use “TableLayoutPanel”
    control array type functionality on form.
    Code Snippet: - For earlier designing component e.g. Frame
    'Required by the Windows Form Designer
    Public WithEvents Frame1 As Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.components = New System.ComponentModel.Container
    Me.Frame1 = New Microsoft.VisualBasic.Compatibility.VB6.GroupBoxArray(Me.components)
    CType(Me.Frame1, System.ComponentModel.ISupportInitialize).BeginInit()
    . Kindly suggest approach for implementing requirement.
    Kindly help us to complete the requirement. I will be really
    thankful for any assistance.

    Hi S.P Singh,
    Welcome to MSDN.
    I am afraid that as Renee Culver said, these forums donot support VB6, you could refer to this thread:
    Where to post your VB 6 questions
    You could consider posting this issue in these forums below:
    These forums do not support Visual Basic 6, however there are many third-party support sites that do. If you have a VB6-related question please visit these popular forums:
    VB Forums
    VB City
    Thanks for your understanding.
    Best Regards,
    Youjun Tang
    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.
    Click
    HERE to participate the survey.

  • Complex types with single array type element, marshaling exception

    For our JAXRPC web service, we have a complex type, as follows:
    <xs:complexType name = "SomeFault">
    <xs:sequence>
    <xs:element name = "errorMessages" type="some:ErrorMessageWSType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    </xs:complexType>
    <xs:simpleType name = "ErrorMessageWSType">
    <xs:restriction base = "xs:NMTOKEN">
    <xs:enumeration value = "INVALID_1"/>
    <xs:enumeration value = "INVALID_2"/>
    <xs:enumeration value = "INVALID_3"/>
    </xs:restriction>
    </xs:simpleType>
    We are running into Marshaling exceptions on the server side when the response/fault complex type has a single array type field.
    weblogic.wsee.codec.CodecException: Failed to encode
    com.bea.xml.XmlException: failed to find a suitable binding type for use in marshalling object "[Lnamespace.type.ErrorMessageWSType;@693767e9".  using schema type: t=SomeFault@http://namespace/SOME/v1 java type:namespace.type.ErrorMessageWSType[]
    If I change SomeFault, by adding another element, the error goes away.
    <xs:complexType name = "SomeFault">
    <xs:sequence>
    <xs:element name = "errorMessages" type="some:ErrorMessageWSType" maxOccurs="unbounded" />
    <xs:element name = "dummyString" type="xsd:string" minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    Am I doing something wrong during the wsdlc code generation or is this a known issue?
    <wsdlc srcWsdl="${wsdl.dir}/${wsdl.file.name}"
    destJwsDir="${gen.src.dir}/gen-src-jar"
    destImplDir="${main.src.dir}"
    packageName="${package.prefix}" type="JAXRPC">

    Any luck with this? I am running into the same error. Apparently, this is not an issue with Java binding, but when invoking remote EJBs, we run into this. I am running 10.1.3.1 and the error is:
    <fault>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>
    com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@e26dbf : Could not invoke 'getIdentityInfo'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </summary>
    </part>
    <part name="detail">
    <detail>
    org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </detail>
    </part>
    </bindingFault>
    </fault

  • WriteUnshared and class fields of an array type

    Greetings.
    I am trying to serialize an object multiple times (in the same file) as its state changes. In order to avoid back-references to the first serialization of the object I use ObjectOutputStream,writeUnshared(..) method. This method serializes all the primitive fields correctly. However, this method does not serialize the content of array-type fields as unshared. This is the expected behavior according to the specs http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf (Page 28, end of 3rd paragraph)
    My question is if there is a way to propagate unshared serialization to the elements of an array-type field of the object being serialized?
    Thanks.

    No - the semantics would be difficult to define.
    Using wriiteUnshared for this seems precarious anyway. Look at ObjectOutputStreamt.reset() as an alternative.
    Sylvia.

  • Oracle defined array type

    Hi,
    I am trying to pass an input parameter to a stored procedure as oracle defined array type. The input parameter will be stored as an array_varchar type which is defined by our own in our oracle 9i. Can anyone tell me how ? I've been looking for solution for 2 days and still dont know how.
    Thanks.
    yves

    The solution described in Passing Array of UDT or Collection as IN OUT using OracleDbType.InputOutput
    is working for me.
    Edited by: stzueger on Jan 2, 2012 10:32 AM

  • Object array type casting?

    Hi. I still can't get the hang of array type casting. Is it possible to type caste an array of objects? I tried the following
    LabelledPanel[] comp = (LabelledPanel[])(content.getComponents());
    in my program and I got the ClassCastException.
    Exception occurred during event dispatching:
    java.lang.ClassCastException: [Ljava.awt.Component;
    LabelledPanel is a descendent of JPanel and getComponents() supposed to return Component[]

    java does support casting with arrays. The following code will work:
    String [] strings = new String[] { "1", "2" };
    Comparable [] comps = (Comparable[])strings;
    Object [] objects = (Object [])strings;That is, you can cast following the normal rules of assignment. You are having problems because your casting violates the normal rules of assignment- you're trying to cast a type into a differnt type that it does not extend or implement.
    the toArray() in the Collections API really has nothing to do with casting. That method converts the current Collection into an array of the same type. Since all arrays extend java.lang.Object, it returns the new array as an Object, which you then cast into the specific type.
    You may want to read the language guidlines on casting if you are having problems with it:
    http://java.sun.com/docs/books/jls/second_edition/html/jIX.fm.html
    you can also look at the documenation for Class.isAssignableFrom , which explains casting more briefly.

  • How could I retrieve metadata about Array Type and Table Type?

    I use DatabaseMetaData.getUDTs() method for obtain metadata about Object Types, but this method doesn't work with Array Type and Table Type.

    JJ,
    Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
    Crystal

  • [svn:fx-trunk] 12788: By popular demand, we now allow for empty child property tags for Array type properties.

    Revision: 12788
    Revision: 12788
    Author:   [email protected]
    Date:     2009-12-10 07:46:54 -0800 (Thu, 10 Dec 2009)
    Log Message:
    By popular demand, we now allow for empty child property tags for Array type properties. Coerced to empty array '[]'.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24500
    Reviewer: Paul
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24500
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractBuilder.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a

    Hi John,
    Sorry to tell but tab completion is still failing on my Windows XP/Indesign CS5 (caught by Indesign).
    I just saw your remark on coloring text, here is an example pulled out from Peter's book "ScriptUI for dummies":
    var w = new Window ("dialog");
    var s = w.add ("statictext", undefined, "Static");
    var e = w.add ("edittext", undefined, "Edit");
    var b = w.add ("button", undefined, "Button");
    // The window's backround
    w.graphics.backgroundColor = w.graphics.newBrush (w.graphics.BrushType.SOLID_COLOR, [0.5, 0.0, 0.0]);
    // Font and its colour for the first item, statictext
    s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
    s.graphics.foregroundColor = s.graphics.newPen (w.graphics.PenType.SOLID_COLOR, [0.7, 0.7, 0.7], 1);
    // Font and colours for the second item, edittext
    e.graphics.font = ScriptUI.newFont ("Letter Gothic Std", "Bold", 30);
    e.graphics.foregroundColor = e.graphics.newPen (e.graphics.PenType.SOLID_COLOR, [1, 0, 0], 1);
    e.graphics.backgroundColor = e.graphics.newBrush (e.graphics.BrushType.SOLID_COLOR, [0.5, 0.5, 0.5]);
    // Font for the tird control, a button. Can't set colours in buttons
    b.graphics.font = ScriptUI.newFont ("Minion Pro", "Italic", 30);
    w.show ();
    Loic

Maybe you are looking for