Problem with byte array arguments in webservice method call

I am using JWSDP 1.5 to generate client stubs for a webservice hosted on a Windows 2000 platform.
One of the methods of the webservice contains a byte array argument. When our application calls this method passing the contents of a TIFF file as the byte array, the method is failing. I have discovered that tthe reason for the failure is that the byte array in the SOAP message has been truncated and is missing its terminating tag.
Is this a known problem in JWSDP 1.5? Is there a fix for it? Does JWSDP 1.6 resolve this problem?
Any assistance will be much appreciated.
Regards,
Leo

I'd like to add the the webservice being invoked by the generated client stubs is rpc/encoded.

Similar Messages

  • Repost: Problem with byte array

    i wrote the following code:
    public class Test {
    byte [] ba = new byte[10];
    void print(String s) { System.out.println(s); }
    void printInitialValues() {
    for (int i=0; i<10; i++)
    ba = (byte)0;
    //System.arraycopy("asdf".getBytes(), 0, ba, 0, 4);*/
    print("byte array " + ba);
    public static void main(String[] args) {
    Test iv = new Test();
    iv.printInitialValues();
    }why the output isn't the string of the serial '0', instead, it seems the random output.
    when i put the line "System...." to the code, the result is the same.
    Can anybody tell me why?
    Regards,
    Jason

    Your byte[] is an object of the type Array. Array does
    not override toString(), and thus you get the default
    Object.toString() behavior. If you want to print out
    the array elements, you'll need to iterate through the
    array manually.And in 1.5 you can use this:
    Arrays.toString(byteArray);/Kaj

  • Problem with byte array

    i wrote the following code:
    public class Test {
    byte [] ba = new byte[10];
    void print(String s) { System.out.println(s); }
    void printInitialValues() {
    for (int i=0; i<10; i++)
    ba[i] = (byte)0;
    //System.arraycopy("asdf".getBytes(), 0, ba, 0, 4);*/
    print("byte array " + ba);
    public static void main(String[] args) {
    Test iv = new Test();
    iv.printInitialValues();
    why the output isn't the string of serial '0', instead, it seems the random output.
    when i put the line "System...." to the code, the result is the same.
    Anybody can tell me why?
    Regards,
    Jason

    Continued [url http://forum.java.sun.com/thread.jsp?forum=31&thread=551032&tstart=0&trange=15]here.

  • Problem with an array (Array index out of bounds)

    Hey guys, i have a problem with an array, i just want to print a few things but it won't let me because of this error, here's my code
         public static void MosDat()
              int i;
              for(i=0 ; i<n ; i++);
                   Client [ i ].print1();
                   Client [ i ].print2();
              return;
         }//MosDat
    where "n" is a global variable, and client is .
    I pretty much know how it woks, so i tried it like this and gave "n" the value of "1":
    public static void MosDat()
              int i;
              for(i=0 ; i<n ; i++);
                   Client [ 0 ].print1();
                   Client [ 0 ].print2();
              return;
         }//MosDat
    the printing methods i created worked prefectly when i tried it like that... so i really don't know where the problem could be... thanks anyone who can help me.

    for(i=0 ; i < n ; i++);I spy with my little eye,
    one semicolon too many.Well-spotted. ;-)Practicing on those weird question marks is my secret training.

  • Problem with an array

    i have problem with my program i implement saveing method
    but when i open file( game.txt) it does not update my board it return same postion every time i same game
    chess class Jframe(Jfilechooser)(call an board array)---->
    Gui Japplet class( call and board array------------>
    Board(class Jpanel have board array)
    it does not update borad array
    it just call it once in start and return the same value every time
    classChess(){
    ChessPlayer  java = new ChessPlayer();
    public  void saveData()
        File file = null;
       JFileChooser fc = new JFileChooser();
       fc.setCurrentDirectory(new File("."));
        fc.setDialogTitle("Save Text As...");
       int returnVal = fc.showSaveDialog(this);
       if (returnVal == JFileChooser.APPROVE_OPTION)
       { file = fc.getSelectedFile();
         try
         { PrintWriter out =
          new PrintWriter(
         new BufferedWriter(
           new FileWriter(file)));
         //while for all the moves in the array>
    for (int i=0;i<120;i++)
         out.println( java.saveDAta(i));
         out.println("\n");
         out.close();
         catch (IOException e) {
              // Some error has occured while trying to read the file.
                // Show an error message.
             JOptionPane.showMessageDialog(this,
                   "Sorry, some error occurred:\n" + e.getMessage());}
    public static void main(String[] args) {
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);
         JFrame frame = new ChessMan();
         Container content = frame.getContentPane();
         ChessMan f = new ChessMan();
              //japplet
         ChessPlayer  javaAppletication = new ChessPlayer();
            javaAppletication.init();
            javaAppletication.start();
       }Gui
    [Gui]
    class Gui{
    int [] board = new int [120];
         int [] boardcolor = new int [120];     
    Board check = new Board(this,false);
    {public void init()
         {        // Create new Border
         contentPane = getContentPane();
         bboard = new Board(this,false);
    public String saveDAta(int i)
    String l=check. save(i);
    return (l);
    and finally board Jpanel
    class Board extends JPanel
    {public Board (JApplet useapplet,boolean bool) {
       setup();
    { public String  save(int i)
         {  String l;
                   if (color==1)
                 {System.out.println("notpossible");}
               l =  board[i]+"$"+boardColor;
    return l;
    thanks guys

    My Jframe
    public class ChessMan extends JFrame implements ActionListener, WindowListener  {
    JMenuItem saveItem, loadItem, copyItem, pasteItem; 
    JMenu fileMenu, editMenu; 
    JMenuBar bar;
    ChessPlayer  java = new ChessPlayer();
    public ChessMan()  { setTitle("CHESS PLAYER GAME" );
    setSize(200,300);
    System.out.println("\n");      }
    addWindowListener(new java.awt.event.WindowAdapter()
         {      public void windowClosing(java.awt.event.WindowEvent e)
         {        System.exit(0);      }    });
    JMenu fileMenu = new JMenu("File");
    saveItem = new JMenuItem("Save");
    saveItem.setActionCommand("save");
    saveItem.setAccelerator( KeyStroke.getKeyStroke("ctrl S"));
    saveItem.addActionListener(this);
    fileMenu.add(saveItem);
    loadItem = new JMenuItem("Load");
    loadItem.setActionCommand("load");
    loadItem.setAccelerator( KeyStroke.getKeyStroke("ctrl L"));
    loadItem.addActionListener(this);
    fileMenu.add(loadItem);
    JMenu editMenu = new JMenu("About");
    copyItem = new JMenuItem("Help");
    copyItem.setActionCommand("Help");
    copyItem.setAccelerator( KeyStroke.getKeyStroke("ctrl H"));
    copyItem.addActionListener(this);
    editMenu.add(copyItem);
    pasteItem = new JMenuItem("Exit");
    pasteItem.setActionCommand("Exit");
    pasteItem.setAccelerator( KeyStroke.getKeyStroke("ctrl E"));
    pasteItem.addActionListener(this);
    editMenu.add(pasteItem);
    JMenuBar bar = new JMenuBar();
    bar.add(fileMenu);
    bar.add(editMenu);
    setJMenuBar(bar);
    setVisible(true);
    setLocation(0,0);
    public void actionPerformed(ActionEvent e) {
    JMenuItem item = (JMenuItem)e.getSource();
    String    ac   = item.getActionCommand();
    System.out.println("ac = "+ ac);
    // you can use action commands to track menu item events   
    if(ac.equals("save"))
         {System.out.println("ac.equals(\"save\") = "+ ac.equals("save"));
            saveData();}
    if(ac.equals("load"))
    {System.out.println("ac.equals(\"load\") = "+ ac.equals("load"));
                         loadingData();}
       if(ac.equals("Help"))
    {System.out.println("ac.equals(\"load\") = "+ ac.equals("Help"));
    if(ac.equals("Exit"))
    {System.out.println("ac.equals(\"load\") = "+ ac.equals("Exit"));
                         Exit();}                   
    // the event origin  
    if(item == saveItem)
         System.out.println("item = "+ item.toString().substring
         (item.toString().indexOf("text=") + 5, item.toString().lastIndexOf("]")));
    if(item == loadItem)
         System.out.println("item = "+ item);
    //   System.out.print( java.saveDAta());
    public  void saveData()
        File file = null;
       JFileChooser fc = new JFileChooser();
       fc.setCurrentDirectory(new File("."));
        fc.setDialogTitle("Save Text As...");
       int returnVal = fc.showSaveDialog(this);
       if (returnVal == JFileChooser.APPROVE_OPTION)
       { file = fc.getSelectedFile();
         try
         { PrintWriter out =
          new PrintWriter(
         new BufferedWriter(
           new FileWriter(file)));
         //while for all the moves in the array>
    for (int i=0;i<120;i++)
         out.println( java.saveDAta(i));
         out.println("\n");
         out.close();
         catch (IOException e) {
              // Some error has occured while trying to read the file.
                // Show an error message.
             JOptionPane.showMessageDialog(this,
                   "Sorry, some error occurred:\n" + e.getMessage());}
       public  void loadingData()
       File loadfile = null;
       JFileChooser fc = new JFileChooser();
          fc.setDialogTitle("OpenFile...");
       fc.setCurrentDirectory(new File("."));
        int returnVal = fc.showOpenDialog(this);
       if (returnVal == JFileChooser.APPROVE_OPTION)
       { loadfile = fc.getSelectedFile();
          try
         { PrintWriter out =
         new PrintWriter(
         new BufferedWriter(
           new FileWriter(loadfile)));
         //while for all the moves in the array>
            out.println("�����������������");
         out.println("\n");
         out.close();
         catch (IOException e) {
              // Some error has occured while trying to read the file.
                // Show an error message.
             JOptionPane.showMessageDialog(this,
                   "Sorry, some error occurred:\n" + e.getMessage());}
    public void Exit()
    System.exit(0);
    public static void main(String[] args) {
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);
         JFrame frame = new ChessMan();
         Container content = frame.getContentPane();
         ChessMan f = new ChessMan();
         f.setLocation(300,300);
         f.show();
                 ImageIcon customImageIcon = new ImageIcon("ac516.gif");
              Image customImage = customImageIcon.getImage();
              frame.setIconImage(customImage);
                 //japplet
         ChessPlayer  javaAppletication = new ChessPlayer();
         // i could not put my constructor here <Static>     
    javaAppletication.init();
    javaAppletication.start();
    // for(int i=0; i < .length(); i++)
    content.add(javaAppletication, BorderLayout.CENTER);
         frame.getContentPane();
    javaAppletication.setBackground (Color.black);
         frame.setVisible(true);
    frame.show();
    frame.pack(); // invokes getPreferredSize()
    // invokes paint();
    public void windowOpened(WindowEvent e) {
    fileMenu.doClick();
    public void windowClosing(WindowEvent e) {}
    public void windowClosed(WindowEvent e) {}
    public void windowIconified(WindowEvent e) {}
    public void windowDeiconified(WindowEvent e) {}
    public void windowActivated(WindowEvent e) {}
    public void windowDeactivated(WindowEvent e) {}
    My Japplet Class
    class ChessPlayer extends JApplet
         implements ActionListener,MouseListener              
    int c;
         //Reference for new Board
               Board bboard;
         //Reference for Button
             JButton newgame,undo,onePlayer,TwoPlayer,NormalPieceSet,
             FuunyPieceSet,startButton,stopButton;
         //Reference for Label  
              JLabel message;
        //Reference for new Panel
             JPanel buttonpanel2,buttonpanel,messagepanel,buttonpane;
         //Initilize the  Applet
          DemoAnimation Demo;
          Container contentPane;
           Board check = new Board(this,false);
               int [] board = new int [120];
           int [] boardcolor = new int [120];
         public void init()
                   // Create new Border
            contentPane = getContentPane();
         check = new Board(this,false);          
         bboard = new Board(this,false);
         bboard.setPreferredSize(new Dimension(500,400));
        bboard.setBorder(BorderFactory.createLineBorder( Color.red ) ); 
         contentPane.add(bboard);   
         final ImageIcon image = new ImageIcon("ac516.gif");
         bboard.addMouseListener(this);
         bboard.setBackground (Color.black); 
         BorderLayout text=new BorderLayout();
        Demo = new DemoAnimation( this );
         Demo.setPreferredSize(new Dimension(160, 500));
         contentPane.add(Demo);
        // Set Background Black
         contentPane.setBackground (Color.black); 
         contentPane.setLayout (new BorderLayout (50,50));
         // set new Font "TimesRoman"
         Font Text= new Font("TimesRoman", Font.BOLD,15);
         //panel to keep buttons together
         buttonpanel=new JPanel();
         buttonpanel.setLayout(new GridLayout(1,2,6,0));
         buttonpanel.add(newgame=new JButton("new game",image));
         newgame.addActionListener(this);
         buttonpanel.add(undo=new JButton("undo"));
         undo.addActionListener(this);
         // Create new Choice Panel                      
         buttonpanel2 = new JPanel();
         buttonpanel2.setLayout(new GridLayout(6,1,0,10));
         buttonpanel2.add(onePlayer=new JButton("Change Colour"));
         onePlayer.addActionListener(this);
         buttonpanel2.add(TwoPlayer=new JButton("Statistic"));
         TwoPlayer.addActionListener(this);
         buttonpanel2.add(NormalPieceSet=new JButton("Quit"));
         NormalPieceSet.addActionListener(this);
         buttonpanel2.add(FuunyPieceSet=new JButton("Change Piece"));
        FuunyPieceSet.addActionListener(this);
        buttonpanel2.add(startButton = new JButton("Start Animation"));
         startButton.addActionListener(this);
         buttonpanel2.add(stopButton  = new JButton("Stop Animation"));
         stopButton.addActionListener(this);
            contentPane.add(BorderLayout.WEST, demopanel);
    // Set Font For Text Message
         setFont(Text);
         messagepanel=new JPanel();
         messagepanel.setBorder(BorderFactory.createLineBorder( Color.red ) );
         messagepanel.setBackground(Color.black);
    //     essagepanel.setLayout(new GridLayout(1,1));
         // Create new Label
         messagepanel.add(message = new JLabel());               
         setMessage("Welcome");
         // Postion panels in  Layout                
         contentPane.add("North",buttonpanel);
         contentPane.add("East",buttonpanel2);
         contentPane.add ("South",messagepanel);     
         contentPane.add ("Center",bboard);
         contentPane.add("West",Demo);
    public void mouseReleased(java.awt.event.MouseEvent e)
    {  statuseChange();}
    public void mouseClicked(java.awt.event.MouseEvent e)
    public void mouseEntered(java.awt.event.MouseEvent e) {     
    public void mouseExited(java.awt.event.MouseEvent e) {
    public void mouseMoved(java.awt.event.MouseEvent e) {
    statuseChange();
    public void mousePressed(java.awt.event.MouseEvent e)
    {statuseChange();
    public void actionPerformed(ActionEvent e)
         Object source=e.getSource();
         if (source == newgame)
              {  bboard.newgame();
                yellow();
              setMessage("try again");
              pause(100);
              c=add(c);
         else if (source==undo)
                  yellow();
              bboard.undo();
         setMessage("Undo");
         else if (source== TwoPlayer )
              //bboard.setup();
                 yellow(); 
              setMessage("Starting new Game");
         setMessage("Change Color");
         else if(source == FuunyPieceSet)
              {yellow();
              setMessage("game played::" +c);
              bboard.PieceChange();
         else if(source == NormalPieceSet)
              {yellow();
              setMessage("GOODBYE");
              destroy();
          else if(source == startButton)
              {yellow();
              setMessage("Start Animation");
              Demo.start();
         else if(source == stopButton)
              {yellow();
              setMessage("Stop Animation");
              Demo.stop();
              else if(source == onePlayer)
              {setMessage("");
              bboard.changePiece();
              setMessage("Change Color");
           public void statuseChange()
                switch (bboard.gameStatus())
            case 1:
                red();
               setMessage("White won");
           break;
      case 2:
            red();
            setMessage("Black won");
         break;
      case 3:
          red();
           setMessage("DRAW");
         Demo.changeAnimation(2);
           break;
      case 4:
           white();
           setMessage("White Turn");
           Demo.changeAnimation(1);
           break;
      case 5:
           green();
           setMessage("Black turn");
           Demo.changeAnimation(3);
         break;
      case 6:
           red();
            setMessage(" Check");
            Demo.changeAnimation(4);
              break;
      case 7:
           red();
           setMessage("Check");     
            Demo.changeAnimation(4);
            break;
      case 8:
           yellow();
           setMessage("I Hope you enjoyed it");     
    public String saveDAta(int i)
    String l=check.save(i);
    return (l);   
    public void LoadData(String load)
    public void setMessage(String s)
                /*The string s will be shown to the user.*/
         Font Text= new Font("Courier", Font.BOLD,30);
                       message.setText(s);
                       message.setFont(Text);
              public void white()
                   {  message.setForeground(Color.white);}
              public void green()
                     message.setForeground(Color.green);
                   public void red()
                          message.setForeground(Color.red);
                   public void yellow()
                        message.setForeground(Color.yellow);
             //  pause method       
              void pause(int time)
      try {Thread.sleep(time);
    }     catch (InterruptedException e)
         // Create new inset Object
         public Insets getInsets()
         return new Insets(50,220,150,200);
    public void destroy()
    contentPane.remove(buttonpanel2);
    contentPane.remove(buttonpanel);
    contentPane.remove(bboard);
    contentPane.repaint();
    Demo.start();
    public int add(int x)
         { int b=x+1;
          return b;
    }tanx man i dont the other two because they are to long
    my is when i open jframe
    i think Japplet and Jframe can not commuinicate to each other

  • TS2755 I am having a problem with getting notified when I receive a call or a text.  My phone will not ring or vibrate.

    I am having a problem with getting notified when I receive a call or a text.

    Hi BigBroMAC,
    The first thing I would check is Do Not Disturb mode, as this will cause that behavior:
    iOS 6: Using Do Not Disturb
    http://support.apple.com/kb/HT5463
    If that isn't the issue, this article has slightly different symptoms but the troubleshooting would be the same:
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    Before you do step 10, however, I recommend resetting all settings to see if that helps.  To do that, choose Settings > General > Reset > Reset All Settings.
    I hope this helps!
    - Ari

  • Problem with byte[].length

    dear sir
    I am working with javacard 2.2.2, windows, jdk 1.5 and JCWDE
    I would like to know the byte length of an array ("aCrypter" in this fallowing code)
    1     public byte[] cryter(byte[] Crypter){
    2
    3          ecipher.init(key, Cipher.MODE_ENCRYPT);
    4          ecipher.doFinal(Crypter, (short)0, (short)aCrypter.length, donneeCrypter , (short)0);
    5          
    6          return donneeCrypter;
    7     }
    JCVM return an error on line 4 (it works with "(short)1"
    there is a solution to know the array length?
    regards
    Alexis
    Edited by: Alexis &amp;quot;le francais&amp;quot; on 21 mars 2011 07:33

    thanks for your help.
    In fact I would like to crypt and after decrypt with this fallowing code:
           private byte[] Crypto = {(byte)0xA0, (byte)0x00,
                 (byte)0x00, (byte)0x00, (byte)0x62, (byte)0x03, (byte)0x01, (byte)0x0C,
                 (byte)0x0f, (byte)0x01, (byte)0x01};
    public void process(APDU apdu) throws ISOException {
              // TODO Auto-generated method stub
              byte[] buffer = apdu.getBuffer();
              if (this.selectingApplet()) return;
              if (buffer[ISO7816.OFFSET_CLA] != CLA_MONAPPLET) {
                   ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
              switch (buffer[ISO7816.OFFSET_INS]) {
                   case INS_INTERROGER_COMPTEUR:
                        tab = new byte[1000];
                        tab[0]= compteur;               
                        tableau = cryter(tab);
                        tableau2= decrypter(tableau);                    
                        apdu.setOutgoing();
                        apdu.setOutgoingLength((short) 7);
                        apdu.sendBytesLong(tableau2,(short) 0, tableau2.lenght);
                        break;          
         public void initialisation(){
            key = (DESKey)KeyBuilder.buildKey(KeyBuilder.TYPE_DES_TRANSIENT_DESELECT,KeyBuilder.LENGTH_DES, false);
            key.setKey(Crypto, (short)0);
            ecipher = Cipher.getInstance(Cipher.ALG_DES_CBC_ISO9797_M2,false);
         public byte[] decrypter(byte[] aDecrypter){
              ecipher.init(key, Cipher.MODE_DECRYPT);
              donneeDecrypte = new byte[10000];
              ecipher.doFinal(aDecrypter, (short)0, (short)aDecrypter.length, donneeDecrypte, (short)0);
              return donneeDecrypte;
         public byte[] cryter(byte[] Crypter){
              ecipher.init(key, Cipher.MODE_ENCRYPT);
              donneeCrypter = new byte[10000];
              ecipher.doFinal(Crypter, (short)0, (short)Crypter.length, donneeCrypter, (short)0);
              return donneeCrypter;
         }Now "crypter" method is executed, but when the debugger is at this fallowing line there is a problem :
    tableau2= decrypter(tableau);maybe the size of the array?
    >
    return ecipher.doFinal(aCrypter);
    >
    I work with Javacard 2.2.2, this method does not exist in the API only :
    abstract short doFinal270(byte[] inBuff, short inOffset, short inLength,byte[] outBuff, short outOffset)Edited by: le francais on 22 mars 2011 03:07

  • Problem With Referenced Array Loading

    Hi. I'm working on the final lab for my java class at the moment, and I'm to create a program which reads a file containing transaction records, stores each record as an array element, and then prints various types of reports using the array of transactions. I've created a class called Transaction which stores all the data for each transaction, and the array used in my program is of type Transaction.
    I'm not having any problems in writing the program, except there's something going wrong with my attempt to write a method to load the array. The method declaration is:
    *  Method to accept a file from the user and load its data into an array.
    *  Returns the number of elements added to the array.
    public static int loadArray(Transaction[] transactionArray, int size) throws ExceptionNow, I'm under the impression (and my teacher confirmed this) that arrays are passed by reference. So I'm assuming that by creating an array in my main method, passing it into loadArray(), and changing the values within the method, all the data will be present in the array within main without having to explicitly return the loaded array.
    However, as soon as I try to do anything with the loaded array, I get a NullPointerException. I opened up the debug mode, set a breakpoint in my main right after loadArray() is called, and it shows that every element in my array is null. I am at a loss as to why. If anyone can help me figure out why my reference array isn't staying updated as it's edited elsewhere, it would be greatly appreciated.
    Here is my loadArray() code in case it would help, but there is no error in it's execution, as the same code directly in my main method works fine.
         public static int loadArray(Transaction[] transactionArray, int size) throws Exception
              int logicalSize = 0; // the number of transactions loaded into the array
              int itemID; // the item ID involved in the transaction
              int units; // the number of units in the transaction
              double unitCost; // the cost of each unit in the transaction
              char type; // the type of the transaction
              String date; // the date of the transaction
              String fileName; // the name of the user selected file
              String record; // the current record in the file
              Scanner file; // reads input from a user selected file
              Scanner parse; // reads input from the file's current record
              transactionArray = new Transaction[size]; // creates a new array for the new data
              System.out.print("Please enter a file name: ");
              fileName = input.nextLine();
              file = new Scanner(new File(fileName));
              record = file.nextLine(); // discards the initial line of headers
              while(file.hasNext())
                   // grab the next record and parse all its data
                   record = file.nextLine();
                   parse = new Scanner(record).useDelimiter(",");
                   date = parse.next();
                   itemID = parse.nextInt();
                   type = parse.next().toUpperCase().charAt(0);
                   units = parse.nextInt();
                   unitCost = parse.nextDouble();
                   transactionArray[logicalSize] = new Transaction(date, itemID, type, units, unitCost); // loads the current transaction into the array
                   logicalSize++;
              return logicalSize;
         }Thanks!
    Oh, I guess I should also add that the variable input is a global variable of type Scanner.
    static Scanner input = new Scanner(System.in); // reads input from keyboardMessage was edited by:
    Kristofer.Ward

    Now, I'm under the impression (and my teacher confirmed this) that arrays are
    passed by reference.Java passes references to arrays by value.
    So I'm assuming that by creating an array in my main method, passing it into
    loadArray(), and changing the values within the method, all the data will be present
    in the array within main without having to explicitly return the loaded array.Bearing in mind my statement above, what really happens is that a reference to
    the array you created is passed to loadArray() by value. What I mean by that
    last bit is that your loadArray() is free to assign a reference to a completely
    different array to its argument variable and the caller will not notice the change.
    That's what's happening here:public static int loadArray(Transaction[] transactionArray, int size) throws Exception
        // declarations of local variables
             * The argument variable is now assigned a reference to a completely
             * new array.  When this function returns the variable the caller used to
             * invoke this method will have exactly the same value it did before this
             * method was invoked.  Ie it will *still* refer to an array of nulls.
        transactionArray = new Transaction[size];
        // more stuff - that involves changing the contents of
        // the newly created array, not the one the caller has
        // a reference to.
        return logicalSize;
    }

  • Problem with cloning Array

    I got a problem with cloning a Point[] Array.
    for example i have 2 Point-Arrays declared as Membervariables:
    Point[] array1;
    Point[] array2;then in the constructor i filled array1 with random Point Objects
    and then
    array2 = (Point[])(array1.clone());then i, for example, add 5 to the x-coordinate of every Point in array2.
    for (int i = 0; i < array2.length; i++)
         array2.x += 5;
    But array1's Point objects are also changed when i do that!
    Shouldnt clone copy the whole array and leave no connection between them?
    Thanks in advance

    so i made a method copyArray where every point object's x and y value is copied into the new Array's new Point Object, but as it seems that isnt where the error comes from.
    (That method works fine, the arrays are identical after that, but shouldnt reference to the same chunk of memory, right?)
    then i run the following method on array2
    array2 = (Point[])addFive(array2);
    Point[] addFive(Point[] array)
                    array[0].x += 5;
              return line;
         }Hence array2[0].x is instead of, e.g., zero 5
    But array1[0] .x is 5 intead of 0 too!
    Where's the mistake, where's the reference left? =X (and how do i fix it? :))

  • Problem with the flex and the webservice

    Hey everyone,
    I have a problem with flex; I declared a web service ( that I
    test it and it works ) inside flex and declared also the operation.
    But it seems that flex doesn't recognize the web method so
    when i use something like
    ws.Getheader.send()
    it pop up an error : Property Send not found on ....
    and in the intellisens menu after I write ws. I don't find my
    method
    here is a fragment of the code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:local="*"
    creationPolicy="all"
    backgroundColor="white"
    backgroundGradientColors="white"
    themeColor="#8190b7"
    width="970"
    creationComplete="initVars()">
    <mx:WebService id="ws" wsdl="
    http://localhost/csp/SearchWS.asmx?WSDL"
    useProxy="false">
    <mx:operation name="SearchHeaderText" />
    </mx:WebService>
    <mx:Script>
    <![CDATA[
    import mx.events.ListEvent;
    import flash.net.*;
    import mx.rpc.soap.*;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.utils.ObjectUtil;
    import mx.rpc.http.HTTPService;
    private function initVars():void
    ws.SearchHeaderText.Send()
    ]]>
    </mx:Script>

    Have you tried the data wizard in Flex Builder 3 ?
    Data > Import Web Service (WSDL).
    It will create all the classes automatically for you from the
    WSDL. More about this here:
    http://www.adobe.com/devnet/flex/articles/flex_ws.html?devcon=f4

  • Performance Problems with intrinsic array multiplikation in Fortran with Su

    Hello,
    I found a serious performance problem in my application with intrinsic array multiplikation. Therefore I wrote a small test program to check if this a general problem or only exists in my code.
    The test program (as seen below) was compiled with Sunstudio12 und Solaris 5.10 on an 64 bit Amd Opteron Machine. First with high optimization (f95 -fast -g), and the second time with out optimization (f95 -O0 -g). In both cases the intrinsic array mupltiplication had a lot of tlb and L2 cache misses (I made some test with the performance analyzer) which caused a huge increase in computation time compared to the explicit loop. In the ideal case the compiler should create the nested loops from the intrinsic statement and both functions should use exactly the same computing time.
    I also tried compiling with Studio11, the problem also occurs there. Maybe its a compiler bug but I'm not sure.
    Greetings
    Michael Kroeger
    program test
    !Test zur Ausfuehrung einer einfachen array Multiplikation
    implicit none
    real,dimension(:,:,:),pointer::check1,check2
    integer i,j,k,ni,nj,nk,status
    ni=1000
    nj=1000
    nk=100
    allocate(check1(0:ni,0:nj,0:nk),STAT=status)
    write(*,*)status
    allocate(check2(0:ni,0:nj,0:nk),STAT=status)
    write(*,*)status
    check1(i,j,k)=25
    check2(i,j,k)=25
    call intrinsic_f(check1)
    call withloop(check2,i,j,k)
    deallocate(check1,check2)
    contains
    subroutine intrinsic_f(check1)
    real, dimension(:,:,:),pointer::check1
    check1=check1*5
    end subroutine intrinsic_f
    subroutine withloop(check2,ni,nj,nk)
    real, dimension(:,:,:),pointer::check2
    integer i,j,k,nk,nj,ni
    do k=0,nk
    do j=0,nj
    do i=0,ni
    check2(i,j,k)=check2(i,j,k)*5
    enddo
    enddo
    enddo
    end subroutine withloop
    end program

    I will try the large pages, but what me puzzles is, that the intrinsic function has cache misses, but the loop function has not. All documentation says, that the compiler would expand the intrinsic function into 3 nested loops, so that both functions should be essential the same (and the compiler says it has created 3 loops from the intrinsic). Since they are not the same, this is a severe problem.
    I have a fairly large code for high performance simulations, and this intrinsic functions are a significant bottle neck. If it is not a compiler bug, I would have to rewrite all intrinsic functions into loops.

  • Problems with client.jar - generated from webservices toolkit from JDK 1.1.7

    We have deployed a web application using the webservices in WL 6.1 using JDK 1.3.1.
    The clients were able to successfully access the servlet it generated and download
    the client.jar. Unfortunately this client.jar seems to be dependent on JDK 1.2
    and beyond. It seems to use java.util.Map class in the JNDI-SOAP SPI.
    Is there any workaround or fix to this problem, so this jar can be used from a
    JDK 1.1.7 env?.
    Our objective is to use WL 6.1 EJB's from WL 4.5.1 using Webservices. Are there
    any known problems with this approach (Ofcourse other than this).
    Thank you.
    Dora Potluri
    Here is the stack trace from using the client.jar
    Class not found java.lang.ClassNotFoundException: java.util.Map
    [Root exception is java.lang.ClassNotFoundException: java.util.Map]javax.naming.
    NamingException: Class not found java.lang.ClassNotFoundException: java.util.Map
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at javax.naming.NamingException.<init>(Compiled Code)
    at weblogic.soap.http.SoapContext.throwNamingException(Compiled Code)
    at weblogic.soap.http.SoapContext.lookup(Compiled Code)
    at javax.naming.InitialContext.lookup(Compiled Code)
    at weatherEJB.WeatherBean.getTemp(Compiled Code)
    at weatherEJB.WeatherBeanEOImpl.getTemp(Compiled Code)
    at weatherEJB.WeatherBeanEOImpl_WLSkel.invoke(Compiled Code)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled Code
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
    Co
    de)
    at weblogic.rmi.extensions.BasicRequestDispatcher$BasicExecuteRequest.ex
    ecute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Fri Sep 21 10:47:12 CDT 2001:<I> <EJB> Transaction: '1001087185816_1' rolled bac
    k due to EJB exception:

    Yes, there is an expectation that the client jar will be run on JDK 1.3x. WLS 6.1 is certified on JDK 1.3x only. This
    applies to the WebServices client as well. For details on platform support see
    http://e-docs.bea.com/wls/platforms/index.html
    Thanks,
    Jim
    Jim Rivera
    Product Manager, WebLogic Server
    BEA Systems, Inc.
    Dora Potluri wrote:
    I started testing using the client.jar generated by webservices WL 6.1 and found
    that it uses reflection API interfaces that are not available til JDK 1.3. Is
    there an expectation that the clients of Webservices are all going to be JDK 1.3.X.
    Here is the stack trace we get.
    java.lang.NoClassDefFoundError: java/lang/reflect/InvocationHandler
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:280)
    at weatherEJB.WeatherBean.getTemp(WeatherBean.java:106)
    at weatherEJB.WeatherBeanEOImpl.getTemp(WeatherBeanEOImpl.java:47)
    at weatherEJB.WeatherBeanEOImpl_WLSkel.invoke(WeatherBeanEOImpl_WLSkel.java:90)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java:261)
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java:56)
    at weblogic.rmi.extensions.BasicRequestDispatcher$BasicExecuteRequest.execute(BasicRequestDispatcher.java:166)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)

  • Problem with building array inside a case statement

    I have a problem with my build array.
    Iam trying to construct a build array when ever I see a new element in my parent array during run time.
    Using shift registers, search array and If- case structure, inside a while loop. Iam implementing this logic (I dont want to use Event structure).
    Iam able to achieve most part of it, but have a problem with the first element. Except the first element of my parrent array, every thing is appending in to the build array. Can any one look at my vi and suggest me what Iam doing wrong here.
    Thank you
    Attachments:
    debug.vi ‏12 KB

    I think you need to replace the tunnels (carrying the array) in the for loop with a shift register.
    Lynn

  • Problems with an array (attachMovie)

    I've created a 20 x 20 grid of objects (openCircles). They're set to 'alpha = 0', then 'alpha = 100' on rollover. This works for all of them except for the final one at the coordinate T,20 in the bottom right corner, as I'm not able to rollover over it. To test whether or not they all existed, I set them all to an initial value of 'alpha = 100' and they did all appear, but I'm still unable to rollover the one at T20.
    The other problem is that when an 'openCircle' is clicked, a 'filledCircle' (set up as another grid of invisible objects in the same place) is supposed to appear in its place. That doesn't happen. All of the objects are created and exist, using attachMovie, so it's maybe due to some logical error. See code:-
    I'd be grateful for any help. Many thanks.
    stop();
    //The purpose of this experiment is to locate a trap of oil. Only 30 exploration holes are allowed.
    //Use the grid coordinate to locate the borehole and then plot the depth
    //Drilled is set to false in the 1st(previous) frame
    //Rolling over a grid coordinate will reveal a borehole (open circle).
    //Click on the borehole (open circle) to start drilling
              //open circle will be removed
              //drilled is set to true for that coordinate
              //filled circle will appear in its place
    //set up variables for grid array of open circles (undrilled) and closed circles (drilled)
    var spacing:Number = 5.75;
    var cols:Number = 20; // number of columns in grid
    var rows:Number = 20; // number of rows in grid
    var leftMargin:Number = 154;
    var topMargin:Number = 169;
    var currentRow:Number = 0;
    var currentCol:Number = 0;
    for (i=1; i<=rows; i++) {                                                                                                         
    for (j=1; j<=cols; j++) {                                                                                                                              
              current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j,getNextHighestDepth());
              current._x = leftMargin + ((i-1) * (spacing + current._width));
              current._y = topMargin + ((j-1) * (spacing + current._height));
              current2 = attachMovie("filledCircle_mc", "filledCircle_mc"+i+"_"+j, getNextHighestDepth());
              current2._x = leftMargin + ((i-1) * (spacing + current2._width));
              current2._y = topMargin + ((j-1) * (spacing + current2._height));
              //open circle initially invisible, then visible on rollOver
              current._alpha = 0;
              //filled circles initially invisible
              currentCol2=(current2._x-leftMargin)/(spacing + current2._width);
              currentRow2=(current2._y-topMargin)/(spacing + current2._height);
                                     if (drilled[currentCol,currentRow]==true){
                                                      current2._alpha = 100;
                                                      }else{
                                                                current2._alpha=0;
              //open circle visible on rollover
              current.onRollOver = function() {
                                     this._alpha = 100;
                                     currentCol=(this._x-leftMargin)/(spacing + current._width);
                                     trace("current column ="+currentCol);
                                     currentRow=(this._y-topMargin)/(spacing + current._height);
                                     trace("current row ="+currentRow);
                                     if (drilled[currentCol,currentRow]==false){
                                              trace("Click on the grid point to drill at "+rowLabel[currentRow]+","+colLabel[currentCol]);
                                  }else{
                                              trace("Click on the grid point to review the core at "+rowLabel[currentRow]+","+colLabel[currentCol]);
                                  }     //end 'if-else'
              //open circle invisible on rollout
              current.onRollOut = function() {
                                     this._alpha = 0;
                                     trace("No grid point selected")
              //click on open circle - variable drilled becomes true
              current.onRelease=function(){
                        drilled[currentCol,currentRow]=true;
                        trace(drilled[currentCol,currentRow]);
                        this.removeMovieClip();
    This is an image of the grid showing an 'openCircle' visible when rolled over

    Thanks for the explanation. That was very helpful.
    However, I am having problems with the variables. I did as you suggested though and extended the (grid) layer, but had to create a separate keyframe for the code layer, as that code had to execute first before moving into the next frame. See below (I've also attached the fla, but if you need any more information, please let me know):
    In frame 2 of the animation, if an open circle mc is clicked, that mc is deactivated (removed), drilled becomes true for that coordinate, a filled circle becomes visible in its place and you enter another frame(3) (this is currently just a test frame), to later be used to implement the drilling animation for a clicked coordinate.
    It all seems to be working as it should, until the open circle is clicked and you enter frame 3. See below:
    All the instances of the openCircle mc's are still active in frame 3, so I guess I need to use removeMovieClip(). I know how to do that for a single instance, but howdo I execute that if they're in an array?
    I also don't want any instances of the filledCircles from frame 2 to be visible in frame 3. I'm not sure how to hide them temporarily in frame 3 and then have them visible again in frame 2?
    When I go back to frame 2 (using a back button), all of the filled circles in the array are visible, whereas only the ones that have been previously clicked (drilled = true) should be visible. However, when I return to frame 2 and do a trace to find out which coordinates are set to true/false, it seems that a whole row is now set to (drilled = true), whereas it should just be a single coordinate set to true. Oddly enough, the variable seems to working properly in frame 2 when the code is first executed, but then when I go to frame 3 and then re enter frame 2, it's not working as it should do. Below is the trace code that I've used:
    if (drilled[currentCol,currentRow] == false) {
                                            trace("Click on the grid point to drill at " + rowLabel[currentRow] + "," + colLabel[currentCol]);
                                  } else {
                                            trace("Click on the grid point to review the core at " + rowLabel[currentRow] + "," + colLabel[currentCol]);
    If you could help, I'd be very grateful! Very many thanks.
    http://synergese.co.uk/boreholes15.fla
    Message was edited by: Pippa01
    Sorry, Although the original question was correct, I've just unmarked it as correct. Maybe, I should have started it as a new thread?

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

Maybe you are looking for

  • 5.0.1 Update: no simcard = no activation, no nothing

    Hi, I moved away from the USA 2 years ago and since then used my Iphone 3G as an Ipod Touch: internet, music, photos , apps... Recently got rid of the original useless ATT Sim card. Everything was fine till i updated my Iphone to Ios 5.0.1. Now, it w

  • URGENT: ORA-12514: Message 12514 not found;

    Hi, I have a big problem: I have a PC (PC1) with an Oracle 9.2.0.5 database. I have other PC (client=PC2) with Oracle forms and reports runtime installed. I try to execute my .fmx from PC2 and everything was ok. After that, I installed again in anoth

  • Integrating MS BizTalk Server with Oracle Financial

    Hi.. I'm looking for solution to enable Microsoft BizTalk Server 2000 integrates with Oracle Fin apps. I'm not familiar with Oracle Finance, please advise the most common scenario applied. I knew Compaq IOrchestration can do this integration, but if

  • Panorama is Messing up my tab Groups on Restart

    So I really like the idea of Panorama, and I tried to use it to divide some sites into related categories. For instance I have a group of Irish News site, a group of news aggregator sites (Google news etc), and then a group of British news sites. Thi

  • Use of Trace key in transformer and parser of ODI Data Quality

    Hi All, Can someone explain to me the significance of Trace key in the transformer and parser processes (modules) in the ODI data profiling and quality part. I have read all the documentation present of the ODI dataquality getting started and the use