Any updates on this issue. JAmes, did you manage to resolve this. I am getting exactly the same issue.

Ron

On 6/6/06, James Taylor < [EMAIL PROTECTED]> wrote:
I tried Calendar and I don't get an exception, however my web service client cannot interpret the structure it receives for the Calendar value.  Here's the error I get when the client receives the response:
 
Validation failed: error: Date value is malformed: java.util.GregorianCalendar[time=1149494974373,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun. util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java .util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=3,startDay=1,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2006,MONTH=5,WEEK_OF_YEAR=23,WEEK_OF_MONTH=2,DAY_OF_MONTH=5,DAY_OF_YEAR=156,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=9,SECOND=34,MILLISECOND=373,ZONE_OFFSET=-28800000,DST_OFFSET=3600000]
Since the WSDL expects an xs:dateTime, the above doesn't qualify.  Should Axis be sending the Calendar value in a different format?
 
Thanks!
 
    James

----- Original Message ----
From: Deepal Jayasinghe <[EMAIL PROTECTED] >
To: axis-user@ws.apache.org
Sent: Sunday, June 4, 2006 10:42:11 PM
Subject: Re: java.util.Date in response for RPCMessageReceiver

Hi James
Hmm , RPCMessageReceiver does not support java.util.Date but it does
support jaya.uril.Calendar . So can you please check with Calendar.

James Taylor wrote:

> Hello,
>  
> I'm trying to invoke an Axis2 web service that returns a
> java.util.Date in its response, but am getting the exception below.
> I'm using a snapshot from a few days back.  I've also included my
> sample web service implementation.  Is this supposed to work?
>  
> Thanks!
>  
>     James
>  
> org.apache.axis2.AxisFault: Exception occurred while trying to invoke
> service method echo
>  at
> org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287)
>  at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
>  at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
>  at helloworld.axis2.MyRPCClient.main(MyRPCClient.java :40)
> Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Exception
> occurred while trying to invoke service method echo; nested exception is:
>  org.apache.axiom.om.OMException: java.lang.IllegalArgumentException :
> null rcl
>  at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:142)
>  at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive (AbstractInOutSyncMessageReceiver.java:37)
>  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:480)
>  at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
>  at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:138)
>  at javax.servlet.http.HttpServlet.service (HttpServlet.java:709)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:148)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>  at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>  at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java :80)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>  at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axiom.om.OMException:
> java.lang.IllegalArgumentException: null rcl
>  at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
>  at org.apache.axiom.om.impl.llom.OMNodeImpl.build (OMNodeImpl.java:298)
>  at
> org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:584)
>  at
> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:118)
>  at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:240)
>  at
> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:197)
>  at
> org.apache.axis2.rpc.receivers.RPCUtil.processResponse (RPCUtil.java:71)
>  at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:133)
>  ... 20 more
> Caused by: java.lang.IllegalArgumentException: null rcl
>  at
> org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
>  at
> org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder (JamServiceFactoryImpl.java:173)
>  at
> org.codehaus.jam.provider.JamServiceFactoryImpl.createClassLoader(JamServiceFactoryImpl.java:137)
>  at
> org.codehaus.jam.provider.JamServiceFactoryImpl.createService (JamServiceFactoryImpl.java:78)
>  at
> org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:57)
>  at
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties (ADBXMLStreamReaderImpl.java:953)
>  at
> org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:826)
>  at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
>  at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)
>  ... 27 more
>  at org.apache.axis2.AxisFault .<init>(AxisFault.java:159)
>  ... 4 more
>  
> MyRPCService.java
> ---------------------
> package helloworld.axis2;
> public class MyRPCService {
>  public MyQuote echo(String theString) {
>       return new MyQuote (theString);
>  }
> }
>  
> MyQuote.java
> ---------------
> package helloworld.axis2;
> import java.io.Serializable;
> import java.util.Date ;
> public class MyQuote implements Serializable {
>  private String quote;
>  private Date when;
>  
>  public MyQuote () {
>  }
>  
>  public MyQuote (String theQuote) {
>   quote = theQuote;
>   when = new Date();
>  }
>  
>  public String getQuote () {
>   return quote;
>  }
>  
>  public void setQuote (String theQuote) {
>   quote = theQuote;
>  }
>  
>  public Date getWhen () {
>   return when;
>  }
>  
>  public void setWhen (Date theDate) {
>   when = theDate;
>  }
> }
> services.xml
> ------------
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <serviceGroup>
>
> <service name="MyRPCService">
>
> <description>
>
> This is a sample Web Service with one operation.
>
> </description>
>
> <parameter name="ServiceClass"
> locked="false">helloworld.axis2.MyRPCService</parameter>
>
> <operation name="echo">
>
> <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>
> <actionMapping>urn:echo</actionMapping>
>
> </operation>
>
> </service>
>
> </serviceGroup>
>
>  
>
> MyRPCClient.java
> -------------------
> package helloworld.axis2;
> import org.apache.axiom.om.OMAbstractFactory;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMFactory;
> import org.apache.axiom.om.OMNamespace;
> import org.apache.axis2.AxisFault ;
> import org.apache.axis2.addressing.EndpointReference;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.client.ServiceClient;
> public class MyRPCClient {
>     private static EndpointReference targetEPR = new
> EndpointReference(" http://localhost:8080/axis2/services/MyRPCService";);
>     public static OMElement createPayload() {
>         OMFactory fac = OMAbstractFactory.getOMFactory();
>         OMNamespace omNs = fac.createOMNamespace (
>                 "http://axis2.helloworld/xsd" ;, "rpc-ex");
>         OMElement method = fac.createOMElement("echo", omNs);
>         OMElement value = fac.createOMElement("theString", omNs);
>         value.addChild(fac.createOMText(value, "Hello World"));
>         method.addChild(value);
>         return method;
>     }
>     /**
>   * @param args
>   */
>  public static void main(String[] args) {
>      try {
>       OMElement payload = createPayload();
>                        
>             Options options = new Options();
>             options.setTo(targetEPR); // this sets the location of
> MyService service
>            
>             ServiceClient serviceClient = new ServiceClient();
>             serviceClient.setOptions(options);
>             OMElement result = serviceClient.sendReceive(payload);
>            
>             System.out.println(result);
>         } catch (AxisFault axisFault) {
>             axisFault.printStackTrace();
>         }
>  }
> }
>

--
Thanks,
Deepal
................................................................
~Future is Open~



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

Reply via email to