passing a serialized object
In xmlrpc objects need to be serialized before they can be transmitted
across a network, so this is what I am trying to do.
addAuthorName = txtAddAuthorName.getText();
int addArticleNumber =
Integer.parseInt(txtAddArticleNumber.getText());
newArticle = new Article(addAuthorName, addArticleNumber);
ObjectOutputStream oos;
oos = new ObjectOutputStream(
new ByteArrayOutputStream());
oos.writeObject(newArticle);
Vector<Object> addArticleArglist = new Vector<Object>();
addArticleArglist.addElement(oos);
System.out.println(oos);
// make the call
String callit = ("GetSize.addHash");
articleID = (Integer) client.execute(callit, addArticleArglist);
The problem I am getting is that my program will not accept the
outputstream that is contained in the vector the error given is
unsupported Java type: class java.io.ObjectOutputStream
No comments:
Post a Comment