Need Information for Transferring the Object

Hy To every I need ur help plz tell whats is the wrong thing em doing.
I am sending a (MessageSerialize) Object Of org.jdesktop.jdic.desktop.Message through Socket problem is when i receive object the gets receive but the contents of objects doest not exists in the object which i have set before sending
Em pasting my code here please help me
**Server Code**_
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.communication.to.server;
import com.printing.utility.*;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import org.jdesktop.jdic.desktop.Desktop;
import org.jdesktop.jdic.desktop.Message;
* @author ABid
* @Description This class is used to recieve Data/Files throug Socket From Server
public class FileServer extends Thread {
private ServerSocket serverSocket;
public static void main(String argv[]) throws Exception {
new FileServer();
public FileServer() throws Exception {
serverSocket = new ServerSocket(4000);
System.out.println("Server listening on port 4000.");
this.start();
public void run() {
while (true) {
try {
System.out.println("Waiting for connections.");
Socket client = serverSocket.accept();
System.out.println("Accepted a connection from: " +
client.getInetAddress());
Connect c = new Connect(client);
} catch (Exception e) {
class Connect extends Thread {
private Socket client = null;
private ObjectInputStream ois = null;
private ObjectOutputStream oos = null;
public Connect() {
public Connect(Socket clientSocket) {
client = clientSocket;
try {
ois = new ObjectInputStream(client.getInputStream());
oos = new ObjectOutputStream(client.getOutputStream());
} catch (Exception e1) {
try {
client.close();
} catch (Exception e) {
System.out.println(e.getMessage());
return;
this.start();
public void run() {
try {
String workType = (String) ois.readObject();
if (workType.equalsIgnoreCase("Attachments")) {
String printDirectoy = "Attachments";
Message ms = new MessageSerialize();
ms = (MessageSerialize)ois.readObject();
Desktop.mail(ms);
ois.close();
oos.close();
client.close();
} catch (Exception e) {
e.printStackTrace();
client COde*_+
//This is code for sending Object
public static void sendMessageToMail() {
ObjectOutputStream oos = null;
ObjectInputStream ois = null;
//File file = new File("G://FileG.pdf");
try {
Socket socket = new Socket("localhost", 4000);
oos = new ObjectOutputStream(socket.getOutputStream());
ois = new ObjectInputStream(socket.getInputStream());
//byte[] mybytearray = new byte[(int) file.length()];
//FileInputStream fis = new FileInputStream(file);
//BufferedInputStream bis = new BufferedInputStream(fis);
//bis.read(mybytearray, 0, mybytearray.length);
System.out.println("Sending...");
oos.writeObject("Attachments"); // Type of Work here the String is used for Printing purpose
//oos.writeObject("HP Deskjet 3900 Series"); // Name of the printer
Message message = new MessageSerialize();
//ms.setMessage(message);
message.setBody("Hello");
List toAdd = new ArrayList();
toAdd.add("[email protected]");
List attachements = new ArrayList();
attachements.add("g://file.txt");
try {
message.setAttachments(attachements);
} catch (Exception exception) {
oos.writeObject(message);
//oos.writeObject(file.getName());//name of the file
//oos.write(mybytearray, 0, mybytearray.length); // file contents
//oos.writeObject(so);
oos.flush();
oos.close();
ois.close();
} catch (Exception exception) {
exception.printStackTrace();
"Serialized Object Class "
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.communication.to.server;
import java.io.IOException;
import java.io.*;
import java.io.Serializable;
import java.util.*;
import org.jdesktop.jdic.desktop.Message;
* @author ABid
public class MessageSerialize extends Message implements Serializable {
public MessageSerialize() {
Thanks in Advance
Abid

i made it like thisWhy?
You posted that code on 11/09/2008 20:02 and asked why it wouldn't work.
I told you why on 12/09/2008 08:48 (reply 2 of 8).
So now on 12/09/2008 16:59 (reply 7 of 8) you've tried it again.
Tell me why that wasn't just a complete waste of time.
but doesn't work again
Of course it 'doesn't work again.' It never did. It never will. Stop it. Why did you think it would work? After it didn't? After you started the thread to ask why? After I told you why?
This is just bizarre.
Now what will you say.Exactly what I said before. And I didn't say to extend Message. I told you why you can't do it that way.+
OK?
You have to construct a serializable class. You have to define the data you want serialized in that class. OK? In this case you want to transport data from a org.jdesktop.jdic.Message, so your new class will have to have the same fields and the same methods.
Isn't that obvious?
could you please mention i want to send files over network dont want to create them on disk through socket.This doesn't make sense either. You want files but you don't want them on the disk?
You'll have to explain yourself better than that if you want assistance here.

Similar Messages

  • Need information for all the Fields on Infotype 94.

    Hi all,
    I have a question on Infotype 94 which holds all the information  of I - 9 form.  I would like to know which field goes with what details when we are trying to take details from I - 9 Form. I need a example how would it look for a Alien authorized worker and a permanent Resident and US citizen.
    Please help me out in this issue.
    Thank you.

    Residence Status (Infotype 0094)   
    Definition
    Infotype 0094 allows you to store information regarding an employeeu2019s residence status, as well as information regarding the compliance with the Immigration Reform and Control Act (IRCA), which requires every employer verify that each person hired can prove via documents their identity, and their eligibility for employment.
    Structure
    This infotype is divided into two parts: the personal identification information section (the residence permit) and the employment verification section (the work permit).
    Personal identification
    This section stores the information for personal identification. The only field which is required on this infotype is Residence status. 
    The ID type field describes the type of documentation the employee presents to the company. You can also enter data for the issuing authority.
    The ID number is the number of the document provided by the employee to the company.  The Issuing date is the date on which the personal identification document was issued to the employee. This date must be the same as or later than the employeeu2019s date of birth.
    Lastly, the ID expiry date field is the date that the provided identification expires.
    If the expiration date is filled, and there is a value of A (Alien) in theResidence status field, then this transaction will automatically generate a transaction to store a deadline for the expiration of the work permit (infotype 0019, subtype 71).
    Employment verification
    This section stores the information for employment verification. The Work permit field stores the type of work permit. The Work permit number field stores the number of the document provided by the employee to establish work eligibility.
    The date issued and the issuing authority are also stored. The Expiry of work perm. field stores the date on which work eligibility expires. This field should only be filled for those employees who are not citizens
    http://help.sap.com/erp2005_ehp_05/helpdata/EN/2c/8323d0571111d182d40000e829fbfe/frameset.htm

  • Need Notification for attaching the handler On Closing of the HTML Extension in Indesign CC 2014

    Need Notification for attaching the handler On Closing of the HTML Extension in Indesign CC 2014
    Hi,
    I need to process a couple of tasks after clicking on cross button(on top right corner of HTML extension) and before the Extension actually gets closed.
    As I Understand, Extension is using chromium browser.
    I tried attaching an event listener to "onbeforeunload" event of chrome but it suppresses any alerts being thrown and closes the extension, without waiting for
    background processes to complete.
    Is there a way through scripting/Plugin or any other way to achieve it?

    try the script at Adobe Community: InDesign 6 is crashing when attempting to open a particular document. All others are opening OK.
    I'd also try moving the pages to a new file, though I suspect that will crash too. Divide and conquer might work -- tray one of your operations on half the document at a time, then repeat by dividing any piece that fails, and so on, until you isolate a page, then use the same method to isolate an object (though it's possible you have a corrupt page).

  • Gui_download for transferring the data from internal table to excel sheet.

    hi all,
    i am using gui_download for transferring the data from internal table to excel sheet.
    I have a internal table with 3 columns col1,col2,col3 and I am getting the file at the specified path,but my problem is that,in the excel sheet(path specified) all the 3 columns values are printed in one column.Please help me.
    Thanks in advance.

    Hi Venkata,
    plz use FM 'SAP_CONVERT_TO_XLS_FORMAT' :
      call function 'SAP_CONVERT_TO_XLS_FORMAT'
        exporting
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
          i_filename                 = p_file
    *   I_APPL_KEEP                = ' '
        tables
          i_tab_sap_data             = t_mbew
    * CHANGING
    *   I_TAB_CONVERTED_DATA       =
    * EXCEPTIONS
    *   CONVERSION_FAILED          = 1
    *   OTHERS                     = 2
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Hope this helps,
    Erwan

  • Error Individual check for creating the object WBS Element required

    Hi Expert,
    I've a requirement to create WBS elements using BAPI. And I am using BAPIs in the following manner.
    CALL FUNCTION 'BAPI_PS_INITIALIZATION'
    CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
    i_project_definition = g_pdwbs
    TABLES
    it_wbs_element = it_wbs_element
    et_return = it_return
    EXTENSIONIN =
    EXTENSIONOUT =
    CALL FUNCTION 'BAPI_PS_PRECOMMIT'
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    When I do so I am getting the below errors. Please suggest.
    "Individual check for creating the object WBS Element C-497082 required ".
    "Individual check for creating the object WBS Element C-497082-0001 required".
    Please suggest how to correct this error.

    Hi Karthikeya,
    I think the project profile which you are using has a different mask and the WBS element you are passing is different to the BAPI.
    Are you able to create manually from CJ01 using the same WBS element?
    Create a project manually and it will give the list of the mandatory fields set in the config. Using that list populate the BAPI struture accordingly.
    Hope this helps.
    Thanks
    Lakshman.

  • I also need information about use the ProConnect(r) Integ...

    I also need information about use the ProConnect(r) Integrated KVM 2-Port Switch to connect a Mac G4 and a PC anyone help
    software reviews editor

    I suggest you to go to linksys website & it will give all required information ,,,
    Or you can try this link ....

  • Hello there .. When I want to change my security question I can't and show me Emil not for me to send the information for change the security question how to fix this problem

    Hello there .. When I want to change my security question I can't and show me Emil not for me to send the information for change the security question how to fix this problem

    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a rescue email address or a Security Questions issue, then see:
             If you forgot the answers to your Apple ID security questions - Apple Support.
             Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
         4. Account security issues almost always require you to speak directly to an
             Apple representative to securely establish your identity as the account holder.
             You can set it up so that Apple calls you, either immediately or at a time
             convenient to you.
                1. Go to www.apple.com/support.
                2. Choose Contact Support and click Contact Us.
                3. Choose Other Apple ID Topics and choose the appropriate topic for
                    your issue.
                4. Follow the onscreen instructions.
             Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                            Apple ID- All about Apple ID security questions.

  • I reset the ipad. hoping it would help. but still it needs password for activation. the owner already forgot password for icloud as well as password of the email since it was not used since 2011. help please.

    I reset the ipad. hoping it would help. but still it needs password for activation. the owner already forgot password for icloud as well as password of the email since it was not used since 2011. help please.

    Your sister can go to https://iforgot.apple.com/ and see if she can recover her password.
    There is nothing anybody else can do.

  • Lyx: No information for exporting the format PDF (pdflatex)

    After lyx installation the system prompts me:
    Optional dependencies for lyx
        texlive-latex3: pdf export
    So I did install this package, but even then I couldn't find a way to export to pdf.
    But not only pdf. PS and DVI is the same:
    "No information for exporting the format DVI"
    "No information for exporting the format Postscript"
    Does anyone have any idea about what's wrong here, how to workaround or better, to fix this?
    Thanks!

    LyX works well (I'm using it every day right now), so there is a solution somewhere. Perhaps there is a missing dependency in the package.
    Does LaTeX work by itself? i.e. Can you produce a simple DVI file from a minimal LaTeX file?
    Start LyX from a terminal command line. Then click on Tools->Reconfigure. Does the output show anything really suspicious missing? You will see a lot of "no"s, but that is okay. You will definitely want to see a "yes" for latex, xdvi, and dvips. If you have never started LyX before, you pretty much have to do this the first time to set up your configuration before anything will work.
    Try that much, then post again.
    Mike

  • Need Information For Connecting Access point to WLC 4402

    Hi Friends
    I need Some information for Connecting  my New Access point ( Cisco AIRLAP 1242AG) with WLC(4402) Controller
    In our network set up we have two WLC(4402) we needs to Connect this New Accesspoint To one of our WLC
    My Access point is brand New. I need to Know what all i have to do inorder to connect this AP to the controller (from Acesspoint perspective & WLC perspective)
    I need to Know  what I need to do in AP to connect to the Controller
    Do i need to Assign Static IP Address forAP or after connecting to the switch it automatically gets ip from DHCP and regsiter with controller??
    Do i Need to Configure my AP with default gateway(the switch to which is connected ?) & DO i need to configure the AP with  Controller Ip address ??
    Pls Assist
    Regards
    Safwan

    Hi Scot...
    We tried Connecting the Access Point yesterday, but it failed....
    We are using Cisco 3500 Access point ...
    when we connected , first it automatically got an ip address using DHCP but following error occurred
    P70ca.9bd5.77c6#
    AP70ca.9bd5.77c6#
    AP70ca.9bd5.77c6#
    Not in Bound state.
    *Mar  1 00:13:56.539: %CAPWAP-3-ERRORLOG: Invalid event 38 & state 2 combination
    *Mar  1 00:13:56.555: %DHCP-6-ADDRESS_ASSIGN: Interface GigabitEthernet0 assigne
    d DHCP address 10.50.11.26, mask 255.255.0.0, hostname AP70ca.9bd5.77c6
    *Mar  1 00:14:04.564: %CAPWAP-3-UNSUPPORTED_WLC_VERSION: Unsupported version 6.0
    .182.0 on WLC USSTLController01
    *Mar  1 00:14:14.564: %CAPWAP-3-UNSUPPORTED_WLC_VERSION: Unsupported version 6.0
    .182.0 on WLC USSTLController01
    *Mar  1 00:14:24.564: %CAPWAP-3-UNSUPPORTED_WLC_VERSION: Unsupported
    version 6.0
    .182.0
    version 6.0
    .182.0
    on WLC USSTLController01
    version 6.0
    .182.0
    Then I COnfigured Ap with  Static ip address & default gateway & controller Ip but tht too didnt work...
    .182.0 on WLC USSTLController01
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>
    *Mar  1 00:13:40.908: %CDP_PD-2-POWER_LOW: All radios disabled - NEGOTIATED WS-C
    3750X-48P (e05f.b907.9a20)
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>en
    Password:
    AP70ca.9bd5.77c6#
    *Mar  1 00:13:48.033: %CAPWAP-3-DHCP_RENEW: Could not discover WLC using DHCP IP
    . Renewing DHCP IP.
    AP70ca.9bd5.77c6#
    AP70ca.9bd5.77c6#
    AP70ca.9bd5.77c6#
    P70ca.9bd5.77c6>
    *Mar  1 00:13:40.908: %CDP_PD-2-POWER_LOW: All radios disabled - NEGOTIATED WS-C
    3750X-48P (e05f.b907.9a20)
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>
    AP70ca.9bd5.77c6>en
    Password:
    AP70ca.9bd5.77c6#
    *Mar  1 00:13:48.033: %CAPWAP-3-DHCP_RENEW: Could not discover WLC using DHCP IP
    . Renewing DHCP IP.
    I also  Need to Know Cisco Access point 3500 can be associated with WLC 4402 ( version 6.0.182.0) ??
    Pls Advice How to proceed further

  • Need Help for Array with Object

    hey there guys... am trying to complete my project which is to create a Library System. Was able to create a list to show the books available when they select the book and click a borrow button it can print out the book.
    what problem i have now is that when a student click borrow... the value how can i transfer to an array inside the object student.
    i am usin a main screen (ms) who is controlling all the functions. been trying and trying on this for very long hopefully there will be those who are able to help me out.
    my customer screen would be like this... but how can i add in the array for books borrowed
    import javax.swing.*;
    class Customer
         private String name;
         private int accNo;
         private String password;
         private double balance;
         private Books borrow[]=new Books[5];
         int borrowCount=0;
         static int customerCount=0;
         private MainScreen ms;
         Customer(String n, int no, String p, double b)
              name=n;
              accNo=no;
              password=p;
              balance=b;
              customerCount++;
              JOptionPane.showMessageDialog(null,name +" record created");
              display();
    /* Trying to Create the Array to store information
         public void setStudentBorrow(String a)
              borrow[borrowCount]=a;
              borrowCount++;
              JOptionPane.showMessageDialog(null,"Book Borrowed");
         public String getStudentBorrow()
              for(int i=0;i<borrowCount-1;i++)
              {     return borrow;     }
         public String getPassword()
         {     return password;     }
         public String getName()
         {     return name;          }
         public int getAccNo()
         {     return accNo;     }
         public double getBalance()
         {     return balance;     }
         public void setName(String n)
         {     name=n;     }
         public void setPassword(String p)
         {     password=p;     }
         public void setBalance(double b)
         {     balance=b;     }
         public void setAccNo(int no)
         {     accNo=no;     }
         public void display()
              JOptionPane.showMessageDialog(null,
              "\nCutomer Number : "+ customerCount+
              "\nName :"+name+
              "\nAccount Number: "+accNo+
              "\nBalance (RM): "+balance,"Customer record",
              JOptionPane.INFORMATION_MESSAGE     );

    Cross Post:
    http://forum.java.sun.com/thread.jspa?threadID=779224&messageID=4433689#4433689

  • Need help for understanding the behaviour of these 2 queries....

    Hi,
    I need your help for understanding the behaviour of following two queries.
    The requirement is to repeat the values of the column in a table random no of times.
    Eg. A table xyz is like -
    create table xyz as
    select 'A' || rownum my_col
    from all_objects
    where rownum < 6;
    my_col
    A1
    A2
    A3
    A4
    A5
    I want to repeat each of these values (A1, A2,...A5) multiple times - randomly decide. I have written the following query..
    with x as (select my_col, trunc(dbms_random.value(1,6)) repeat from xyz),
    y as (select level lvl from dual connect by level < 6)
    select my_col, lvl
    from x, y
    where lvl <= repeat
    order by my_col, lvl
    It gives output like
    my_col lvl
    A1     1
    A1     3
    A1     5
    A2     1
    A2     3
    A2     5
    A3     1
    A3     3
    A3     5
    A4     1
    A4     3
    A4     5
    A5     1
    A5     3
    A5     5
    Here in the output, I am not getting rows like
    A1     2
    A1     4
    A2     2
    A2     4
    Also, it has generated the same set of records for all the values (A1, A2,...,A5).
    Now, if I store the randomly-decided value in the table like ---
    create table xyz as
    select 'A' || rownum my_col, trunc(dbms_random.value(1,6)) repeat
    from all_objects
    where rownum < 6;
    my_col repeat
    A1     4
    A2     1
    A3     5
    A4     2
    A5     2
    And then run the query,
    with x as (select my_col, repeat from xyz),
    y as (select level lvl from dual connect by level < 6)
    select my_col, lvl
    from x, y
    where lvl <= repeat
    order by my_col, lvl
    I will get the output, exactly what I want ---
    my_col ....lvl
    A1     1
    A1     2
    A1     3
    A1     4
    A2     1
    A3     1
    A3     2
    A3     3
    A3     4
    A3     5
    A4     1
    A4     2
    A5     1
    A5     2
    Why the first approach do not generate such output?
    How can I get such a result without storing the repeat values?

    If I've understood your requirement, the below will achieve it:
    SQL> create table test(test varchar2(10));
    Table created.
    SQL> insert into test values('&test');
    Enter value for test: bob
    old   1: insert into test values('&test')
    new   1: insert into test values('bob')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: terry
    old   1: insert into test values('&test')
    new   1: insert into test values('terry')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: steve
    old   1: insert into test values('&test')
    new   1: insert into test values('steve')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: roger
    old   1: insert into test values('&test')
    new   1: insert into test values('roger')
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select lpad(test,(ceil(dbms_random.value*10))*length(test),test) from test;
    LPAD(TEST,(CEIL(DBMS_RANDOM.VALUE*10))*LENGTH(TEST),TEST)
    bobbobbobbobbobbobbobbobbobbob
    terryterry
    stevestevesteve
    rogerrogerrogerrogerrogerrogerrogerrogerrogerYou can alter the value of 10 in the SQL if you want the potential for a higher number of names.
    Andy

  • Need logic for calculate the balance quantity in open sales order

    hi all
    i need logic to calcuclate the balance quantity in open sales order ,
    where i am using VBAK header and VBAP item , and VBFA for document flow tables
    i need to have the balance quantity , for the open sales order
    especially taking with respect to  VBFA-VBTYP_N = M for invoice creation and N for canellation
    any one please help me

    thank you but i am clear abt it
    will you please anyother way to calucaluate the logic ,
    and i need to populate in bukets also for the terms of 5 years
    Edited by: sridhar loganathan on Nov 25, 2008 6:43 AM

  • Outbound interface for transfering the payroll results

    Hi everyone,
                      Can any one provide me with the Outbound interface program for transfering payroll data, to the third party submission.

    Hi  kiran.
    Try PU12.
    Manoj Shakya.
    Technical-Fuctional Consultant
    SAP-HR
    ******(Useful answers should be rewarded)

  • Need support to document the object

    Hi gurus
    I am supposed to document the InfoCube which i have modelled. I would like to know is there any proper documentation tool which can be used to document the object. Or if anybody is using any documentation template to document the object please forward it to my mail id
           [email protected]
    thanks in advance for your help
    regards
    vijaykumar

    I would be very interested in obtaining these templates, as well as other documentation templates you may have available.  Could you please send me a copy at [email protected]?
    Thank you very much!

Maybe you are looking for

  • Printing of credit Memo processed in FB75, is not set up in co code

    Hi, For my company code there was limited correspondence types has been assigned. No he wants to assign new variant/standard variant to the existing list. I am able to assign this in ob78. In FB12 if i am trying to see that, it is not showing the ass

  • SSIS 2008 - Sending file with dynamic name using FTP task

    Hi  - Thanks for taking a look -  (I'm very new to SSIS.) I'm trying to create an SSIS 2008 package that does the following: 1) Execute a stored procedure on SQL. 2) Download the results as a CSV file to a 'local' location.  The file name is set usin

  • PDF's won't open or get corrupted

    I have downloaded 3 x PDF's, one works perfectly, one has some pages twisted (standing on their sides) and one won't open at all (this one is a larger file) they are all presentations...........any ideas for resolution??? I'm  not tecci!

  • I have had multiple problems with the Activation of my Adobe software

    I'm definitely not a happy camper. On July 12, 2012, one month ago I called Adobe concerning my activation issue. I had thought it was resolved as they told me that they had added an activation count for me. Case #0183414715. Tonight I open Photoshop

  • Pismo won't boot

    Hello, My Powerbook G3 firewire Pismo 500 mHz froze yesterday and stopped booting up. (running Tiger 10.4.8 for about 6 months) I zapped the PRAM and it worked, and then booted up but froze again. I haven't gotten it back up since. I have tried booti