[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: UPS XML ErrorDescription.



Hi, so basically you just didn't return the description to the calling program? 

Regards, 

Wouter 

-----Original Message-----
From: Jason Baker <JasonB@xxxxxxxxxx>
Sent: donderdag 24 september 2009 22:19
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: UPS XML ErrorDescription.

Please disregard.

 

I have a program called GUPSRATE that I call from multiple programs and
return the rate, error code and error description.

 

I had all the coding for the error codes and error description in the
programs but didn't put the last PARM of UPSErrorDesc so it would return
the value back in my programs.  Duh.

 

C     *ENTRY        PLIST                               

C                   PARM                    PartNumber  

C                   PARM                    ZipCode     

C                   PARM                    UPSRate     

C                   PARM                    UPSErrorCode

C                   PARM                    UPSErrorDesc

 

Please forgive me for the stupidity and any time anyone may have spent
with this.

 

On another note, if anyone is interested in a GUPSRATE source code for
calling and returning UPSRate, UPSErrorCode and UPSErrorDesc let me
know.

 

From: Jason Baker 
Sent: Thursday, September 24, 2009 2:19 PM
To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
Subject: UPS XML ErrorDescription.

 

Hello,

 

In short, I am trying to retrieve the value of ErrorDescription from
UPS.  The name is never found in the path.

 

Below is the sections of code that is causing me difficulty:  Green
works and Red doesn't work.

 

DUPSErrorCode     S             15A          

DUPSErrorDesc     S             50A   VARYING

 

If path = '/RatingServiceSelectionResponse/Response/Error';

  If name = 'ErrorCode';                                   

    Eval UPSErrorCode = value;                             

  EndIf;                                                   

                                                           

  If name = 'ErrorDescription';                            

    Eval UPSErrorDesc = value;                             

  EndIf;                                                   

EndIf;                                                     

 

This process finds name "ErrorCode" and populates UPSErrorCode but the
name "ErrorDescription" is never found and thus nothing is ever in field
UPSErrorDesc.

 

This is the log file that shows the path of both and the value of both.

 

SetError() #13: HTTP/1.1 200 OK

recvdoc parms: identity 398

header_load_cookies() entered

recvdoc(): entered

SetError() #0:

<?xml version="1.0"?>

<RatingServiceSelectionResponse><Response><ResponseStatusCode>0</Respons
eStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescriptio
n><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>110547</ErrorCode
><ErrorDescription>ZZ is not a valid unit of measurement for dimensions
for this
shipment</ErrorDescription></Error></Response></RatingServiceSelectionRe
sponse>

http_close(): entered

 

Here is the XML part formatted for easier reading.

 

<RatingServiceSelectionResponse>

  <Response>

    <ResponseStatusCode>0</ResponseStatusCode>

    <ResponseStatusDescription>Failure</ResponseStatusDescription>

    <Error>

      <ErrorSeverity>Hard</ErrorSeverity>

      <ErrorCode>110547</ErrorCode>

      <ErrorDescription>ZZ is not a valid unit of measurement for
dimensions for this shipment</ErrorDescription>

    </Error>

  </Response>

</RatingServiceSelectionResponse>

 

Can anyone shed any light to why it would work for name "ErrorCode" but
not "ErrorDescription"?  I purposely put ZZ in for the Units of Measure
to have it come back in error.



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------