Returning Array Data

Hello. I am trying to create an array of bank accounts and only return one of those accounts based on input from a scanner i.e entering a pin number. I know how to create the scanner and create the objects I just can not figure out for the life of me how to search the array based on the pin number and return only the object containg the information I want. The code i have so far is. I am very new to Java so I am still learning a lot any help would be appreciate.
import java.util.Scanner;
public class User
     private String accountNumber;
     private String firstName;
     private String lastName;
     private String memberType;
     private String pin;
Public User(String a, String f, String l, String m)
          accountNumber = a;
          firstName = f;
          lastName = l;
          memberType = m;
     public void print()
          System.out.printf("Your Account Number is: %s\nYour Name is: %s %s\nYour Member Type is: %s\n"
                    , accountNumber, firstName, lastName, memberType );
          System.out.println();
     public void getPin()
          Scanner input = new Scanner( System.in );
          System.out.print("Please input Account Number: ");
          pin = input.nextLine();
public class UserTest
     public static void main(String [] args)
          User[] account = new User [5];
          account[0] = new User ("1000","Pat", "Roberts", "Premier");
          account[1] = new User ("2000", "Andy", "Garcia", "Regular");
          account[2] = new User ("3000", "Debby", "Dupont", "Regular");
          account[3] = new User ("4000", "Ramon", "Spaulding","Regular");
          account[4] = new User ("5000", "Becky", "Dunow", "Regular");
     for (int i = 0; i<= account.length; i++)
account.print();     

