I am passing start and end dates in the following format:
02/03
Tried various formats like
02/03/2008
02/03/2008 00:00:00
But I get webservice throws an error to the effect:
Error in decoding SOAP Message
Caused by: java.lang.IllegalArgumentException: 02/03
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseBigInteger(Unknown Source)
Not sure whats going on.
Any suggestions will be appreciated!
You should know the actual format that target webservice is expecting…check in the wsdl/schema or contact provider…we can’t just predict…
HTH,
RMg
Are you pulling the date information from database ? it looks like SOAP decoder isn’t expecting BigInteger datatype for date field.
No. I am getting the current date string within webMethods in the format MM/dd/yyyy hh:mm:ss and then passing it to the webservice call. The field is defined as dateTime in the webservice.
The provider is telling me it needs to be type dateTime.
I am not sure what is incorrect here.
Thanks!
Try using “getCurrentDate” instead of “getCurrentDateString” since “getCurrentDateString” provides date in string format and “getCurrentDate” provides date in Date object.
The thing is I have created a connector for the webservice. The associsted doc types that were created have strings as datatype for the date fields.
I am trying to poulate these fields and test.
since they are defined as strings, I have to call the getCurrentDateString
Check the WSDL if the date field is defined as dateTime datatype if not then client need to update the wsdl. If it is defined in dateTime format then check the documentType which got created when you created the connector and see in the properties if its contentType is dateTime or string.
Verified all of that you have mentioned. It all looks ok
The content type is dateTime for both of the date fields
XML Schema dateTime values look like the following:
2008-06-02T16:35:00-06:00
2008-06-02T22:35:00Z
Mark
Could you check your SOAP request and make sure that the Request have date fields as dateTime type i.e.
2008-06-02T16:35:00-06:00 ?
And to get the expected format use the getCurrentDateString(yyyy-MM-dd) and getCurrentDateString(HH:mm:ss) and with few concat service logic to add “T” in between to get the final output 2008-06-02T16:35:00
HTH,
RMG
That “final format” does not use an explicit offset and implies that the date time value is in UTC (aka Greenwich Mean Time or GMT). You need to specify UTC or GMT as the timezone parameter to ensure that this is the case. You can alternately write code to calculate the offset.
IMHO, a better practice than leaving off the timezone offset is to specify a timezone value of “UTC” and then append a literal “Z” on the end of the date pattern.
Mark
This is the soap data that is going as the request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=“[URL]http://schemas.xmlsoap.org/soap/envelope/[/URL]” xmlns:SOAP-ENC=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]” xmlns:xsd=“[URL]http://www.w3.org/1999/XMLSchema[/URL]” xmlns:xsi=“[URL]http://www.w3.org/1999/XMLSchema-instance[/URL]” SOAP-ENV:encodingStyle=“[URL]http://schemas.xmlsoap.org/soap/encoding/[/URL]”>
SOAP-ENV:Body
<ns1:createOrUpdateProductMovement xmlns:ns1=“[URL]http://service.ws.productmovement.fuelquest.com/[/URL]”>
original
dtest5
123
109291022
111555401
1
100000004
100000008
100002039
105013191
100001169
100000857
2/6/2008 00:00
2/6/2008 00:00
122
123
false
false
11
12
34
1
1
</ns1:createOrUpdateProductMovement></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks for all the replies. The format I was passing in was incorrect.