Please
ignore my last post...I see that overriding a method with a
blank
method really messes things up for object serialization...
:-)
Kevin
-----Original Message-----
From: Kevin Meldorf (NBK)
Sent: Wednesday, May 02, 2001 3:55 PM
To: '[EMAIL PROTECTED]'
Subject: Passing structures to an ejb
From: Kevin Meldorf (NBK)
Sent: Wednesday, May 02, 2001 3:55 PM
To: '[EMAIL PROTECTED]'
Subject: Passing structures to an ejb
I am working on an
application where I am trying to pass a non ejb ojbect to an
EJB.
I have a session
bean that I am trying to pass the following "structure" to my session
bean.
import
java.util.*;
import java.io.*;
import java.io.*;
/** This is
basically a file of structs that we will use in the
Po app -- If you are a hard core Java OOP guy please go away :-) **/
public class PoType implements Serializable {
Po app -- If you are a hard core Java OOP guy please go away :-) **/
public class PoType implements Serializable {
public
AddressType billToAddress;
public AddressType vendorAddress;
public AddressType shipToAddress;
public AddressType vendorAddress;
public AddressType shipToAddress;
public int
ID;
public String poNumber;
public String poNumber;
public String
yourName;
public String yourPhone;
public String name;
public String phone;
public String yourPhone;
public String name;
public String phone;
public Date
dateOfOrder;
public String departmentNo;
public String generalLedgerNumber;
public Date dateRequested;
public String departmentNo;
public String generalLedgerNumber;
public Date dateRequested;
public Vector
items; // contains ItemType objects OrderItem
public float poTotal;
public String comments;
private void writeObject(java.io.ObjectOutputStream out)
throws IOException {}
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {}
public String comments;
private void writeObject(java.io.ObjectOutputStream out)
throws IOException {}
private void readObject(java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {}
}
From a client I
basically call the session ejb:
PoType po = new
PoType();
...add all the stuff
to the object
boolean test =
tester.add(po);
When my ejb gets the
object all the fields are null. What am I missing here?
Can you not pass
non-ejb objects around? Please help.
Kevin Meldorf
Systems Analyst
WorldTravel BTI
400 Skokie Blvd
Northbrook, IL 60062
Phone: (847)
480-8340
[EMAIL PROTECTED]