
b8d31b1b3b919f134735edde26851ce3.ppt
- Количество слайдов: 23
PLD 0200 Upload a PLD 0200 File and Receive and Parse the Response June 2003
PLD Flow Diagram UPS | EUR Region EBSG 2
PLD 0200 upload § http request message § Methode: POST § TCP/IP socket connection § Host: www. pld-certify. ups. com § PORT: 443 § URI: /hapld/tos/kdwhapltos § URL connection § URL: https: //www. pld-certify. ups. com/hapld/tos/kdwhapltos § PW+ UID: PLDDSTEST UPS | EUR Region EBSG 3
THE UPLOAD
PLD 0200 upload header POST /hapld/tos/kdwhapltos HTTP/1. 1 Host: www. pld-certify. ups. com Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 message --BOUNDARY Content-type: application/x-www-form-urlencoded Content-length: 140 App. Version=1. 0&Accept. UPSLicense. Agreement=Yes&Response. Type=application/x-ups-pld&Version. Number=V 4 R 1&User. Id=xxx&P --BOUNDARY Content-type: application/x-ups-binary Content-length: 719 020082 2. 0 2002101700000010500 00001*AA 0 A 1754 US 1234567002000001*BA 1 z 1234560100002352 00001+00000000 LBS 01 PRE 10 … --BOUNDARY— UPS | EUR Region EBSG 5
PLD 0200 upload § the PL 0200 upload is a multipart message contains 2 part § the two parts are delimited by --Boundary Multipart message POST /hapld/tos/kdwhapltos HTTP/1. 1 Host: www. pld-certify. ups. com Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded part 1 Content-length: 140 App. Version=1. 0&Accept. UPSLicense. Agreement=Yes&Response. Type=application/x-ups-pld&Version. Number=V 4 R 1&User. Id=xxx&P --BOUNDARY Content-type: application/x-ups-binary part 2 Content-length: 719 020082 2. 0 2002101700000010500 00001*AA 0 A 1754 US 1234567002000001*BA 1 z 1234560100002352 00001+00000000 LBS 01 PRE 10 … --BOUNDARY— UPS | EUR Region EBSG 6
PLD 0200 upload § each part and the main message has a a Content-type and a content-length header Multipart message POST /hapld/tos/kdwhapltos HTTP/1. 1 Host: www. pld-certify. ups. com Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY part 1 Content-type: application/x-www-form-urlencoded Content-length: 140 App. Version=1. 0&Accept. UPSLicense. Agreement=Yes&Response. Type=application/x-ups-pld&Version. Number=V 4 R 1&User. Id=xxx&P --BOUNDARY Content-type: application/x-ups-binary part 2 Content-length: 719 020082 2. 0 2002101700000010500 00001*AA 0 A 1754 US 1234567002000001*BA 1 z 1234560100002352 00001+00000000 LBS 01 PRE 10 … --BOUNDARY— UPS | EUR Region EBSG 7
PLD 0200 upload § the Content-length is one of the most important detail for a successful upload Multipart message POST /hapld/tos/kdwhapltos HTTP/1. 1 Host: www. pld-certify. ups. com Content-type: multipart/mixed; boundary=BOUNDARY Content-length: 1038 --BOUNDARY Content-type: application/x-www-form-urlencoded part 1 Content-length: 140 App. Version=1. 0&Accept. UPSLicense. Agreement=Yes&Response. Type=application/x-ups-pld&Version. Number=V 4 R 1&User. Id=xxx&P --BOUNDARY Content-type: application/x-ups-binary part 2 Content-length: 719 020082 2. 0 2002101700000010500 00001*AA 0 A 1754 US 1234567002000001*BA 1 z 1234560100002352 00001+00000000 LBS 01 PRE 10 … --BOUNDARY— UPS | EUR Region EBSG 8
THE RESPONSE
PLD 0200 RESPONSE § the PLP 0200 upload response is a multipart message contains 3 part § all 3 parts are delimited by --Boundary Multipart message HTTP/1. 1 200 OK Server: IBM-HTTP-Server/1. 0 Date: Mon, 25 Nov 2002 20: 21: 15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary= BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld
UPS Internet Software, Copyright UPS 1998
--BOUNDARY Content-type: application/x-ups-psmpld Content-length: 103 UPSOn. Line%1. 0%0000 Successful completion - No errors found. --BOUNDARY Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR 1 United Parcel Service 11/25/02 Page: 1 PLD Control Report 04: 09 PM --BOUNDARY-UPS | EUR Region EBSG 10
PLD 0200 RESPONSE text/html Multipart message HTTP/1. 1 200 OK Server: IBM-HTTP-Server/1. 0 Date: Mon, 25 Nov 2002 20: 21: 15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary= BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld
UPS Internet Software, Copyright UPS 1998
--BOUNDARY Content-type: application/x-ups-psmpld Content-length: 103 UPSOn. Line%1. 0%0000 Successful completion - No errors found. --BOUNDARY Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR 1 United Parcel Service 11/25/02 Page: 1 PLD Control Report 04: 09 PM --BOUNDARY-UPS | EUR Region EBSG 11
PLD 0200 RESPONSE text/html § contains HTML formatted response sample text/html part Content-type: text/html Content-length: 138
UPS Internet Software, Copyright UPS 1998
UPS | EUR Region EBSG 12
PLD 0200 RESPONSE application/x-ups-psmpld Multipart message HTTP/1. 1 200 OK Server: IBM-HTTP-Server/1. 0 Date: Mon, 25 Nov 2002 20: 21: 15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary= BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld
UPS Internet Software, Copyright UPS 1998
--BOUNDARY Content-type: application/x-ups-psmpld Content-length: 103 UPSOn. Line%1. 0%0000 Successful completion - No errors found. --BOUNDARY Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR 1 United Parcel Service 11/25/02 Page: 1 PLD Control Report 04: 09 PM --BOUNDARY-UPS | EUR Region EBSG 13
PLD 0200 RESPONSE application/x-ups-psmpld § contains the response type (successful, warning, error or severe error). § 4 Fields - delimited by "%“ Ø Field 1: UPSOnline Ø Field 2: Version Ø Field 3: PLD Upload - Return Codes 0000 Success - Successful upload, no warning messages. Control and Status Reports are returned. 6930 PLD Warning - Successful upload with warning messages. Error, Control and Status Reports are returned. 6931 PLD Error - Failed upload due to errors in the PLD data. Error and Status Reports are returned. 6932 PLD Severe Error - Failed upload due to errors in the input parameters. Status Report Sample successful upload is returned. Content-type: ØField 4: PLDapplication/x-ups-psmpld Upload - Message Text Content-length: 103 Reason. Code(4 digits) + Description (see PLD Documentation for more Details) UPSOn. Line%1. 0%0000 Successful completion - No errors found. Sample failed upload Content-type: application/x-ups-psmpld Content-length: 104 UPSOn. Line%1. 0%6931%5491 PLD File contains Fatal Errors. Correct errors and resubmit. UPS | EUR Region EBSG 14
PLD 0200 RESPONSE application/x-ups-pld Multipart message HTTP/1. 1 200 OK Server: IBM-HTTP-Server/1. 0 Date: Mon, 25 Nov 2002 20: 21: 15 GMT Connection: close Accept-Ranges: bytes Content-Type: multipart/mixed; boundary= BOUNDARY Content-Length: 1251 --BOUNDARY Content-type: text/html Content-length: 138 part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld
UPS Internet Software, Copyright UPS 1998
--BOUNDARY Content-type: application/x-ups-psmpld Content-length: 103 UPSOn. Line%1. 0%0000 Successful completion - No errors found. --BOUNDARY Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR 1 United Parcel Service 11/25/02 Page: 1 PLD Control Report 04: 09 PM --BOUNDARY-UPS | EUR Region EBSG 15
PLD 0200 RESPONSE application/x-ups-pld contains the reports (Status, Error and Control Reports) start with fixed length: Pos. Length Description 1 4 Number of Reports 5 8 Length of all Reporst then start again with fixed length: Pos. Length Description 1 1 Type of Report 1=Status Report 2=Error Report 3=Control Report 2 8 Length of these Report (Xbyte) 9 Xbyte Report Sample application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR 1 United Parcel Service 11/25/02 Pag UPS | EUR Region EBSG 16
PLD 0200 RESPONSE application/x-ups-pld Value 0002 00000746 Description Number of Reports Length of all Reports Sample 1: application/x-ups-pld Content-type: application/x-ups-pld Content-length: 759 000200000746300000640 KDGPLCR 1 01/28/03 Page: 1 United Parcel Service PLD Control Report 08: 12 AM --------------------------------------- Pickup Date: 20030203 S equence#: 000001111111002 #of Segments: 0000000005 Shipper#: 4334 A 4 Book/Page#: 1111111002 Shipments: 000 001 Packages: 000001 1000000880000 Successful completion - No errors found. Value 3 00000640 Description 3=Control Report Length of Control Report UPS | EUR Region EBSG Value 1 00000088 Description 1=Status Report Length of Control Report 17
PLD 0200 RESPONSE application/x-ups-pld Value 0002 00001306 Description Number of Reports Length of all Reports Sample 2: application/x-ups-pld Content-type: application/x-ups-pld Content-length: 1319 000200001306200001200 KDGPLRS 1 United Parcel Service 01/28/03 Host Access 08: 28 AM PLD Error Report PAGE 1 --------------------------------------- Error Code/ Message/ Tracking Seg Field Fiel d Number ID Name Contents ---------------------------------------- 9124 Weight cannot be zero for a non-letter. 1 Z 4334 A 46800000016 *BA Shipment. Actual. Weight +00000000 nd resubmit. Value 1 00001200 5491 PLD File contains Fatal Errors. Correct errors a 10000008800025491 PLD File contains Fatal Errors. Correct errors and Description 2=Error Report Length of Control Report UPS | EUR Region EBSG Value 1 00000088 Description 1=Status Report Length of Control Report 18
PLD 0200 RESPONSE application/x-ups-pld Status Report contains a Return Code, a Reason Code and a Reason Text fixed length: Pos. Length 1 4 Description Return Code 0000 - Successful Return Code No errors were found in the file. 0001 - Successful Warning Return Code Warning, non-fatal errors were found in the file 5 9 4 Xbyte 0002 - Unsuccessful Return Code Fatal errors were found in the file 0003 - Unsuccessful Return Code Severe errors were found Reason Code (see SPF Documentation for more Details) Reason Text (see SPF Documentation for more Details) Status Report Sample 1 1000000880000 Successful completion - No errors found. Status Report Sample 2 10000008800025491 PLD File contains Fatal Errors. Correct errors and resubmit. Status Report Sample 3 10000008800026504 Password is invalid. UPS | EUR Region EBSG 19
PLD 0200 RESPONSE application/x-ups-pld Control Report the length of this report is always X * 80 Byte Insert a [CR] [LF] after each 80 Bytes and you will get a well formed human readable report Sample Error Report / unparsed 300000640 KDGPLCR 1 United Parcel Service 01/28/03 Page: 1 PLD Control Report 08: 40 AM ---------------------------------------- Pickup Date: 20030203 Sequence#: 000001111111002 #of Segments: 0000000005 Shipper#: 4334 A 4 Book/Page#: 1111111002 Shipments: 000001 Packages: 000001 Sample Error Report / parsed 300000640 KDGPLCR 1 Page: 1 United Parcel Service PLD Control Report 01/28/03 08: 40 AM ---------------------------------------Pickup Date: 20030203 Sequence#: 000001111111002 #of Segments: 0000000005 Shipper#: 4334 A 4 Book/Page#: 1111111002 Shipments: 000001 Packages: 000001 80 UPS | EUR Region EBSG 20
PLD 0200 RESPONSE application/x-ups-pld Error Report the length of this report is always X * 80 Byte Inset a [CR] [LF] after each 80 Bytes and you will get a well formed human readable report Sample Error Report / unparsed 200001200 KDGPLRS 1 United Parcel Service 01/28/03 Host Access 08: 40 AM PLD Error Report PAGE 1 ---------------------------------------- Error Code/ Message/ Tracking Seg Field Number ID Name Contents --------------------------------------- 6715 Invalid 1 z Service Level for the chosen UPS services 1 Z 4334 A 45600000011 *PA Package. Tracking. Number 1 Z 4334 A 45600000011 5481 PLD File submitted with above errors. Correct for next upload. Sample Error Report / parsed 200001200 KDGPLRS 1 United Parcel Service Host Access PLD Error Report 01/28/03 08: 40 AM PAGE 1 ---------------------------------------Err Error Code/ Message/ Tracking Seg Field Number ID Name Contents ---------------------------------------6715 Invalid 1 z Service Level for the chosen UPS services 1 Z 4334 A 45600000011 *PA Package. Tracking. Number 1 Z 4334 A 45600000011 5481 PLD File submitted with above errors. Correct for next upload. 80 UPS | EUR Region EBSG 21
PLD 0200 RESPONSE --BOUNDARY Content-type: text/html Content-length: 138 The Text
UPS Internet Software, Copyright UPS 1998
--BOUNDARY Content-type: application/x-ups-psmpld Content-length: 104 The Response Type – 0000 Successful UPSOn. Line%1. 0%0000 Successful completion - No errors found. --BOUNDARY Content-type: application/x-ups-pld Content-length: 759 The Reports – 2 Reports ( Control + Status ) 000200000746300000640 KDGPLCR 1 United Parcel Service 01/28/03 Page: 1 PLD Control Report 08: 12 AM --------------------------------------- Pickup Date: 20030203 Sequence#: 000001111111002 #of Segments: 0000000005 Shipper#: 4334 A 4 Book/Page#: 1111111002 Shipments: 000001 Packages: 000001 1000000880000 Successful completion - No errors found. --BOUNDARY-- UPS | EUR Region EBSG 22
Thank you © Copyright Region EBSG UPS | EUR 2003 United Parcel Service of America, Inc. All rights reserved.