Actually all that loop does is print out the details of all the accountsActually, it doesn't even do that, he is missing a in there. ;-)
It also looks like you arn't setting a pin for a user anywhere, so how will you be able to compare the entered pin with a stored one.
I think you getPin() method, should be in your main class, or even just part of your main method.
There is also a serious flaw in the whole concept, because it means that no to users can have the same PIN. A user should be identified by his/her account number and PIN
Actually, looking at your code again, perhaps thats what you are trying to do?
Anyway, this is what I would be doing:
public class User
     private String accountNumber;
     private String firstName;
     private String lastName;
     private String memberType;
     private String pin;
     public User(String a, String f, String l, String m, String p)
          accountNumber = a;
          firstName = f;
          lastName = l;
          memberType = m;
          pin = p;
     public void print()
          System.out.printf("Your Account Number is: %s\nYour Name is: %s %s\nYour Member Type is: %s\n"
                    , accountNumber, firstName, lastName, memberType );
          System.out.println();
     public String getAccountNumber() {
          return accountNumber;
     public String getFirstName() {
          return firstName;
     public String getLastName() {
          return lastName;
     public String getMemberType() {
          return memberType;
     public String getPin() {
          return pin;
import java.util.Scanner;
public class UserTest
     public static void main(String [] args)
          User[] account = new User [5];
          account[0] = new User ("1000","Pat", "Roberts", "Premier", "1234");
          account[1] = new User ("2000", "Andy", "Garcia", "Regular", "1234");
          account[2] = new User ("3000", "Debby", "Dupont", "Regular", "1234");
          account[3] = new User ("4000", "Ramon", "Spaulding","Regular", "1234");
          account[4] = new User ("5000", "Becky", "Dunow", "Regular", "1234");
          System.out.print("Enter your account number:");
          Scanner scanner = new Scanner(System.in);
          String accountNumber = scanner.nextLine();
          for (int i = 0; i < account.length; i++)
               if (accountNumber.equals(account.getAccountNumber())) account[i].print();
Edited by: TimSparq on Oct 22, 2007 10:38 AM

Similar Messages

  • How to return array of unsigned integer pointer from call library function node & store the data in array in labview

    I want to return array of unsigned integer from call library node.
    If anybody knows please help me
    Thanks & Regards,
    Harish. G.

    Did you take a look at the example that ships with LabVIEW that shows how to do all sorts of data passing to DLLs. I believe your situation is one of the examples listed. You can find the example VI in the "<LabVIEW install directory>\examples\dll\data passing" directory.

  • How to send Array data using Post Method?

    Var array = $_POST['myData'];
    array[0] => 'ABC'
    array[1] => 'DEF'
    how to improve this code to support send array data...?
    String url ="http://xxxxx/test.php";
    String[] arraystr={"ABC", "DEF", "EDFF"}
    String parameter = "myData=" +arraystr;    // no support this
    Strint str = postMrthod(url, parameter );
    public static String postMethod(String url, String parameter) {
            StringBuffer b = new StringBuffer("");
            HttpConnection hc = null;
            InputStream in = null;
            OutputStream out = null;
            try {
                hc = (HttpConnection) Connector.open(url);
                hc.setRequestMethod(HttpConnection.POST);
                hc.setRequestProperty("CONTENT-TYPE", "application/x-www-form-urlencoded");
                hc.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
                out = hc.openOutputStream();
                byte postmsg[] = parameter.getBytes();
                for (int i = 0; i < postmsg.length; i++) {
                    out.write(postmsg);
    out.flush();
    in = hc.openInputStream();
    int ch;
    while ((ch = in.read()) != -1) {
    b.append((char) ch);
    } catch (IOException e) {
    e.printStackTrace();
    try {
    if (in != null) {
    in.close();
    if (hc != null) {
    hc.close();
    } catch (IOException e) {
    e.printStackTrace();
    return b.toString().trim();

    yes, you can send integer value like this. But I think you have to put quotes around <%= TAMID%> i.e.
    <input type="hidden" id="HTTP_CVHTAMID"
    name="HTTP_CVHTAMID" value= "<%= TAMID%>" >

  • Call library function node with array of clusters using array data pointer

    Hello all.
    I am writing a LabVIEW wrapper for an existing DLL function.
    The function has, as one of its parameters, an array of structs.  The struct is very simple, containing two integers.  I am using the call library function node to access it.
    In Labview I created an array of clusters, where the cluster has two 32-bit integers as its members.  So far, so good.
    Now I have to pass this in to the Call Library Function Node.  Here I am running into trouble.
    I have used The topic in LAVA and The topic in the knowledge base as my primary sources of information, though I have read a bunch of forum topics on the subject too.
    I do understand that I could write a new function which takes as a parameter a struct with the size as the first member and an array as the second, and I might just do this and have it call the regular function, but I was hoping to do it more simply.
    According to the C file which LabVIEW generates for me from the CLFN when I choose "Adapt to Type" and "Array Data Pointer", the prototype it is expecting is:
    int32_t myFunc(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    And the prototype of the function in my DLL is
    int borland_dll myFunc(DWORD handle, usint channel,
    int FIFOnumber, struct mStruct *data, int numWords, int *actualLoaded, int *actualStartIndex);
    This looks like a match to me, but it doesn't work (I get garbage in data).  From the topic in LAVA referenced above, I understood that it would work.  It does not.
    If I cast data to the pointer-to-pointer I get when I generate c code by wiring my struct to a CIN and generating, then I seem to get what I expect. But this seems to work when I choose "pointers to handles" too, and I would expect array data pointer to give a different result.
    Is there any way to get this to work directly, or will I have to create a wrapper?  (I am currently using LabVIEW 2011, but we have customers using 2009 and 2012, if not other versions as well).
    Thank you.
    Batya
    Solved!
    Go to Solution.

    OK, here is more detailed information.
    I have attached the VI.
    This is the code from the  "C" file created by right-clicking the CLN and creating a "C" file. 
    When the parameter in the CLN is set to "array data pointer":
    /* Call Library source file */
    #include "extcode.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, void data[], int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
     When the parameter is "pointers to handles":
    /* Call Library source file */
    #include "extcode.h"
    /* lv_prolog.h and lv_epilog.h set up the correct alignment for LabVIEW data. */
    #include "lv_prolog.h"
    /* Typedefs */
    typedef struct {
    int32_t control;
    int32_t data;
    } TD2;
    typedef struct {
    int32_t dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    #include "lv_epilog.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
     When the parameter is set to "handles by value":
    /* Call Library source file */
    #include "extcode.h"
    /* lv_prolog.h and lv_epilog.h set up the correct alignment for LabVIEW data. */
    #include "lv_prolog.h"
    /* Typedefs */
    typedef struct {
    int32_t control;
    int32_t data;
    } TD2;
    typedef struct {
    int32_t dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    #include "lv_epilog.h"
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex);
    int32_t Load_Transmit_FIFO_RTx(uint32_t handle, uint16_t channel,
    int32_t FIFOnumber, TD1Hdl *data, int32_t numWords, int32_t *actualLoaded,
    int32_t *actualStartIndex)
    /* Insert code here */
    As to the DLL function, it is a bit more complicated than I explained above, in the current case.  My VI calls the function by this name in one DLL, and that DLL loads a DLL and calls a function (with the same name) in the second DLL, which does the work. (Thanks Rolfk, for helping me with that one some time back!)
    Here is the code in the first ("dispatcher") DLL:
    int borland_dll Load_Transmit_FIFO_RTx(DWORD handle, usint channel, int FIFOnumber, struct FIFO_DATA_CONTROL *data, int numWords, int *actualLoaded, int *actualStartIndex)
    t_DispatchTable *pDispatchTable = (t_DispatchTable *) handle;
    int retStat = 0;
    retStat = mCheckDispatchTable(pDispatchTable);
    if (retStat < 0)
    return retStat;
    if (pDispatchTable->pLoad_Transmit_FIFO_RTx == NULL)
    return edispatchercantfindfunction;
    return pDispatchTable->pLoad_Transmit_FIFO_RTx(pDispatchT​able->handlertx, channel, FIFOnumber, data, numWords, actualLoaded, actualStartIndex);
    borland_dll is just "__declspec(dllexport)"
    The current code in the DLL that does the work is:
    // TEMP
    typedef struct {
    int control;
    int data;
    } TD2;
    typedef struct {
    int dimSize;
    TD2 data[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    // END TEMP
    int borland_dll Load_Transmit_FIFO_RTx(int handlertx, usint channel, int FIFOnumber, struct FIFO_DATA_CONTROL *data, int numWords, int *actualLoaded, int *actualStartIndex){
    struct TRANSMIT_FIFO *ptxFIFO; //pointer to transmit FIFO structure
    usint *pFIFOlist; //pointer to array of FIFO pointers to FIFO structures
    int FIFOentry, numLoaded;
    usint *lclData;
    usint nextEntryToTransmit;
    // TEMP
    FILE *pFile;
    int i;
    TD1** ppTD = (TD1**) data;
    TD1 *pTD = *ppTD;
    pFile = fopen("LoadFIFOLog.txt", "w");
    fprintf(pFile, "Starting Load FIFO with %d data words, data pointer 0x%x, with the following data&colon; \n", numWords, data);
    for (i = 0; i < numWords; i++) {
    fprintf(pFile, "%d: control--0x%x, data--0x%x \n", i, data[i].control, data[i].data);
    fflush(pFile);
    fprintf(pFile, "OK, using CIN generated structures: dimSize %d, with the following data&colon; \n", pTD->dimSize);
    for (i = 0; i < numWords; i++) {
    fprintf(pFile, "%d: control--0x%x, data--0x%x \n", i, pTD->data[i].control, pTD->data[i].data);
    fflush(pFile);
    // END TEMP
    if ((handlertx) <0 || (handlertx >= NUMCARDS)) return ebadhandle;
    if (cardrtx[handlertx].allocated != 1) return ebadhandle;
    pFIFOlist = (usint *) (cardrtx[handlertx].segaddr + cardrtx[handlertx].glob->dpchn[channel].tr_stk_ptr​);
    pFIFOlist += FIFOnumber;
    ptxFIFO = (struct TRANSMIT_FIFO *)(cardrtx[handlertx].segaddr + *pFIFOlist);
    //use local copy of ptxFIFO->nextEntryToTransmit to simplify algorithm
    nextEntryToTransmit = ptxFIFO->nextEntryToTransmit;
    //on entering this routine nextEntryToLoad is set to the entry following the last entry loaded
    //this is what we need to load now unless it's at the end of the FIFO in which case we need to wrap around
    if ( ptxFIFO->nextEntryToLoad >= ptxFIFO->numEntries)
    *actualStartIndex = 0;
    else
    *actualStartIndex = ptxFIFO->nextEntryToLoad;
    //if nextEntryToLoad points to the last entry in the FIFO and nextEntryToTransmit points to the first, the FIFO is full
    //also if nextEntryToLoad == nextEntryToTransmit the FIFO is full and we exit without loading anything
    if (( (( ptxFIFO->nextEntryToLoad >= ptxFIFO->numEntries) && (nextEntryToTransmit == 0)) ||
    ( ptxFIFO->nextEntryToLoad == nextEntryToTransmit)) && (ptxFIFO->nextEntryToLoad != INITIAL_ENTRY)){
    *actualLoaded = 0; //FIFO is full already, we can't add anything
    return 0; //this is not a failure, we just have nothing to do, this is indicated in actualLoaded
    numLoaded = 0;
    lclData = (usint *)data; //must use 16 bit writes to the module
    //conditions are dealt with inside the for loop rather than in the for statement itself
    for (FIFOentry = *actualStartIndex; ; FIFOentry++) {
    //if we reached the end of the FIFO
    //if the module is about to transmit the first element of the FIFO, the FIFO is full and we're done
    //OR if the module is about to transmit the element we're about to fill in, we're done - the
    //exception is if this is the first element we're filling in which means the FIFO is empty
    if ((( FIFOentry >= ptxFIFO->numEntries) && (nextEntryToTransmit == 0)) ||
    ((FIFOentry == nextEntryToTransmit) && (FIFOentry != *actualStartIndex) )){
    *actualLoaded = numLoaded;
    //set nextEntryToLoad to the end of the FIFO, we'll set it to the beginning next time
    //this allows us to distinguish between full and empty: nextEntryToLoad == nextEntryToTransmit means empty
    ptxFIFO->nextEntryToLoad = FIFOentry;
    return 0;
    //we reached the end but can continue loading from the top of the FIFO
    if ( FIFOentry >= ptxFIFO->numEntries)
    FIFOentry = 0;
    //load the control word
    ptxFIFO->FifoData[FIFOentry * 3] = *lclData++;
    //skip the high of the control word, the module only has a 16 bit field for control
    lclData++;
    //now put in the data
    ptxFIFO->FifoData[(FIFOentry * 3) + 2] = *lclData++;
    ptxFIFO->FifoData[(FIFOentry * 3) + 1] = *lclData++;
    numLoaded++;
    //we're done because we loaded everything the user asked for
    if (numLoaded >= numWords) {
    *actualLoaded = numLoaded;
    ptxFIFO->nextEntryToLoad = FIFOentry+1;
    return 0;
    //if we reached here, we're done because the FIFO is full
    *actualLoaded = numLoaded;
    ptxFIFO->nextEntryToLoad = FIFOentry;
    fclose (pFile);
    return 0;
     As you can see, I added a temporary diagnostic with the structures that were created in the "Handles by value" case, and print out the data.  I see what is expected, whichever of the options I pick in the CLN!  
    I understood (from the information in the two links I mentioned in my original post, and from the name of the option itself) that "array data pointer" should pass the array of data itself, without the dimSize field.  But that does not seem to be what is happening.
    Batya
    Attachments:
    ExcM4k Load Transmit FIFO.vi ‏15 KB

  • SOAP Webservice returns Array - how to setup Xcelsius?

    Hello,
    after a lot of tests I have recognized that Xcelsius is not able to handle Webservices which return arrays with an undefined size. So I edited the schema file in the way that the size is defined.
    Here is an extract of the schema file:
    <xsd:sequence>
                <xsd:element name="row0" type="tns:Row" maxOccurs="10" minOccurs="10" ></xsd:element>
    </xsd:sequence>
    With that configuration Xcelsius is able to import the wsdl. But the preview window is showing only one Row Folder, I have excpected "10".  My question is, is my config the right way to handle arrays with Xcelsius and when it is, how I have to set up the range in the Excel Map to make the data avaiable???
    Thank you in advance.
    Best regards,
    Conrad

    Here is an example, you can compare what is different. From the look of it the recipient info is missing from yours. Does it say which INI option is missing when you get an error?
    <doPublishRequest xsi:type="doPublishReq_Import" xmlns="http://webservices.docucorp.com/ewps/schema/2005-12-01">
            <LibraryId>CONFIGNAME</LibraryId>
            <DistributionOptions xsi:type="DistributionOptions_ADHOC" source="ADHOC">
              <Priority>REALTIME</Priority>
              <Channel xsi:type="Channel_IMMEDIATE">
                <PublishType>PDF</PublishType>
                <DistributionType>IMMEDIATE</DistributionType>
                <Disposition location="ATTACH" />
                <Recipient name="ORIGINAL">
                  <Props>
                    <Prop name="" />
                  </Props>
                  <Copies />
                  <Story StoryName="" id="" alias="" />
                </Recipient>
              </Channel>
            </DistributionOptions>
            <SourceType>IMPORT</SourceType>
            <Import>
              <ImportFile xsi:type="ImportFile_ATTACH" d6p1:contentType="" location="ATTACH" xmlns:d6p1="http://www.w3.org/2005/05/xmlmime">O05hdXRpbH.......</ImportFile>
            </Import>
          </doPublishRequest>

  • Invoking stored procedure that returns array(oracle object type) as output

    Hi,
    We have stored procedures which returns arrays(oracle type) as an output, can anyone shed some light on how to map those arrays using JPA annotations? I tried using jdbcTypeName but i was getting wrong type or argument error, your help is very much appreciated. Below is the code snippet.
    JPA Class:
    import java.io.Serializable;
    import java.sql.Array;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import org.eclipse.persistence.annotations.Direction;
    import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;
    import org.eclipse.persistence.annotations.StoredProcedureParameter;
    * The persistent class for the MessagePublish database table.
    @Entity
    @NamedStoredProcedureQuery(name="GetTeamMembersDetails",
         procedureName="team_emp_maintenance_pkg.get_user_team_roles",
         resultClass=TeamMembersDetails.class,
         returnsResultSet=true,
         parameters={  
         @StoredProcedureParameter(queryParameter="userId",name="I_USER_ID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="employeeId",name="I_EMPLOYEEID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="TEAMMEMBERSDETAILSOT",name="O_TEAM_ROLES",direction=Direction.OUT,jdbcTypeName="OBJ_TEAM_ROLES"),
         @StoredProcedureParameter(queryParameter="debugMode",name="I_DEBUGMODE",direction=Direction.IN,type=Long.class)
    public class TeamMembersDetails implements Serializable {
         private static final long serialVersionUID = 1L;
    @Id
         private long userId;
         private List<TeamMembersDetailsOT> teamMembersDetailsOT;
         public void setTeamMembersDetailsOT(List<TeamMembersDetailsOT> teamMembersDetailsOT) {
              this.teamMembersDetailsOT = teamMembersDetailsOT;
         public List<TeamMembersDetailsOT> getTeamMembersDetailsOT() {
              return teamMembersDetailsOT;
    Procedure
    PROCEDURE get_user_team_roles (
    i_user_id IN ue_user.user_id%TYPE
    , o_team_roles OUT OBJ_TEAM_ROLES_ARRAY
    , i_debugmode IN NUMBER :=0)
    AS
    OBJ_TEAM_ROLES_ARRAY contains create or replace TYPE OBJ_TEAM_ROLES_ARRAY AS TABLE OF OBJ_TEAM_ROLES;
    TeamMembersDetailsOT contains the same attributes defined in the OBJ_TEAM_ROLES.

    A few things.
    You are not using a JDBC Array type in your procedure, you are using a PLSQL TABLE type. An Array type would be a VARRAY in Oracle. EclipseLink supports both VARRAY and TABLE types, but TABLE types are more complex as Oracle JDBC does not support them, they must be wrapped in a corresponding VARRAY type. I assume your OBJ_TEAM_ROLES is also not an OBJECT TYPE but a PLSQL RECORD type, this has the same issue.
    Your procedure does not return a result set, so "returnsResultSet=true" should be "returnsResultSet=false".
    In general I would recommend you change your stored procedure to just return a select from a table using an OUT CURSOR, that is the easiest way to return data from an Oracle stored procedure.
    If you must use the PLSQL types, then you will need to create wrapper VARRAY and OBJECT TYPEs. In EclipseLink you must use a PLSQLStoredProcedureCall to access these using the code API, there is not annotation support. Or you could create your own wrapper stored procedure that converts the PLSQL types to OBJECT TYPEs, and call the wrapper stored procedure.
    To map to Oracle VARRAY and OBJECT TYPEs the JDBC Array and Struct types are used, these are supported using EclipseLink ObjectRelationalDataTypeDescriptor and mappings. These must be defined through the code API, as there is currently no annotation support.
    I could not find any good examples or doc on this, your best source of example is the EclipseLink test cases in SVN,
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/plsql/
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/
    James : http://www.eclipselink.org

  • URGENT   HELP::: returning array of non built in datatypes

    Folks,
    I am trying to implement webservices in weblogic7.0 sp2. We have written a simple
    class(say ClassA) which uses another bean as a user defined data type(ClassB implements
    serializable). I am able to create a webservice if one of the method in ClassA
    returns the object of classB.I am getting an error while creating the web-services.xml
    file using ant tool if same method in ClassA returns array of ClassB.It says
    corresponding type is not found in the types.xml. I created types.xml using ant
    tool too.
    Does weblogic7.0 SP2 support returning array of objects in webservices?
    Any suggestions and immediate response is highly appreciated.
    Thanks,
    Kamal.

    Bruce,
    You understand the question correctly..Thanks for the help... it works now.
    Thanks,
    Kamal.
    Bruce Stephens <[email protected]> wrote:
    Hi Kamal,
    If I understand your question correctly, yes, you should be able to do
    this. You will need to create your own implementation of the
    javax.xml.rpc.holders.Holder interface. See:
    http://edocs.bea.com/wls/docs70/webserv/implement.html#1054236 for
    details.
    If that's not what you are asking, could you post a simple test case?
    HTHs,
    Bruce
    BTW, for URGENT issues, please use our excellent support folks:
    http://support.bea.com
    [email protected]
    kamal wrote:
    Folks,
    I am trying to implement webservices in weblogic7.0 sp2. We have writtena simple
    class(say ClassA) which uses another bean as a user defined data type(ClassBimplements
    serializable). I am able to create a webservice if one of the methodin ClassA
    returns the object of classB.I am getting an error while creatingthe web-services.xml
    file using ant tool if same method in ClassA returns array of ClassB.Itsays
    corresponding type is not found in the types.xml. I created types.xmlusing ant
    tool too.
    Does weblogic7.0 SP2 support returning array of objects in webservices?
    Any suggestions and immediate response is highly appreciated.
    Thanks,
    Kamal.

  • InDesign Server (via SOAP) -- Returning Binary Data: Possible or Not?

    is it possible to return binary data to soap client?
    given: myFile = File('MyFancyJpeg.jpg');
    I want to return either a base64 encoded, or hex result back to the SOAP client. (filetype, above, is totally arbitrary, by the way)
    Is InDesign server capable of something like this?

    I think so. See ww-ids-soap.pdf in the SDK. You can return to the client any value you want; the value is typed in the SOAP response. An example from that pdf of a mixed-type array response:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:IDSP="http://ns.adobe.com/InDesign/soap/">
        <SOAP-ENV:Body>
            <IDSP:RunScriptResponse>
                <errorNumber>0</errorNumber>
                <scriptResult>
                    <data xsi:type="IDSP:List">
                        <item><data xsi:type="xsd:string">1</data></item>
                        <item><data xsi:type="xsd:string">2</data></item>
                        <item><data xsi:type="xsd:long">10</data></item>
                        <item><data xsi:type="xsd:long">12</data></item>
                    </data>
                </scriptResult>
            </IDSP:RunScriptResponse>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Jeff

  • Why did Fetch waveform Vi generates strange 1D array data(all elements are -5.2)?

    I just made some changes on the Getting Startted vi of tkds30xx scope driver to catch the start process of a power supply output(2Vdc). I use Initiate Acquisition vi followed by Fetch waveform vi to get the waveform on scope. I use a logical signal controlled by the Agilent 34903A switch to trigue the waveform acquisition. Then I get the 1D array output from Fetch waveform vi for calculation by another subvi. The waveform sample points are 10E+3 points(default). When running the program, the waveforms on the scope screen are right what I expect, but the 1D array data values are all -5.2V.

    Without seeing your code it would be hard to give specifics, but does -5.2V appear anywhere else in the system? One possibility is that you aren't looking at the channel you think you are.
    How much delay is there between when you tell the scope to begin acquisition and the read occurs? Could the read be getting its data before the scope actually triggers?
    What happens when you run the "Fetch Waveform" vi by itself? In other words, if you setup the system and generate the trigger manually such that the proper waveform is on the scope, does Fetch Waveform run by itself return the proper result?
    If this is not correcct there is something basically wrong with the function for reading the waveform. Again, giving specifics are hard, but open the VI and go
    through it statement by statement making sure that the settings and commands make sense for your application. Many vendors make excellent instrumentation, but I have yet to see one that could write a good driver.
    Also, could you describe what the proper waveform looks like?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Xen / pygrub issues: VmError: Boot loader didn't return any data!

    Hardware:
    2x Intel Xeon Quad-Core 2.33GHz
    24GB FBDIMM RAM
    2x 2TB HDD in RAID-1
    Intel Server Board S5400SF
    Setup:
    Arch Linux x86_64
    Xen 4.1.2
    Grub2 Multiboot
    Synopsis:
    I set up a new VM for Debian Squeeze following instructions here: http://www.howtoforge.com/installing-de … 86_64-dom0. Partitioning & installation completed correctly. When I tried to run the VPS afterwards, I got this output:
    | [root@srv0 xen]# xm create -c /etc/xen/xm-debian.cfg
    | Using config file "/etc/xen/xm-debian.cfg".
    | Error: Boot loader didn't return any data!
    I've attached a more complete log output at the end of the mail.
    This is the first VM I have tried to create on this setup.
    Additional:
    I can mount the partition within the lvm:
    | [root@srv0 xen]# kpartx -av /dev/VPS/fennec
    | add map VPS-fennec1 (253:2): 0 83881984 linear /dev/VPS/fennec 2048
    | [root@srv0 xen]# mount /dev/mapper/VPS-fennec1 /mnt
    | [root@srv0 xen]# cd /mnt
    | [root@srv0 mnt]# ls
    | bin   etc      lib     lost+found  opt   sbin     sys  var
    | boot  home      lib32  media         proc  selinux  tmp  vmlinuz
    | dev   initrd.img  lib64  mnt         root  srv        usr
    | [root@srv0 mnt]# cd boot
    | [root@srv0 boot]# ls
    | config-2.6.32-5-amd64  initrd.img-2.6.32-5-amd64  vmlinuz-2.6.32-5-amd64
    | grub               System.map-2.6.32-5-amd64
    | initrd               vmlinuz
    | [root@srv0 boot]# cd grub
    | [root@srv0 grub]# cat menu.lst
    | timeout 5
    | default 0
    |
    | title Linux
    | kernel /boot/vmlinuz root=/dev/xvda1
    | initrd /boot/initrd
    As you can see, the kernel (which is 2.6.32) and vmlinuz (also 2.6.32) exist in the /boot directory.
    Pygrub:
    Attempting to pygrub the VPS LVM gives the following output:
    | [root@srv0 /]# pygrub --kernel=/boot/vmlinuz --ramdisk=/boot/initrd /dev/VPS/fennec
    | Traceback (most recent call last):
    |   File "/usr/bin/pygrub", line 774, in <module>
    |     raise RuntimeError, "Unable to find partition containing kernel"
    | RuntimeError: Unable to find partition containing kernel
    domU Config File:
    | name = "fennec"
    | memory = 1024
    | maxmem = 1024
    | cpus = "2-7"
    | disk = [
    |     'phy:/dev/VPS/fennec,xvda,w',
    |     'phy:/dev/VPS/fennec-swap,xvdb,w'
    | ]
    | vif = ['']
    | bootloader = "pygrub"
    | bootargs = "--kernel=/boot/vmlinuz --ramdisk=/boot/initrd"
    I have tried this with and without the bootargs line without any success.
    About The Filesystem:
    /dev/VPS is a vg on a RAID-1 array
    /dev/VPS/fennec is an lv on VPS vg
    The fennec lv has a single ext3 partition of 40GB
    xend.log Output:
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:103) XendDomainInfo.create(['vm', ['name', 'fennec'], ['memory', 1024], ['maxmem', 1024], ['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['vcpus', 1], ['cpus', '2-7'], ['oos', 1], ['bootloader', '/usr/bin/pygrub'], ['bootloader_args', '--kernel=/boot/vmlinuz --ramdisk=/boot/initrd'], ['image', ['linux', ['videoram', 4], ['tsc_mode', 0], ['nomigrate', 0]]], ['s3_integrity', 1], ['device', ['vbd', ['uname', 'phy:/dev/VPS/fennec'], ['dev', 'xvda'], ['mode', 'w']]], ['device', ['vbd', ['uname', 'phy:/dev/VPS/fennec-swap'], ['dev', 'xvdb'], ['mode', 'w']]], ['device', ['vif']]])
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:2498) XendDomainInfo.constructDomain
    [2012-07-20 09:35:17 907] DEBUG (balloon:187) Balloon: 22794808 KiB free; need 16384; done.
    [2012-07-20 09:35:17 907] DEBUG (XendDomain:476) Adding Domain: 17
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:2836) XendDomainInfo.initDomain: 17 256
    [2012-07-20 09:35:17 25157] DEBUG (XendBootloader:113) Launching bootloader as ['/usr/bin/pygrub', '--output=/var/run/xend/boot/xenbl.15844', '--kernel=/boot/vmlinuz', '--ramdisk=/boot/initrd', '/dev/VPS/fennec'].
    [2012-07-20 09:35:17 907] ERROR (XendBootloader:214) Boot loader didn't return any data!
    [2012-07-20 09:35:17 907] ERROR (XendDomainInfo:488) VM start failed
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 474, in start
        XendTask.log_progress(31, 60, self._initDomain)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendTask.py", line 209, in log_progress
        retval = func(*args, **kwds)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 2838, in _initDomain
        self._configureBootloader()
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 3285, in _configureBootloader
        bootloader_args, kernel, ramdisk, args)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendBootloader.py", line 215, in bootloader
        raise VmError, msg
    VmError: Boot loader didn't return any data!
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:3071) XendDomainInfo.destroy: domid=17
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:2406) No device model
    [2012-07-20 09:35:17 907] DEBUG (XendDomainInfo:2408) Releasing devices
    [2012-07-20 09:35:17 907] ERROR (XendDomainInfo:108) Domain construction failed
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 106, in create
        vm.start()
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 474, in start
        XendTask.log_progress(31, 60, self._initDomain)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendTask.py", line 209, in log_progress
        retval = func(*args, **kwds)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 2838, in _initDomain
        self._configureBootloader()
      File "/usr/lib/python2.7/site-packages/xen/xend/XendDomainInfo.py", line 3285, in _configureBootloader
        bootloader_args, kernel, ramdisk, args)
      File "/usr/lib/python2.7/site-packages/xen/xend/XendBootloader.py", line 215, in bootloader
        raise VmError, msg
    VmError: Boot loader didn't return any data!
    Appreciate any suggestions.

    Hi,
    I have a very similar issue. I've managed to create PVM guests under 3.0.1 and upgraded via YUM to 3.0.3. I now have 2 Hosts and created a guest Server that I downloaded from the Oracle Software Cloud. This boots fine and is accessible. I cannot create a standalone guest (I want to create a RHEL 5 Server) as this gives me the same error. The Server Pool has one Server Pool LUN and one Repo for the Guests.
    I can create the guest and and add a small boot ISO from the ISO Repositiory, which I then intent to Kickstart the rest of the installation. When starting the Guest, the following is received:
    Starting operation 'Virtual Machine Start' on object '0004fb0000060000951b61a25a250dc9 (csitestvl14)'
    Job Internal Error (Operation)com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_4010E Attempt to send command: dispatch to server: gbahel71.gb.xxxxxx.com failed. OVMAPI_4004E Server Failed Command: dispatch https://?uname?:[email protected]:8899/api/1 start_vm 0004fb00000300009edc3a187ae931f0 0004fb0000060000951b61a25a250dc9, Status: org.apache.xmlrpc.XmlRpcException: exceptions.RuntimeError:Command ['xm', 'create', '/OVS/Repositories/0004fb00000300009edc3a187ae931f0/VirtualMachines/0004fb0000060000951b61a25a250dc9/vm.cfg'] failed (1): stderr: Error: Boot loader didn't return any data!
    , stdout: Using config file "/OVS/Repositories/0004fb00000300009edc3a187ae931f0/VirtualMachines/0004fb0000060000951b61a25a250dc9/vm.cfg".
    Edited by: LeeUK on 20-Mar-2012 08:54

  • How to return array of object

    public class A{
    public class B{
    publc C[] sample()
    int i=0;
    ResultSet rset = s.executeQuery("select name, id  from emp ");
    while(rs.next()){
    name = rset.getString("nam");
    id = rset.getInt("id");
    c.setName(name )
    c[i].setId(id)
    return c[]
    public class C{
    // here i have getter and setter metod for name & id
    When I try to return the object c[]..i am getting "cannot conver from C to C[]".
    Can u pls help me, how to return array of object and how to get name and id values in other class using this array object
    Thanks for ur help

    public class Starting{
    public long empID;
    Data data = new Data();
    Value[] value;
    int count = 0;
         public static void executeDe(){
              value = new Value[100]
              try{
                     data.getDetails()
                     processDetails(value);
                   }catch(Exception e){e.printStackTrace();}
         public static void processDetails(Value[] value){
         count = data.i;
              int i;
              for(i=0;i<count;i++){
                  empID=value.getempID(); \\ here i am not getting all values..... am getting only last value of the array
    public class Data{
    public long empID;
    public int i=0;
    static Value[] value = new Value[100];
    public static Value[] getDetails(){
    Connection con=null;
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con=DriverManager.getConnection("jdbc:oracle:thin:@" + hostname + ":1521:" + sid, user, password);
    System.out.println(" conn " + con);
    System.out.println("");
    Statement s=con.createStatement();
    try{
         ResultSet rset = s.executeQuery("select EMPID from Employee ");
         while(rset.next()){
    empID = rset.getLong("EMPID");
    value[i].setCycleID(cy_i);
    i++;
         rset.close();
         con.close();
    }catch (SQLException sqle){sqle.printStackTrace();}
         finally{
              try{
              s.close();
         con.close();
              }catch(SQLException e){e.printStackTrace();}
    catch(Exception e){e.printStackTrace();}
    return value;
         public class Value {
         public static long cycleID;
              public static void setempID(long empID) {
                   Value.empID = empID;
              public static long getempID() {
                   return empID;
    This is my actual code..... I am able to set the values in Value class from Data class using getDetails() method, which is returning array of value object.
    In Starting class, I am trying to get values using value[i].. i am getting last value of the array. This is my actual problem... here i want to get all values.
    Please help me how to resolve this.

  • Table with object array data provider

    hi!
    i use the studio creator table and want to fill it with an object array data provider!
    i have an array and the getter:
      public TanData[] getTanDataArray()
            return tanDataArray;    
        }i choosed this for the data provider and in table layout i choose the dataprovider, but when i run my application there are no datas found although the array isn't empty!

    maybe this is a problem:
    i got my data from a database table and i store it in a vector.
    in the example they have a class WeekBean and they fill their array with
       WeekBean[] weeks = {
                new WeekBean(1),
                new WeekBean(2),
                new WeekBean(3),
                new WeekBean(4)
            };and i tried to do this:
        private Vector<TanData> tanDataList = new Vector();
        private TanData[] tanDataArray;
       getTanDataList().copyInto(tanDataArray);could it be that that isn't correct?

  • Return array of chars

    hi, i'm from Brasil.
    i make a code which use JNI and call a function in C. The function in C print all oppeneds window's names.
    but i want whick the function in C return array of char with the names of the windows.
    //code in java
    public class WindowList {
         private native void listAllWindows();
         public static void main(String[] args) {
              WindowList wl = new WindowList();
              wl.listAllWindows();
         static{
              System.loadLibrary("WindowList");
    //code in C
    #include <windows.h>
    #include <stdio.h>
    #include "WindowList.h"
    JNIEXPORT void JNICALL Java_WindowList_listAllWindows(JNIEnv *env, jobject obj)
        char vetor[50][256];      //i want return this array.
        int i = 0;
        HWND janela = NULL;
        janela = GetDesktopWindow();
        janela = GetWindow(janela, GW_CHILD);
        while(janela != NULL){
            if(IsWindowVisible(janela)){
                SendMessage(janela,WM_GETTEXT,256,(LPARAM)vetor);
    printf("%s\n", vetor[i]);
    i++;
    janela = GetWindow(janela, GW_HWNDNEXT);
    how return the array of chars?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    souarte wrote:
    but i want whick the function in C return array of char with the names of the windows. I doubt that.
    What you want is to return an array of strings.
    Conceptually it is the same as if you were doing it in java.
    - Get a size
    - Create the array with that size
    - Iterate through the array and for each index...
    ....-Create a string with data
    ....-Assign to the array.
    Naturally it is going to take a lot more code to do this in C than in java.

  • Discoverer Report  returning ' no data  found '

    Hi  ...
    i  have an issue with one discoverer  report  .
    Discoverer report  name : EDI Price Exception Report.
    when i ran the report  in Discoverer  Desktop edition  It is returning 'No Data Found ' But  i am taken the  Query from admin edition  and tried to  ran in  PL/SQL Developer/TOAD  by setting  Org_id condition
    it's returning Data  . the Desktop Edition of Discoverer for  some specific date  Range  it's giving Data  But  from last month on wards  it's not returning any Data.
    in Discoverer Report  Desktop  it's not retuning the Data from  November to till date
    Oracle  Applications  11i
    Discoverer 4i
    Oracle Data base :9i 
    OS : Windows.
    Attached the Sql  which i used to generate the Report :
    I HAVE USED THE FOLLOWING  :-for initialize the profile options
    EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
    EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
      SELECT A.CUST_PO_NUMBER,
             A.ORDER_NUMBER,
             A.ORDERED_DATE,
             A.ORDER_TYPE,
             -- C.CUSTOMER_ID,
             C.CUSTOMER_NUMBER,
             C.CUSTOMER_NAME,
             B.LINE_NUMBER,
             B.ORDERED_ITEM,
             MSI.SEGMENT1 ACCO_ITEM,                               -- GRW 20060407
             MSI.DESCRIPTION,
             -- MSI.INVENTORY_ITEM_ID,
             (SELECT MCI.CUSTOMER_ITEM_NUMBER
                FROM MTL_CUSTOMER_ITEMS MCI,
                     MTL_CUSTOMER_ITEM_XREFS MCIX,
                     MTL_SYSTEM_ITEMS_B MSIB
               --  MTL_PARAMETERS          MP
               WHERE     MCI.CUSTOMER_ID = C.CUSTOMER_ID                 --1814924
                     AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
                     AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
                     AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID   --869899
                     AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
                     AND MTP.ORGANIZATION_CODE = 'BRM'
                     AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
                     AND NVL (mci.inactive_flag, 'N') <> 'Y'
                     AND NVL (mcix.inactive_flag, 'N') <> 'Y')
                CUSTOMER_ITEM,
                     XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
             B.ORDERED_QUANTITY,
             B.PRICE_LIST,
             B.UNIT_SELLING_PRICE,
             B.UNIT_LIST_PRICE,
                   TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
             apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                B.ordered_item,
                                                B.header_id,
                                                B.line_number,
                                                B.unit_selling_price,
                                                B.attribute7,
                                                B.pricing_quantity_uom,
                                                B.attribute4)
                CUST_SENT_PRICE_CONVERTED,
             ABS ( (B.UNIT_SELLING_PRICE
                    - apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
                                                         B.ordered_item,
                                                         B.header_id,
                                                         B.line_number,
                                                         B.unit_selling_price,
                                                         B.attribute7,
                                                         B.pricing_quantity_uom,
                                                         B.attribute4)))
                DIFFERENCE,
                      MTP.ORGANIZATION_CODE,
             B.SHIP_TO_LOCATION
        FROM OE_ORDER_HEADERS_V A,
             OE_ORDER_LINES_V B,
             RA_CUSTOMERS C,
             MTL_PARAMETERS MTP,
             MTL_SYSTEM_ITEMS_B MSI
       WHERE     A.HEADER_ID = B.HEADER_ID
             AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
             -- Added by Gati on 19-Oct-2012, tkt - INC000000118962
             AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
                                      C.customer_number,
                                      B.ordered_item,
                                      B.header_id,
                                      B.line_number,
                                      B.unit_selling_price,
                                      B.attribute7,
                                      B.pricing_quantity_uom,
                                      B.attribute4)),
                        2) <> B.UNIT_SELLING_PRICE
             --AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
             --AND     a.ship_from_org_id = mtp.organization_id
             AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID          -- GRW 20060413
             --AND     a.ship_from_org_id = msi.organization_id
             AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID          -- GRW 20060413
             AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID       -- GRW 20060407
             AND A.ORDER_SOURCE_ID = 6
             AND A.ORG_ID = B.ORG_ID
             AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between  '01-NOV-2013' and  '03-NOV-2013'
             and mtP.organization_code='BRM'
                      AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
                               FROM HR_OPERATING_UNITS HOU
                              WHERE HOU.NAME = '50 ACCO Canada')
             AND B.cancelled_flag <> 'Y'
             AND B.flow_status_code <> 'CANCELLED'
             AND B.ORDERED_ITEM <> 'INVALID_ITEM'
    ORDER BY a.order_number

    Hi,
    Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
    I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
    You may find another condition or join that limits your data.
    Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
    begin
      fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
    end

  • Discoverer report returns no data from a certain time

    Using Discoverer 10g,a discoverer report which returned data normally last month gets to return no data now.
    We have four same environments, and two of them has this problem, two is OK.
    And the SQL of the discoverer of the four environments are the same.
    We have no any changment of this discoverer and related EUL for more than one year....
    How should we investigate into this issue.
    For example ,a point we should notice or something...
    Could somebody give us a suggestion?
    Thank you.

    Thanks for your qiuck reply.
    1.empty table that is joined in the query.The four environments has almost the same data,it is not the cause.
    2.security issue with the data, maybe the security definitions are different from one environment to another.we are now invesgate into this cause.
    and there is a sql of the discoverer's EUL which shows no data in a enviroment(in this enviroment discoverer report gets no data), but in another enviroment data can show.
    the sql is as following.
    =============
    SELECT loc_bu.org_id
    ,loc_bu.location_id building_id
    ,loc_bu.building building_name
    ,loc_bu.location_code building_number
    ,loc_fl.location_id floor_id
    ,loc_fl.location_code floor_number
    ,loc_fl.floor floor_name
    ,loc_of.location_id office_id
    ,loc_of.location_code office_number
    ,loc_of.office office_name
    ,loc_of.suite office_suite
    ,loc_of.location_alias office_alias
    ,loc_of.assignable_area office_assignable_area
    ,loc_of.space_type_lookup_code office_space_type_code
    ,lst.meaning office_space_type
    ,loc_of.function_type_lookup_code office_function_type_code
    ,fun.meaning office_function_type
    ,(SELECT ffv.description
    FROM fnd_flex_values_vl ffv
    ,fnd_flex_value_sets ffvs
    WHERE ffv.flex_value = loc_of.attribute1
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'MB_PN_ON') occupancy_exception_flag
    ,loc_of.active_start_date
    ,loc_of.active_end_date
    --ADD BY KEVIN 2008/6/26 START
    ,loc_of.attribute7 division_code_office
    ,(SELECT ffv.description
    FROM fnd_flex_values_vl ffv
    ,fnd_flex_value_sets ffvs
    WHERE ffv.flex_value = loc_of.attribute7
    AND ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'MB_PN_DIVISION') division_description_office --ヌヨ-ホ・ヒオテ・
    --ADD BY KEVIN 2008/6/26 END 
    FROM pn_locations loc_bu
    ,pn_locations loc_fl
    ,pn_locations loc_of
    ,fnd_lookups fun
    ,fnd_lookups lst
    WHERE loc_bu.location_id = loc_fl.parent_location_id
    AND loc_bu.location_type_lookup_code IN ('LAND', 'BUILDING')
    AND nvl(loc_bu.attribute6, '99') <> '01'
    AND loc_fl.location_id = loc_of.parent_location_id
    AND loc_fl.location_type_lookup_code IN ('FLOOR', 'PARCEL')
    AND nvl(loc_fl.attribute6, '99') <> '01'
    AND loc_of.location_type_lookup_code IN ('OFFICE', 'SECTION')
    AND nvl(loc_of.attribute6, '99') <> '01'
    AND loc_of.function_type_lookup_code = fun.lookup_code(+)
    AND fun.lookup_type(+) = 'PN_FUNCTION_TYPE'
    AND loc_of.space_type_lookup_code = lst.lookup_code(+)
    AND lst.lookup_type(+) = decode(loc_of.location_type_lookup_code,
    'OFFICE',
    'PN_SPACE_TYPE',
    'SECTION',
    'PN_PARCEL_TYPE')
    AND nvl(loc_of.space_type_lookup_code,'99') <> '07';
    ====================
    Ps.before excute this sql, we always first excute following command.
    ====
    begin
    fnd_client_info.set_org_context(117);
    end;
    ====
    The analyst of our team is not very good at the security problem, could you help us?
    Thanks a lot.

Maybe you are looking for

  • Reading Opaque data from jms queue  and decoded  in java embedding

    Hi , Objective:Fetch text message from queue and print it from java embedding in BPEL I am fetching text message from a jms queue using JMS adapter in BPEL.Then converting the opaque data(Base64 binary)to string using java embedding.My build got succ

  • Data recovery for Iphone 4s that was wiped

    Hello forum. Thank you for taking the  time to review my question.  I have an Iphone 4s that  a client wiped (reset)  The phone is currently in set up mode.  My client had data (photos, notes, contacts) that were NOT backed up and were on the phone,

  • CLSD of production orders

    Hi SAP experts, I would like to understand what is CLSD that is closure of  production orders. Is it a must & what is the advantage. Particularly in our case, We have roughly 1500 orders getting released per month. When the CO settlement is undertake

  • Please help--some text not displayed.

    I used to be able to use Reader with no issues but suddenly only the basic text is viewable--Title blocks, big fonts, etc are hidden in solid black rectangles--other computers display these pages fine.  Not sure if this began before or after I update

  • Call another component on fire plug..

    Hi All Assume the following set up - Comp A (view1) and Comp B (view2). I enter some data in view1 and it should be displayed in view2. Via the Interface controllers, I have done the relevant mappings so that data of Comp A (view 1) can be accessed i