function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LosintikfosLosintikfos 

Date

Hi Experts,


I am doing something like this;

Code:
Date start = sd.Start_Date__c;

and then pass start to external service like this;

stub.createServ(start);

Unfurtunately i am getting exception:

Debug Log:

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: NumberFormatException date string can not be less than 19 charactors faultcode=soapenv:Server faultactor=


I am pretty sure i need to do something to the raw value of date before passing it to the remote method.
Do anyone know what to do?

Remote Java Exception
NumberFormatException For input string: "2008-08-01"


Message Edited by Losintikfos on 10-15-2008 03:45 AM
mikefmikef
You are passing an Apex Data object into a webservice that wants a string, I think.
The error says string.

Try using format on the Data object to format the correct string your webservice wants.
SuperfellSuperfell
You are sending a date, when it sounds like the server wants a dateTime.