You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/08/09 17:31:40 UTC
DO NOT REPLY [Bug 22272] New: -
BeanSerailizer cannot serialize casted array
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22272>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22272
BeanSerailizer cannot serialize casted array
Summary: BeanSerailizer cannot serialize casted array
Product: Axis
Version: 1.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: khun_panya@yahoo.com
I have
public class MyParent {
private Object[] internalUse() {
..... blah blah ...
}
public MyChild[] getItems() {
return (MyChild[])internalUse();
}
public void setItems(MyChild[] value) {
// do nothing
}
}
and a service method that will return MyParent class, e.g.
public class MyService {
public MyParent myMethod().....
}
and deployed with
<parameter name="className" value="mypak.MyService"/>
<parameter name="allowedMethods" value="myMethod"/>
<beanMapping qname="tns:MyParent"
languageSpecificType="java:mypak.MyParent" />
<beanMapping qname="tns:MyChild"
languageSpecificType="java:mypak.MyChild" />
It doesn't work.
I have to change getItems() method to
public MyChild[] getItems() {
int len = internalUse().length;
MyChild[] arr = new MyChild[len];
for(int i=0; i<len; i++) {
arr[i] = (MyChild)internalUse()[i];
}
return arr;
}
P.S. My Java full version is "1.4.1_02-b06"