I am converting an Java Swing application to a Scout application. I created a Webservice Consumer. When I call this webservice I get the following order:
javax.xml.ws.soap.SOAPFaultException: Server was unable to read request. ---> There is an error in XML document (1, 311). ---> String was not recognized as a valid DateTime.]]
I can still call the webService with my old Java application from the same computer. So I assume that the Scout webservice implementation or JAX have an other way to convert dates that do not match with the server side.
They look like valid XML Schema DateTimes (not Dates) to me, so I'm a bit at a loss. I assume both are defined as DateTime elements in the schema.
"There is an error in XML document (1, 311)" would point exactly between the two dates in the SOAP message, so I'm not sure whether it refers to the first or the second DateTime.
Is that the SOAP message you send with Scout to some other server and the server answers with a SOAP message with the error indicated in your first post? I would try playing a bit with the message you send (using SoapUi or TcpMon) to see what difference it makes, or compare it with what your old Java application sends.
Strange. And your old Java program sends Dates instead of DateTimes? What I don't understand is that the error message says that it is an invalid DateTime. I would expect it to say that it's an illegal Date..
The server side expects the date in the format jjjj-MM-dd. So no time and timezone info. I noticed that in the Scout Object Properties view of my webservice there is a binding file that binds the xml dataType to a adapter class.
All bindings are made to the UtcDateAdapter class.
I created a custom adapter and changed the binding for xmlType="xsd:date" to my own class.