Issue swapping coordinates of PNG stored in 2D Array

Hi,
I'm using the interactive png class found
here
I'm loading in the the required date from an xml file which
is structured like this
<?xml version="1.0"?>
<theData>
<_title_>pictures!</_title_>
<_url_>images/</_url_>
<slides>
<sub image="images.png" region="region1" info="region 1
info - links to bbc" _url="
http://www.bbc.co.uk" xLoc="0"
yLoc="0" image2="images2.png"/>
</slides>
</theData>
the images are loaded into a loader and stored as
interactivePNG. I give them an x,y coord but on rollover i need
them to swap coordinates. I put the interactivePNG in the next
available space in the regionArray which is stored in the mapArray.
So i need to swap the currentTargets interactive png x and y
coordinate with the interactive png x and y coordinate that is in
the same regionArray but one position later. i.e if the first one
is mapArray[0][8] i need it to swap x and y with mapArray[0][8]
How can i get them to swap, i just cant get it done...... If
tried using indexOf the currentTarget in the mapArray but it
returns -1.....
please help, thanks in advance
Greg

So try adding an 'index' property to the instance that is
equal to nCount01 for that iteration. In addition, you can add a
property that holds the value of the second dimension where you're
storing the instance, like 7 or 8...
thePNG.x = mapArray[nCount01][4];
thePNG.y = mapArray[nCount01][5];
thePNG.name = "1";
thePNG.alpha = 1;
thePNG.visible = true;
thePNG.index = nCount01;
thePNG.storedIndex = 7;
Then in your rollOver and rollOut handlers you could do
something like this:
var idx:int = evt.currentTarget.index;
var storedIndex:int = evt.currentTarget.storedIndex;
if (evt.currentTarget.name = "1") {
evt.currentTarget.x = mapArray[idx][storedIndex + 1].x;
evt.currentTarget.y = mapArray[idx][storedIndex + 1].y;
TS

Similar Messages

  • How do I add a list of numbers stored in an array

    How do I add a list of numbers stored in an array? The code I
    have is showing ‘NaN’ when I try to add the second item
    in each element of the array:
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number;
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];
    trace("totalPrice: "+ totalPrice);

    i modified your code in 2 places, check it
    var aItemPrices:Array = new Array(["item1_mc", 10], ["item
    2_mc", 20], ["item 3_mc", 30]);
    var totalPrice:Number=0; //Mani changes
    for (i=0; i<aItemPrices.length; i++) {
    //the following line traces 'NaN'
    totalPrice += aItemPrices
    [1];//Mani changes
    trace("totalPrice: "+ totalPrice);

  • How to retrieve web service results that are stored in an array?

    Hi, everyone,
    I am using a manually created web service reference in APEX3.0.1 to call an external web service for a simple company search. Here is the WSDL:
    http://ws.strikeiron.com/DnBBusinessProspectLinkage2?WSDL
    The web referene is tested fine. And here is a sample test result:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Header xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <SubscriptionInfo xmlns="http://ws.strikeiron.com">
    <LicenseStatusCode>0</LicenseStatusCode>
    <LicenseStatus>Valid license key</LicenseStatus>
    <LicenseActionCode>7</LicenseActionCode>
    <LicenseAction>No hit deduction for invocation</LicenseAction>
    <RemainingHits>4921</RemainingHits>
    <Amount>0</Amount>
    </SubscriptionInfo>
    </Header>
    <soap:Body>
    <CompanySearchResponse xmlns="http://www.strikeiron.com">
    <CompanySearchResult>
    <ServiceStatus>
    <StatusNbr>213</StatusNbr>
    <StatusDescription>Successful search</StatusDescription>
    </ServiceStatus>
    <ServiceResult>
    <Count>2</Count>
    <CandidateCompanies>
    <CandidateCompany>
    <CompanyName>MSC SOFTWARE CORPORATION</CompanyName>
    <StreetAddress>2 MACARTHUR PL</StreetAddress>
    <City>SANTA ANA</City>
    <State>CA</State>
    <PostalCode>927075924</PostalCode>
    <Phone>7145408900</Phone>
    <CountryCode>US</CountryCode>
    <BranchIndicator>Headquarters</BranchIndicator>
    <TradingName />
    <ConfidenceCode>8</ConfidenceCode>
    <MatchGrade>BAAAAZZ</MatchGrade>
    <MatchNameGrade>Similar</MatchNameGrade>
    <MatchNamePercent>62</MatchNamePercent>
    <MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
    <MatchStreetNumberPercent>100</MatchStreetNumberPercent>
    <MatchStreetNameGrade>Same</MatchStreetNameGrade>
    <MatchStreetNamePercent>100</MatchStreetNamePercent>
    <MatchCityGrade>Same</MatchCityGrade>
    <MatchCityPercent>100</MatchCityPercent>
    <MatchCountryStateGrade>Same</MatchCountryStateGrade>
    <MatchCountryStatePercent>100</MatchCountryStatePercent>
    <MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
    <MatchPOBoxPercent>-1</MatchPOBoxPercent>
    <MatchPhoneGrade>Not provided</MatchPhoneGrade>
    <MatchPhonePercent>-1</MatchPhonePercent>
    </CandidateCompany>
    <CandidateCompany>
    <CompanyName>TYRA TECHNOLOGIES, INC</CompanyName>
    <StreetAddress>2 MACARTHUR PL</StreetAddress>
    <City>SANTA ANA</City>
    <State>CA</State>
    <PostalCode>927075924</PostalCode>
    <Phone>7145408900</Phone>
    <CountryCode>US</CountryCode>
    <BranchIndicator>Headquarters</BranchIndicator>
    <TradingName />
    <ConfidenceCode>8</ConfidenceCode>
    <MatchGrade>BAAAAZZ</MatchGrade>
    <MatchNameGrade>Similar</MatchNameGrade>
    <MatchNamePercent>62</MatchNamePercent>
    <MatchStreetNumberGrade>Same</MatchStreetNumberGrade>
    <MatchStreetNumberPercent>100</MatchStreetNumberPercent>
    <MatchStreetNameGrade>Same</MatchStreetNameGrade>
    <MatchStreetNamePercent>100</MatchStreetNamePercent>
    <MatchCityGrade>Same</MatchCityGrade>
    <MatchCityPercent>100</MatchCityPercent>
    <MatchCountryStateGrade>Same</MatchCountryStateGrade>
    <MatchCountryStatePercent>100</MatchCountryStatePercent>
    <MatchPOBoxGrade>Not provided</MatchPOBoxGrade>
    <MatchPOBoxPercent>-1</MatchPOBoxPercent>
    <MatchPhoneGrade>Not provided</MatchPhoneGrade>
    <MatchPhonePercent>-1</MatchPhonePercent>
    </CandidateCompany>
    </CandidateCompanies>
    </ServiceResult>
    </CompanySearchResult>
    </CompanySearchResponse>
    </soap:Body>
    </soap:Envelope>
    Here is my xpath defined in the report:
    /CompanySearchResponse/CompanySearchResult/ServiceResult/CandidateCompanies
    According to the WSDL file, the candidate companies are stored in an array. I am having problem to retrieve this values from the array. The web service ref is called but it returns nothing.
    Anyone in the forum can tell me what I did wrong?
    Thanks in advance!
    Jeff

    Hi, did you manage to figure this out? I'm having a similar problem with arrays.
    Also, i'm looking at how I can pass an array of values as input to the webservice call.. eg if I were calling a stock ticker service that allows you to supply a list of tickers as input so that you can get all your responses in one call. Anyone any thoughts on that?
    Cheers,
    Paul.

  • 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.

  • Having problem with storing data in array

    Hi,
    I'm having problem on storing data in array. My problem is that each time it loops, the array just keep overwrite instead save to the next index. Like at 0 the value is 123, and 1 is 234. But i having that all data capture all overwrite at 0 till the last data it still show at 0. How do i correct this problem?
    Solved!
    Go to Solution.

    How to use array to do comparison? Like Array 1 go thru array 2 to get data Loss out and build an array. Like Array 1 ,1000,1024,1048,etc before 1520 fall in between Array 2 range 1000-1500. So Freq 1000,1024,1048 etc will get Loss value as 1 and 1520 fall in between 1500-2000 will output Loss 2. and so on till the end of the list. How should do this? Need help on this.
    Array 1                                                Array 2
    Freq                                              ​     Freq   Loss
    1000                                              ​    1000      1
    1024                                              ​    1500      2
    1048                                              ​    2000      3
    1100                                              ​     :
    1200                                              ​     :
    :                                                 ​        18000
    1520
    18000

  • Converting a PNG image to an array of bytes and vice versa..

    hi all,
    i need to convert a PNG image to an array of bytes ,then converting back this array of bytes to The PNG image again ,i read this can be done using output streams but i feel like a dump and i can't fix the whole thingy out ! ,can anybody help me in this ,by explaining how can this be established????
    Regards,
    D.Roth

    hi all,
    i need to convert a PNG image to an array of bytes ,then converting back this array of bytes to The PNG image again ,i read this can be done using output streams but i feel like a dump and i can't fix the whole thingy out ! ,can anybody help me in this ,by explaining how can this be established????
    Regards,
    D.Roth

  • Transparency issue while exporting in PNG 24 (png 32 in fact)

    Hello,
    I'm trying to export in png24 with transparency but instead of a png Photoshop (ImageReady in fact) creates a jpg with no transparency at all... I can see on the optimized image that ImageReady cannot show the transparency i have in Photoshop (he puts white background evrywhere, but in the original image i actually have transparency).
    Can someone help me with this bug ?
    Thank you !
    Jordi

    You wrote ImageReady I used CS2 version of Image Ready the latest version of ImageReady.   I do not have any version of Photoshop older then CS2 installed. CS2 was shipped 2005. How old is your ImageReady? What version are you using. You do realize imageready is no longer available or supported right.  In CS6 you use Save for Web to save PNG 24 files. With Transparency check for transparency.  I do not know if PNG 32 exists  I don't do HDR but know there is some 32Bit color support for HDR. Save for web is not an option if your exditing in 32bit color depth. Many Image File formats do not support 32 bit color...... I know PNG support 16bit Color where jpeg only supports 8bit color depth.
    Message was edited by: JJMack

  • Captivate 6 Issue: Swapped or Removed Graphics

    I have a Captivate file with 163 slides. This is for an online tutorial for software, so is very interactive.
    I keep the file on my desktop, as it became clear that Captivate does not play well with our network.
    I am the only one who opens and works with this file.
    Monday, I worked on the file most of the day to fine tune interactions and audio.
    Tuesday, I opened the file and found that I had several slides with missing graphics, and on other slides the graphics that were showing were from other slides. There is no possibility that I put those graphics on the slides, as they were completely out of context, as well as sequence. I checked a previously published version (.exe), and the graphics were correct on that version.
    This has caused me a lot of rework, and I have had to tell my client that there is a delay in delivery due to technical issues. This damages my reputation.
    Has anyone seen this before, and is there a fix that would restore my confidence in this product?
    This issue makes me wonder if I should be using a different product. I can't afford not to trust the software that I am using.

    Re:
    The quiz review button is inconsistent - sometimes it shows the ticks and crosses other times it doesn't - did you find a solution? I'd dearly like to be able to tidy up the ticks!
    Thanks
    Sharon

  • Program and send several coordinates for steeper motor operation. Arrays?

    Hello,
    I am a beginner in LabVIEW and currently I am developing a project to design and build a Cartesian robot.
    I have a generic VI to control my stepper motors in which I only can introduce one target position and then execute it. I would like to introduce several positions and execute them in one click, I mean, for example enter several coordinates instead only one at time, then execute the profile and get the motor perform them one after another.
    To do it I am thinking in doing it by an array in which I introduce the values of my target positions and then the array would send them one by one once the previous one has finished.
    First of all would you do it like that using arrays?
    If so please if someone has an idea of how to achieve it I would be grateful to hear it.
    I enclose the Vi I'm using. As you can see I can introduce only one value in the "target position" field whereas I need to have for example a column of values and perform the one after another until the last one just clicking "start profile"
    Thank you very much in advance, all ideas/examples are welcome.
    Attachments:
    Nanotec-Example for LabView 2011.zip ‏68 KB

    Hello!
     Thanks very much for replying!
    The answers to your questions are:
    1. Have you every time to push "Change Position" when you want to set a new position and then to push "Start Profile" to perform the move to this position?
    Yes, actually that is one of my problems, I have implemented an array which is able to send positions stored in it, but I have to click an ok button to send the next position, then change the position and finally start profile. The current sequence is:
    - When executing the VI the array send the value stored in 0 position --> Click in "Change Position" --> Click in "Start Profile" --> Performing the profile --> Click in "Next position" --> Click in "Change Position" --> Click in "Start Profile" --> Execution of second position and so on.
    What I would need to do is automatically to perform all the positions with a single "Start profile" button click.
    2. How do I know if the current position is reached and the move is ready?
    There is a led labeled "ready" which is an indicator that the motor has finished to execute the profile.
    So currently I need to press manually 3 Booleans and the goal is do it automatically as sequence or so.
    All ideas/solutions are welcome.
    Thanks again for replying again.
    I enclose the latest VI and a picture as an explanation.
    Kind regards.
    Attachments:
    Example3.zip ‏72 KB
    Example_3.jpg ‏452 KB

  • Call stored function return array

    Hi all,
    I have a function as follow:
    create or replace TYPE string_table IS TABLE OF VARCHAR2(2000);
    create or replace TYPE ARRAYTYPE is VARRAY(20) OF VARCHAR2(30);
    create or replace FUNCTION getEmpArray(s varchar2, t varchar2, st string_table) RETURN ARRAYTYPE AS
    l_data ARRAYTYPE := ARRAYTYPE();
    BEGIN
    l_data.extend; l_data(l_data.count) := s; l_data.extend; l_data(l_data.count) := t; l_data.extend; l_data(l_data.count) := st(1); RETURN l_data;
    END;
    I want to call this function by StoredFunctionCall
    code:
    StoredFunctionCall fun = new StoredFunctionCall();
    fun.setProcedureName("getEmpArray".toUpperCase());
    Object[] arr = new Object[]{"aa", "fgfg", "bbb"};
    ArrayDescriptor arrDescriptor =
    ArrayDescriptor.createDescriptor("string_table".toUpperCase(),
    connection);
    ARRAY arrayToPass = new ARRAY(arrDescriptor, connection, arr);
    fun.addUnamedArgumentValue("a");
    fun.addUnamedArgumentValue("b");
    fun.addUnamedArgumentValue(arrayToPass);
    fun.setResult("FUNCTION_RESULT"); // for get result by this name
    Vector<DatabaseRecord> list = session.executeSelectingCall(fun);
    But Exception
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call: BEGIN ? := GETEMPARRAY(?, ?, ?); END;
         bind => [=> FUNCTION_RESULT, a, b, oracle.sql.ARRAY@21fbc01]
    Please help me
    Edited by: fbg on 21:52 26-04-2010

    A few issues,
    1 - JDBC does not support the PLSQL TABLE type, you must use a VARRAY type, or wrap the TABLE function call in a function that takes a VARRAY.
    TopLink also has support for PLSQL types in its PLSQLStoredProcedureCall class, but no support is currently offered for StoredFunctions.
    You can't pass the VARRAY type for the TABLE argument.
    2 - Your function returns a VARRAY, so you need to define this type in the StoredFunctionCall result.
    We don't currently expose the API to set a Array type for the result, so you would need to access the call's first parameter directly, or use a StoredProcedureCall (and convert your function to a procedure).
    You may also wish to investigate returning a cursor from a stored procedure instead of the varray.
    You could also access the JDBC connection directly and perform the call using JDBC code.
    Feel free to log these issues in EclipseLink.
    James : www.eclipselink.org

  • With JDBC, calling a stored procedure with ARRAY as out parameter

    Hi,
    I want to use the data type ARRAY as an out parameter in an Oracle stored procedure. I want to call the stored procedure from
    my java program using JDBC.
    The problem it's i use a 8.1.7 client to acces with oci to a 7.1.3 Database.
    With this configuration I can get back a Cursor but not an Array.
    Does it's possible ?
    Thanks for your help !
    Michakl

    Originally posted by JDBC Development Team:
    It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
    cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
    cstmt.execute ();
    ARRAY array = (ARRAY) cstmt.getObject (idx);
    Thanks for your reply.
    I have to use:-
    OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
    ( "{call proj_array(?)}" ) ;
    for retrieving a collection as an OUT parameter.
    This gives me the errors:-
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
    import java.sql.*;
    ^
    How do I get rid of these errors?
    null

  • Calling a stored procedure with array as IN parameter

    Hi,
    I need to invoke a stored procedure which actually requires 2 IN parameters , both are ARRAY of numbers.. Can anyone tell me using JDBC callableStatement how to invoke this stored procedure?
    how to pass array of numbers as input to stored procedure? also what is the corresponding JAVA data type?
    the procedure definition is as follows:
    PROCEDURE update_group
    ( in_username IN consumers.consumer_name%type,
    in_group_id IN account_group.acct_grp_id%type,
    in_group_name IN account_group.acct_grp_dsply_nm%type,
    in_group_type IN account_group.acct_group_type_cd%type,
    in_rem_accts_arr IN number_array,
    in_add_accts_arr IN number_array,
    out_over_max_ind OUT integer);
    thanks in advance

    Hi,
    You need to define a Call Spec like the following (assume NVarrayClass class):
    create or replace procedure nvaproc (x IN OUT number, y IN OUT
    NVARRAY,
    z IN NVARRAY)
    as language java
    name 'NVarrayClass.nvaproc(oracle.sql.NUMBER[], java.sql.Array[],
    java.sql.Array)';
    show errorsI have tons of examples of array in chapter 3 and 8 of my book. The code depot is available @ http://books.elsevier.com/companions/1555583296?country=United+States
    Kuassi http://db360.blogspot.com

  • Java stored proc: returning array?

    Hi,
    I have had to implement a Java stored procedure that accepts a nested table as an argument from aPL/SQL package. The class must manipulate the data and then create an object or an array that can be returned to the package for subsequent interpretation and use.
    I'd assuemd that I could reverse the process when the argument was accepted; i.e. assemble the data as an oracle.sql.ARRAY type and return that. The Javadoc I have advises that the constructors for this class are for 'internal' use only. Also, it requires a connection and I don'treally want to have to open another connection to the schema.
    Another alternative was to return an array of BigDecimal but this would require an equivalent VARRAY on the PL/SQL side. As I don't know the side of the array until run-time I cannot safely declare a VARRAY of an arbitrary size.
    As you acn probalby tell, I'm a bit of a novice so any help would be greatly appreciated.
    Thanks

    Thanks for the reply Avi.
    That's fine: it's a valid question! I started to explain the original problem but it became too long. Basically I needed the ability to define an array that could be dynamically sized depending on the rowcount resulting from a BULK COLLECT during runtime. As admitted, I'm a novice and believed this couldn't be done in PL/SQL, and, to cut a very long-winded story short after seeking more experienced advice, used the dynamic allocation techniques in Java which is more familiar terriory to me.
    I nearly have the Java solution working, thanks to Oracle documentation and a couple of hints towards the end of this thread. I'd also been perusing those links you recommended.
    I have since realised I can simulate a dynamic array with a nested table and using EXTEND. If thre are other techniques available, I'd be grateful or some pointers! All in all the whole process has been beneficial if a little time consuming.
    Thanks again
    The original problem is as follows: I have a nested table, each row of which contains one column for each month of the year recording payments. Some of these months can contain 0 and therefore, a 5,000 foot view shows that result set is fragmented. Basically the payments have to be rearranged as though they were contiguous monthly payments prior to subsequent processing. Because of the way the rows needed to be grouped for processing, the algorithms for defragmentation were becoming really complex. Admitting my PL/SQL limitations I slunk off to ask further advice and

  • Stored procedure, returning array output

    i am new to oracle and stored procedure and i have tried to do this but, still no luck, can anyone help me out?
    my stored procedure & package is as follows;
    create or replace package prebooking
    is
        type tr_contract_data
        is
            record (
                    custcode  customer_all.custcode%TYPE        ,
                    des       rateplan.des%TYPE                 ,
                    dn_num    directory_number.dn_num%TYPE      ,
                    cd_sm_num contr_devices.cd_sm_num%TYPE
        type tt_contract_data
        is
            table of tr_contract_data
            index by binary_integer;
        procedure customer_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pc_customer_name        out varchar2                  ,
                                    pc_customer_address_1   out varchar2                  ,
                                    pc_customer_address_2   out varchar2                  ,
                                    pc_user_lastmod         out varchar2
        procedure contract_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pt_contract_data        out tt_contract_data
    end prebooking;
    drop public synonym prebooking;
    create public synonym prebooking for prebooking;
    grant execute on prebooking to wpa;
    -- EOF: PREBOOKING.plh
    create or replace package body prebooking
    is
        procedure customer_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pc_customer_name        out varchar2                  ,
                                    pc_customer_address_1   out varchar2                  ,
                                    pc_customer_address_2   out varchar2                  ,
                                    pc_user_lastmod         out varchar2
        is
            cursor c_customer_data ( pc_custcode customer_all.custcode%TYPE )
            is
                select ccline1  || ' ' || ccfname || ' ' || cclname         customer_name,
                       ccstreet || ' ' || ccaddr2 || ' '     || ccaddr3 ||
                                   ' ' || cccity  || ' zip ' || cczip   ||
                                   ' ' || ccline4                           customer_address_1,
                       ccstate  || ' ' || ccline6                           customer_address_2,
                       b.user_lastmod                                       user_lastmod
                from ccontact_all a,
                     customer_all b
                where b.customer_id = a.customer_id
                  and a.ccbill = 'X'
                  and b.custcode = pc_custcode;
        begin
            open c_customer_data ( pc_custcode );
            fetch c_customer_data into pc_customer_name     ,
                                       pc_customer_address_1,
                                       pc_customer_address_2,
                                       pc_user_lastmod      ;
            close c_customer_data;
        end customer_data;
        procedure contract_data (
                                    pc_custcode             in  customer_all.custcode%TYPE,
                                    pt_contract_data        out tt_contract_data
        is
            cursor c_contract_date ( pc_custcode customer_all.custcode%TYPE )
            is
                select h.custcode,
                       g.des,
                       e.dn_num,
                       d.cd_sm_num
                from curr_co_status      a,
                     contract_all        b,
                     contr_services_cap  c,
                     contr_devices       d,
                     directory_number    e,
                     rateplan            g,
                     customer_all        h
                where h.customer_id = b.customer_id
                  and b.co_id = a.co_id
                  and b.co_id = c.co_id
                  and b.co_id = d.co_id
                  and c.dn_id = e.dn_id
                  and b.tmcode = g.tmcode
                  and c.cs_deactiv_date is null
                  and h.custcode = pc_custcode;
        begin
            for c in c_contract_date ( pc_custcode )
            loop
                pt_contract_data (nvl (pt_contract_data.last, -1) + 1).custcode  := c.custcode ;
                pt_contract_data (     pt_contract_data.last         ).des       := c.des      ;
                pt_contract_data (     pt_contract_data.last         ).dn_num    := c.dn_num   ;
                pt_contract_data (     pt_contract_data.last         ).cd_sm_num := c.cd_sm_num;
            end loop;
        end contract_data;
    end prebooking;
    -- EOF: PREBOOKING.plhand i am using the following php code to do this
    <?php
      $conn=OCILogon("USER", "USER", "DB");
      if ( ! $conn ) {
         echo "Unable to connect: " . var_dump( OCIError() );
         die();
      $collection_name = 1.1;     
      $stmt = OCIParse($conn,"begin PREBOOKING.CONTRACT_DATA(:INN, :OUTT); end;");
      OCIBindByName($stmt, ":INN", $collection_name, 200);
      //OCIBindByName($stmt, ":", $collection_desc, 100);
      $blobdesc = OCINewDescriptor($conn, OCI_D_LOB);
      OCIBindByName($stmt, ":OUTT", $blobdesc, -1, OCI_B_BLOB);
      $blobdesc->WriteTemporary($binary_junk, OCI_B_BLOB);
      OCIExecute($stmt);
      OCILogoff($conn);
    ?>the error i get when i run this code is;
    Warning: OCI-Lob::writetemporary() [function.writetemporary]: Cannot save a lob that is less than 1 byte in C:\apachefriends\xampp\htdocs\POSP\oci53.php on line 18
    Fatal error: Call to undefined function OCIDefineArrayOfStruct() in C:\apachefriends\xampp\htdocs\POSP\oci53.php on line 19

    Hi Varun,
    To combine the first xml-formatted column to one XML, If you want to do that in SQL server, you can reference the below sample.
    CREATE PROC proc1 -- the procedure returning the resultset with 3 columns
    AS
    DECLARE @XML1 VARCHAR(MAX),
    @XML2 VARCHAR(MAX),
    @XML3 VARCHAR(MAX);
    SET @XML1='<person><name>Eric</name></person>'
    SET @XML2='<book><name>war and peace</name></book>'
    SET @XML3='<product><name>product1</name></product>'
    SELECT @XML1 AS col1,1 AS col2,2 AS col3
    UNION ALL
    SELECT @XML2,2,3
    UNION ALL
    SELECT @XML3,2,3
    GO
    CREATE PROC proc2
    AS
    DECLARE @TbL TABLE(id INT IDENTITY, col1 VARCHAR(MAX),col2 INT,col3 INT)
    INSERT INTO @TbL EXEC proc1
    SELECT id as '@row' ,cast(col1 as xml) FROM @TbL FOR XML PATH('XML'),TYPE
    GO
    EXEC proc2
    DROP PROC proc1,proc2
    /*output
    <XML row="1">
    <person>
    <name>Eric</name>
    </person>
    </XML>
    <XML row="2">
    <book>
    <name>war and peace</name>
    </book>
    </XML>
    <XML row="3">
    <product>
    <name>product1</name>
    </product>
    </XML>
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • XI/PI: jdbc receiver using stored procedure with arrays

    The company needs an interface to search for header data and detail to a legacy system.
    This interface from ERP  to legacy system is synchronous and uses stored procedure.
    The definition of the stored procedure is as follows:
    PROCEDURE
    Generar_Detalle_Vtas_Pagadas
        (p_cvendedor                 IN bdc_vendedores.cvendedor%TYPE,
        p_fdesde                   IN DATE,
        p_fhasta                     IN DATE,
        v_encabezado_ct           OUT encabezado_ct,
        v_detalle_vtas_pagadas_ct OUT detalle_vtas_pagadas_ct,
        err_num                 OUT NUMBER
    Data types used in stored procedure:
    TYPE encabezado_ct AS OBJECT
    ( CREGION         NUMBER(22),
      XREGION         VARCHAR2(50),
      CMERCADO        NUMBER(22),
      XMERCADO        VARCHAR2(50),
      CTVENDEDOR      VARCHAR2(5),
      XCTVENDEDOR     VARCHAR2(50),
      XDENOMINACION   VARCHAR2(15))
    TYPE detalle_vtas_pagadas_ct AS OBJECT
    (     CITEM           VARCHAR2(10),
          XIDENTIFICADOR  VARCHAR2(15),
          XCONTRATO       VARCHAR2(15),
          XVALOR          VARCHAR2(30),
          CCUENTA         VARCHAR2(15),
          FACTIVACION     DATE,
          XDOMINIO        VARCHAR2(30),
          CCED            VARCHAR2(20),
          XCLIENTE        VARCHAR2(161),
          CCPO            VARCHAR2(60) )
    As shown, this has three input parameters varchar and date respectively and has three output parameters, two of which are defined with a data
    type such as table and the other number.
    The problem is to define the signature of the stored procedure in XI when defining the data type request, the message type and mapping system
    legacy because the data type is not supported (tables: detalle_vtas_pagadas_ct,encabezado_ct  )

    FORM 2:
    defined as an array, but the error tells me that we need to define the attribute either input or output
    <?xml version="1.0" encoding="UTF-8"?>
         <ns0:MT_VtasPagadas_VYC xmlns:ns0="urn:VentasPagadas:VE_ALTASDEDCALIDAD_SD_VYC">
          <VtasPagadasRequest><Generar_Detalle_Vtas_Pagadas action="EXECUTE">
             <table>vyc.Vyc_Pack_Reportes_Sap.Generar_Detalle_Vtas_Pagadas</table>
             <p_cvendedor type="VARCHAR"></p_cvendedor>
             <p_fdesde type="DATE"></p_fdesde>
             <p_fhasta type="DATE"></p_fhasta>
             <v_encabezado_ct>
                 <CREGION isOutput="1" type="NUMERIC">X</CREGION>
                 <XREGION isOutput="1" type="VARCHAR">X</XREGION>
                 <CMERCADO isOutput="1" type="NUMERIC">X</CMERCADO>
                 <XMERCADO isOutput="1" type="VARCHAR">X</XMERCADO>
                 <CTVENDEDOR isOutput="1" type="VARCHAR">X</CTVENDEDOR>
                 <XCTVENDEDOR isOutput="1" type="VARCHAR">X</XCTVENDEDOR>
                 <XDENOMINACION isOutput="1" type="VARCHAR">X</XDENOMINACION>
            </v_encabezado_ct>
            <v_detalle_vtas_pagadas_ct>
                 <CITEM isOutput="1" type="VARCHAR">X</CITEM>
                 <XIDENTIFICADOR isOutput="1" type="VARCHAR">X</XIDENTIFICADOR>
                 <XCONTRATO isOutput="1" type="VARCHAR">X</XCONTRATO>
                 <XVALOR type="VARCHAR">X</XVALOR>
                 <CCUENTA isOutput="1" type="VARCHAR">X</CCUENTA>
                 <FACTIVACION isOutput="1" type="DATE">X</FACTIVACION>
                 <ICTA isOutput="1" type="VARCHAR">X</ICTA>
                 <CCED isOutput="1" type="VARCHAR">X</CCED>
                 <XCLIENTE isOutput="1" type="VARCHAR">X</XCLIENTE>
                 <CCPO isOutput="1" type="VARCHAR">X</CCPO>
            </v_detalle_vtas_pagadas_ct>
            <err_num isOutput="1" type="NUMERIC">X</err_num>
         </Generar_Detalle_Vtas_Pagadas>
      </VtasPagadasRequest></ns0:MT_VtasPagadas_VYC>
    Edited by: ymonasterio on Mar 31, 2010 4:48 PM

Maybe you are looking for

  • Opening a form in a POP UP window from report

    I would like to open a form in a new window from a link on a field in the report . Parameters should be passed from the report to form. Is it possible to do this with a portal link? Also After modification of the form & on click of save is it possibl

  • Pages Failing to load

    Recently I have had increasing trouble with web pages failing to load. It can be quite irratic. Tonight, for example, Apple's main page at www.apple.com itself will sometimes load quickly and sometimes get to "completed 34 out of 35 items" then just

  • New functionality in ECC 6.0 for auto clearing of bank clearing account.

    Is there any new functionality in ECC 6.0 for auto clearing of bank clearing account. Regards, Kishore

  • Is this even possible with a selectManyCheckbox???

    I know I can do one of two layouts with a selectManyCheckbox, line or page. I would like to have the checkboxes go horizontally i.e. line, but after x number of them, say 5, I would like to start a new row rather than scrolling off to the right... I

  • Numbering External Mask

    Hello. We have a CUCM 9.1.2.11900-12. When we make an external call, receiver can't see our number (it appears as unknown). I've tried to add the number into "External Phone Number Mask" field (into "Line Configuration" from device), with no luck. I'