well... researching a little bit I found this and it worked. posting
here the solution

import
com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImp
l;

XMLGregorianCalendarImpl xmlCalendar = new XMLGregorianCalendarImpl(new
GregorianCalendar());

OMElement date = fac.createOMElement("date",omNs);
date.setText(xmlCalendar.toString());
method.addChild(date);

seems that there is a bug in here
http://www.archivum.info/[email protected]/2007-02/msg00620.html

be smart


-----Original Message-----
From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2008 11:42 AM
To: [email protected]
Subject: RE: OMElement with date paremeter

adding info.
the interface of the method is clearly


public OMElement myaction(Date date) throws Exception;

-----Original Message-----
From: Asensio, Rodrigo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2008 11:14 AM
To: [email protected]
Subject: OMElement with date paremeter

axis2

my code 

                        OMFactory fac =
OMAbstractFactory.getOMFactory();
                        OMNamespace omNs =
fac.createOMNamespace("http://myns";, "ns");
                        OMElement method =
fac.createOMElement("myaction", omNs);

                        OMElement date = fac.createOMElement("date",
omNs);
                        date.setText(new Date().toString());
                        method.addChild(date);

                        String url =
"http://localhost/axis2/services/myws";;
                        ServiceClient client = new ServiceClient();
                        Options opts = new Options();
                        opts.setTo(new EndpointReference(url));
                        opts.setAction("myaction");
                        client.setOptions(opts);
                        OMElement res = client.sendReceive(method);
                        System.out.println(res);

I'm getting 
org.apache.axis2.AxisFault: invalid date format (Wed Aug 20 09:03:31 ACT
2008) wiht out - s at correct place

for sure the OMelement needs a special date format. any clue what is it 
thanks

Rodrigo

This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to