Hessian und J2ME

Status
Nicht offen für weitere Antworten.

Ansics

Mitglied
Hi,

Ich möchte mit nem J2ME Client ein Objekt der Klasse User mit dem Hessian.Protokoll serialisieren und über nen Socket raus schicken. Socketverbindung und sowas steht schon alles. Die Userklasse sieht so aus:

Code:
public class User {
	
	private String firstname = null;
	private String lastname = null;
	private int age = 0;
	
	public User(String firstname, String lastname, int age) {
		this.firstname = firstname;
		this.lastname = lastname;
		this.age = age;
	}
	
	public String getFirstname() {
		return this.firstname;
	}
	
	public String getLastname() {
		return this.lastname;
	}
	
	public int getAge() {
		return this.age;
	}

}

Kann also so einiges ;) Scherz beiseite: Wie bekomme ich es jetzt hin das Objekt zu serialisieren. Nen Vector zu serialisieren klappt, aber User nicht. Folgendes mach ich:

Code:
User benno = new User("benno","butterkeks",25);
MicroHessianOutput out = new MicroHessianOutput(os);
out.writeObject(benno);
os.flush();

Bibliotheken und sowas sind alle richtig eingebunden, wie gesagt klappt das Serialisieren eines Vektors, aber nicht das Serialisieren eines benutzerdefinierten Typs. Hat jemand schonmal ähnlichs probiert? Vielleicht gibts ja auch was anderes als Hessian mit dem Serialisierung ganz leicht möglich ist ...
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
tuttle64 J2ME SDK starten Android & Cross-Platform Mobile Apps 4
F MIDLET Pascal statt J2ME? Android & Cross-Platform Mobile Apps 6
K mp3 datei in j2me abspielen Android & Cross-Platform Mobile Apps 16
P J2ME Code-Beispiele Android & Cross-Platform Mobile Apps 2
K Java ME J2ME Bluetooth - bluesoleil,bluecove, JSR82... ? Android & Cross-Platform Mobile Apps 6
G Java ME Tabelle in J2ME Android & Cross-Platform Mobile Apps 4
G J2me Wirlesstoolkit 2.5.2 Kompertibel zu Samsung SGH J700 Android & Cross-Platform Mobile Apps 2
K J2ME programmierung - startprobleme. Android & Cross-Platform Mobile Apps 7
B (J2ME) Welche IDE ? Android & Cross-Platform Mobile Apps 3
M Telefonbuch in J2ME programmieren HILFE! Android & Cross-Platform Mobile Apps 34
P J2ME - Anbindung an externe Datenbank Android & Cross-Platform Mobile Apps 3
M Welche Datenbank für J2ME? Android & Cross-Platform Mobile Apps 5
P Prob mit Eclipse und J2ME SDK Android & Cross-Platform Mobile Apps 4
T J2ME Frameworks und Librarys Android & Cross-Platform Mobile Apps 2
J image j2me Android & Cross-Platform Mobile Apps 2
D J2ME - Wie und welches Programm Android & Cross-Platform Mobile Apps 10
C JSR135 - Kamera in J2ME? Android & Cross-Platform Mobile Apps 4
G J2ME jar-problem Android & Cross-Platform Mobile Apps 10
Kidao Progress Bar in J2ME Android & Cross-Platform Mobile Apps 2
K XDA Orbit: Auslesen der GPS Daten mit J2ME Android & Cross-Platform Mobile Apps 2
D J2ME und Collections? Android & Cross-Platform Mobile Apps 5
R J2ME <-> Microsoft Message Queue (MSMQ) Android & Cross-Platform Mobile Apps 2
ARadauer j2me und mvc Android & Cross-Platform Mobile Apps 24
K Erste J2ME Applikation in NetBeans Android & Cross-Platform Mobile Apps 2
S Anfängerproblem mit ant+j2me Android & Cross-Platform Mobile Apps 2
D Kalenderwoche mit J2ME Android & Cross-Platform Mobile Apps 2
G Gibts das.Wo findet man die J2ME Gesamtdoku ? Android & Cross-Platform Mobile Apps 2
J J2ME Java Programm im Hintergrund auf Handy laufen lassen? Android & Cross-Platform Mobile Apps 2
S J2ME und J2EE Android & Cross-Platform Mobile Apps 4
B J2Me Buch? Android & Cross-Platform Mobile Apps 4
K HTTP-Verbindung mit J2ME.... Android & Cross-Platform Mobile Apps 2
S Einstieg in J2ME (Java2 MicroEdition) Android & Cross-Platform Mobile Apps 52

Ähnliche Java Themen

Neue Themen


Oben