Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AxisFault with calender object  RSS feed

Hardikkumar Jadhav
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have to call a web service with provided WSDL.
In my existing project Axis1.2.1 framwork is used to generate the stub from WDSL.
I have generated the stub.
Now when i am sending request to web service, i am getting error due to one calender object which is passed in request.

setting calender values as below in Task Object.

TaskHolder task = new TaskHolder(new Task());
task.value.setNumber(new Integer(1));

Calendar earlyStart = Calendar.getInstance();


Web service calling code part is as below

EStatusHolder returnCode = new EStatusHolder();

Service ss= new ServiceLocator();
Binding_Service1Stub _stub = (Binding_Service1Stub) ss
.getBinding_Service1(new URL(this.endPoint));
System.out.println("Calling " + endPoint);
_stub.processTaskEx(task, returnCode);

All other part is ok but getting below error.

faultCode: {}ServiceOptimization.ErrorNumbers.20648
faultString: 2013-09-03T10:21:24.071Z cannot be read as Date, (see tag 'EarlyStart').
{}string:W6ServiceHost.Bindings.W6Exception: 2013-09-03T10:21:24.071Z cannot be read as Date, (see tag 'EarlyStart').
at W6ServiceHost.W6MessageProcessor.HandleSXPErrors(String sxpResponseBody, Boolean isSxpContext)
at W6ServiceHost.W6MessageProcessor.ProcessMessage(String requestBody, String processorTypeName, Boolean isSxpContext, W6MessageSettingProperty messageSettings)
at W6ServiceHost.W6MessageProcessor.ProcessMessage(Message requestMessage, String contractNamespace, String contractName)
at W6Services.W6ServiceBase`1.ProcessMessage(Message message)
at SyncInvokeProcessMessage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at W6ServiceHost.Behaviors.W6OperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)

I tried this web service using SOAP UI.
It is expecting date in "2013-09-03T00:00:00".

Now as i have to set calendar object in stub, how to chagne the calender date format.
Calender by default pick up as "2013-09-03T10:21:24.071Z".

Anybody can help?
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't answer that question exactly. But I can offer an alternative if you have the option to change the service contract:
Instead of a Calendar object you could pass Timezone (timezone the calendar was expressed in), Locale (used for data representation purpose) and long time (UTC time) and build the Calendar object (exact same time) on the other side with these 3 values.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!