[jboss-user] [JBossWS] - Problem on receiving an object holding datetime
joaobmonteiro
do-not-reply at jboss.com
Thu Jun 25 09:27:50 EDT 2009
Hi guys,
I have many services that use complex objects holding datetime (java.util.Date) values. The problem is that I always get null for datetime attributes. How can I solve this?
I'm using JBoss AS 4.2.3-jdk6 and my ws clients are written in Delphi 7.
My classes:
| public class Document implements Serializable {
|
| private static final long serialVersionUID = 2964445290986713245L;
| private Date date;
| //getters and setters
| }
|
My ws looks like this:
| @Stateless
| @WebService
| @SOAPBinding(style=Style.RPC)
| public class DateServices {
|
| @WebMethod
| public Date dateNow(){
| return new Date();
| }
| @WebMethod
| public void printDate(@WebParam(name="documento", mode=Mode.IN) Documento documento){
| if(documento.getDate() == null)
| return;
| SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
| String data = dateFormat.format(documento.getDate());
| System.out.println(data);
| }
| }
|
Regards,
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240043#4240043
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240043
More information about the jboss-user
mailing list