You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Javier Leyba <xl...@gmail.com> on 2006/09/04 14:28:16 UTC
Problem with List
Hi
I've defines a Bean like this:
----------
public final class UserNotificationBean implements Serializable {
private List notificationDescription;
public List getNotificationDescription() {
return notificationDescription;
}
public void setNotificationDescription(List notificationDescription) {
this.notificationDescription = notificationDescription;
}
}
and
public final class NotificationDescriptionBean implements Serializable {
private int notificationId;
private String topicId;
private String sourceTypeId;
private String notificationTypeId;
private String locale;
private String title;
private String description;
/**
* Set notificationId
*
* @param notificationId
*/
public void setNotificationId(Integer notificationId) {
this.notificationId = notificationId.intValue();
}
/**
* Set the topic Id
*
* @param topicId
*/
public void setTopicId(String topicId) {
this.topicId = topicId;
}
/**
* Set source type id
*
* @param sourceTypeId
*/
public void setSourceTypeId(String sourceTypeId) {
this.sourceTypeId = sourceTypeId;
}
/**
* Set notification type id
*
* @param notificationTypeId
*/
public void setNotificationTypeId(String notificationTypeId) {
this.notificationTypeId = notificationTypeId;
}
/**
* Set locale
*
* @param locale
*/
public void setLocale(String locale) {
this.locale = locale;
}
/**
* Set title
*
* @param title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* Set description
*
* @param description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Get notificationId
*
* @return notificationId
*/
public Integer getNotificationId() {
return new Integer(this.notificationId);
}
/**
* Get the topic Id
*
* @return topicId
*/
public String getTopicId() {
return this.topicId;
}
/**
* Get source type id
*
* @return sourceTypeId
*/
public String getSourceTypeId() {
return this.sourceTypeId;
}
/**
* Get notification type id
*
* @return notificationTypeId
*/
public String getNotificationTypeId() {
return this.notificationTypeId;
}
/**
* Get locale
*
* @return locale
*/
public String getLocale() {
return this.locale;
}
/**
* Get title
*
* @return title
*/
public String getTitle() {
return this.title;
}
/**
* Get description
*
* @return description
*/
public String getDescription() {
return this.description;
}
}
---------------
Then I've a ws that returns a UserNotificationBean but when I call it
I receive in my client:
- Could not convert
org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension to
bean field 'notificationDescription', type [Ljava.lang.Object;
- Exception:
java.lang.ArrayStoreException
at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:157)
at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369)
at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at notifications.proteo.bs.com.NotificationsPortSoapBindingStub.getNotificationsList(NotificationsPortSoapBindingStub.java:750)
at com.bs.proteo.notifications.client.NotificationsProxy.getNotificationsList(NotificationsProxy.java:108)
at com.bs.proteo.notifications.client.NotificationsProxy.main(NotificationsProxy.java:585)
; nested exception is:
java.lang.ArrayStoreException
---------------
Is the List parameter the origin of the problem ? If your reply is
yes, how could I solve it ?
I'm using Axis 1.3.
Thanks in advance
--
Javier Leyba
Barcelona - Spain
http://blog.leyba.com.ar
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org