• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AxisFault with calender object

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.setCallID("Service1011AA25C");
task.value.setNumber(new Integer(1));

Calendar earlyStart = Calendar.getInstance();
task.value.setEarlyStart(earlyStart);

task.value.setPostcode("1011ZZ");

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));
_stub.setTimeout(this.timeOut);
System.out.println("Calling " + endPoint);
_stub.processTaskEx(task, returnCode);

All other part is ok but getting below error.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}ServiceOptimization.ErrorNumbers.20648
faultSubcode:
faultString: 2013-09-03T10:21:24.071Z cannot be read as Date, (see tag 'EarlyStart').
faultActor:
faultNode:
faultDetail:
{http://schemas.microsoft.com/2003/10/Serialization/}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?
 
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic