Probably you have to write a metod in your client to deserialize that
object, and you need to do your class Alert implementing serializable.
ES: public class Alert implements serializable{
attributes...
public Allert(){}
}
Remember you have to do a class with an empty constructor.
Then befor you use the metod Invoke you ha to do this:

QName qnameAlert = new QName("urn:nameWebService", "Alert");
Class classeAlert = Alert.class;
call.registerTypeMapping(classeAlert, qnameAlert,
BeanSerializerFactory.class,
BeanDeserializerFactory.class);

BeanSerializer/DeserializerFactory.class make for you serialization and
deserialization.
Bye.
Il giorno mar, 28/07/2009 alle 16.47 -0700, guitarro17 ha scritto:
> Let me explain. 
> I have this object:
> public class Alert {
>       private String name;
>       private String approximateStartDate;
>       private String startDate;
>       private String stopDate;
>         ...
> }
> And in my webservice, I have this method:
>       public Alert[] getAlerts() throws Exception{
>               Vector<Alert> vetorAlerts = new Vector<Alert>();
>               vetorAlerts = leitor.readAlerts();
> 
>         Alert[] Alerts = new Alert[vetorAlerts.size()];
>         for(int i=0; i<vetorAlerts.size(); i++){
>             Alerts[i]=vetorAlerts.get(i);
>         }
>               return Alerts;
>       }
> 
> But When I'm trying to access this with J2SE, just like this:
>               Call call = (Call) new Service().createCall();
>               call.setTargetEndpointAddress(local);
>               call.setOperationName("getAlerts");
>               Object[] param = null;
>               Alert alerts[] = (Alert[])call.invoke(param);
> 
> I'm getting this error:
> 
> Unable to find required classes (javax.activation.DataHandler and
> javax.mail.internet.MimeMultipart). Attachment support is disabled.
> - Exception:
> org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
> which is NOT expected, in something it was trying to deserialize.
>       at
> org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
> ...
> 
> I have no idea what I need to do to solve this problem =(
> 

Reply via email to