Kbase P97088: Error: Web service SOAP faultstring includes: SQLDateTime overflow.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  03/11/2004 |
|
Status: Unverified
SYMPTOM(s):
QLDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
Web service operation GetComplaintsByBureau generated a SOAP Fault
SOAP faultstring is: Server was unable to process request. -->SQLDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
Invoking a Web service that expects a EndDate and an EndDate elements in the SOAP request message and preparing the document using the following code:
/* Prepare the INPUT XML document and send it as a LONGCHAR variable*/
CREATE X-DOCUMENT hMyDocument.
CREATE X-NODEREF hMyRootElement.
CREATE X-NODEREF hNode.
CREATE X-NODEREF hText.
hMyDocument:CREATE-NODE(hMyRootElement,"GetComplaintsByBureau","ELEMENT").
hMyDocument:APPEND-CHILD(hMyRootElement).
hMyRootElement:SET-ATTRIBUTE("xmlns","http://tempuri.org/BBBMis/Service1").
hMyDocument:CREATE-NODE(hNode,"StartDate","ELEMENT").
hMyRootElement:APPEND-CHILD(hNode).
hMyDocument:CREATE-NODE(hText,?,"TEXT").
hText:NODE-VALUE = dStartDate.
hNode:APPEND-CHILD(hText).
hMyDocument:CREATE-NODE(hNode,"EndDate","ELEMENT").
hMyRootElement:APPEND-CHILD(hNode).
hMyDocument:CREATE-NODE(hText,?,"TEXT").
hText:NODE-VALUE = dEndDate.
hNode:APPEND-CHILD(hText).
hMyDocument:CREATE-NODE(hNode,"BBBID","ELEMENT").
hMyRootElement:APPEND-CHILD(hNode).
hMyDocument:CREATE-NODE(hText,?,"TEXT").
hText:NODE-VALUE = string("1066").
hNode:APPEND-CHILD(hText).
hMyDocument:SAVE("longchar",lcInputDoc).
CAUSE:
The date needs to sent using the ISO-DATE format.
FIX:
Use the ISO-DATE function to change the two offending statements and send the date in the required ISO-DATE format:
hText:NODE-VALUE = dStartDate.
and
hText:NODE-VALUE = dEndDate.
To:
hText:NODE-VALUE = ISO-DATE(dStartDate).
and
hText:NODE-VALUE = ISO-DATE(dEndDate).