openamf/src/java/org/openamf/io AMFSerializerTest.java,1.5,1.6
Sean Sullivan <[email protected]> Sat, 20 Mar 2004 09:30:45 +0000
| Newsgroups | gmane.comp.java.openamf.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/openamf/openamf/src/java/org/openamf/io
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1846/src/java/org/openamf/io
Modified Files:
AMFSerializerTest.java
Log Message:
serialize an object of type Foo
Index: AMFSerializerTest.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/io/AMFSerializerTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AMFSerializerTest.java 20 Mar 2004 08:37:36 -0000 1.5
--- AMFSerializerTest.java 20 Mar 2004 09:30:43 -0000 1.6
***************
*** 2,5 ****
--- 2,6 ----
import java.io.*;
+ import java.util.Date;
import javax.xml.parsers.*;
import org.w3c.dom.*;
***************
*** 66,71 ****
message.addHeader("testKey", true, "testValue");
! message.addBody("someService.someMethod", "someResponse",
! "body value", AMFBody.DATA_TYPE_STRING);
AMFBody bodyWithDate = new AMFBody("someService.someMethod",
--- 67,74 ----
message.addHeader("testKey", true, "testValue");
! message.addBody("someService.someMethod",
! "someResponse",
! "body value",
! AMFBody.DATA_TYPE_STRING);
AMFBody bodyWithDate = new AMFBody("someService.someMethod",
***************
*** 89,93 ****
--- 92,102 ----
message.addBody(bodyWithNumber);
+
+ AMFBody bodyWithObject = new AMFBody("someService.someMethod",
+ "someResponse",
+ new Foo(),
+ AMFBody.DATA_TYPE_OBJECT);
+ message.addBody(bodyWithObject);
AMFBody bodyWithXML = new AMFBody("someService.someMethod",
***************
*** 97,101 ****
message.addBody(bodyWithXML);
!
return message;
--- 106,111 ----
message.addBody(bodyWithXML);
!
!
return message;
***************
*** 114,116 ****
--- 124,159 ----
}
+ public static class Foo
+ {
+ private String name;
+ private Date d;
+ private int i;
+
+
+ public Foo()
+ {
+ name = "James";
+ d = new java.util.Date();
+ i = 592;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Date getDateValue()
+ {
+ return d;
+ }
+
+ public int getIntValue()
+ {
+ return i;
+ }
+
+
+ }
+
+
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click