PLD 0200 Upload a PLD0200 File and Receive and Parse the Response

Slides:



Advertisements
Similar presentations
World Wide Web Basics Original version by Carolyn Watters (Dalhousie U. Computer Science)
Advertisements

HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
HTTP – HyperText Transfer Protocol
1 HTTP and some other odds and ends Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
CS320 Web and Internet Programming Generating HTTP Responses
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
How the web works: HTTP and CGI explained
HTTP Exercise 01. Three Internet Protocols IP TCP HTTP Routes messages thru “Inter-network “ 2-way Connection between programs on 2 computers So they.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Web, HTTP and Web Caching
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Client, Server, HTTP, IP Address, Domain Name. Client-Server Model Client Bob Yahoo Server yahoo.com/finance.html A text file named finance.html.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
Web Services 101 James Payne Managing Director for New Media / Advancement July 30, 2013.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
HTTP Protocol Specification
FTP (File Transfer Protocol) & Telnet
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
Mail (smtp), VoIP (sip, rtp)
HyperText Transfer Protocol (HTTP).  HTTP is the protocol that supports communication between web browsers and web servers.  A “Web Server” is a HTTP.
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
Application Protocols: HTTP CSNB534 Semester 2, 2007/2008 Asma Shakil.
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
Copyright (c) 2010, Dr. Kuanchin Chen1 The Client-Server Architecture of the WWW Dr. Kuanchin Chen.
Tools for Web Applications. Overview of TCP/IP Link Layer Network Layer Transport Layer Application Layer.
Operating Systems Recitation 9, May 19-20, Iterative server Handle one connection request at a time. Connection requests stored in queue associated.
HTTP Hypertext Transfer Protocol RFC 1945 (HTTP 1.0) RFC 2616 (HTTP 1.1)
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
Form Data Encoding GET – URL encoded POST – URL encoded
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
WEB SERVER Mark Kimmet Shana Blair. The Project Web Server Application  Receives request for web pages or images from a client browser via the internet.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
The Basics of HTTP Jason Dean
Web Technologies Lecture 1 The Internet and HTTP.
Web Server Design Week 13 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 4/7/10.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
Overview of Servlets and JSP
HTTP protocol Java Servlets. HTTP protocol Web system communicates with end-user via HTTP protocol HTTP protocol methods: GET, POST, HEAD, PUT, OPTIONS,
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Web Server Design Week 6 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/17/10.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
WEB1P webarch1 Web architecture Dr Jim Briggs. WEB1P webarch2 What is the web? Distributed system Client-server system Characteristics of clients and.
Simple Web Services. Internet Basics The Internet is based on a communication protocol named TCP (Transmission Control Protocol) TCP allows programs running.
SOAP, Web Service, WSDL Week 14 Web site:
INTRODUCTION Dr Mohd Soperi Mohd Zahid Semester /16.
Web Programming Week 1 Old Dominion University Department of Computer Science CS 418/518 Fall 2007 Michael L. Nelson 8/27/07.
HTTP Protocol Amanda Burrows. HTTP Protocol The HTTP protocol is used to send HTML documents through the Internet. The HTTP protocol sends the HTML documents.
Web Server Design Week 3 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 1/23/06.
HTTP – An overview.
Web Development Web Servers.
COMP2322 Lab 2 HTTP Steven Lee Feb. 8, 2017.
Uniform Resource Locators
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
Uniform Resource Locators (URLs)
Uniform Resource Locators
HTTP Hypertext Transfer Protocol
Uniform Resource Locators (URLs)
Presentation transcript:

PLD 0200 Upload a PLD0200 File and Receive and Parse the Response June 2003

PLD Flow Diagram UPS | EUR Region EBSG

PLD0200 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

THE UPLOAD

PLD0200 upload 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 Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 020082 2.0 2002101700000000000010500 000000001*AA0A1754 US 1234567002000001*BA1z1234560100002352 00001+0000000000000010 +0000000000000000LBS01PRE10 … --BOUNDARY— header message UPS | EUR Region EBSG

PLD0200 upload the PL0200 upload is a multipart message contains 2 part the two parts are delimited by --Boundary 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 Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 020082 2.0 2002101700000000000010500 000000001*AA0A1754 US 1234567002000001*BA1z1234560100002352 00001+0000000000000010 +0000000000000000LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG

PLD0200 upload each part and the main message has a a Content-type and a content-length header 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 Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 020082 2.0 2002101700000000000010500 000000001*AA0A1754 US 1234567002000001*BA1z1234560100002352 00001+0000000000000010 +0000000000000000LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG

PLD0200 upload the Content-length is one of the most important detail for a successful upload 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 Content-length: 140 AppVersion=1.0&AcceptUPSLicenseAgreement=Yes&ResponseType=application/x-ups-pld&VersionNumber=V4R1&UserId=xxx&Password=xxx Content-type: application/x-ups-binary Content-length: 719 020082 2.0 2002101700000000000010500 000000001*AA0A1754 US 1234567002000001*BA1z1234560100002352 00001+0000000000000010 +0000000000000000LBS01PRE10 … --BOUNDARY— Multipart message part 1 part 2 UPS | EUR Region EBSG

THE RESPONSE

PLD0200 RESPONSE the PLP0200 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 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld UPS | EUR Region EBSG

PLD0200 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 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld UPS | EUR Region EBSG

PLD0200 RESPONSE text/html contains HTML formatted response sample text/html part Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> UPS | EUR Region EBSG

PLD0200 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 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-psmpld contains the response type (successful, warning, error or severe error). 4 Fields - delimited by "%“ Field1: UPSOnline Field2: Version Field3: 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 is returned. Field4: PLD Upload - Message Text ReasonCode(4digits) + Description (see PLD Documentation for more Details) Sample successful upload Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Sample failed upload Content-type: application/x-ups-psmpld Content-length: 104 UPSOnLine%1.0%6931%5491PLD File contains Fatal Errors. Correct errors and resubmit. UPS | EUR Region EBSG

PLD0200 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 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 103 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 758 000200000758300000640 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04:09 PM --BOUNDARY-- part 1 text/html part 2 application/x-ups-psmpld part 3 application/x-ups-pld UPS | EUR Region EBSG

PLD0200 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: 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 KDGPLCR1 United Parcel Service11/25/02 Page:1 PLD Control Report 04.... UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-pld Value Description 0002 Number of Reports 00000746 Length of all Reports Sample1: application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 759 000200000746300000640 KDGPLCR1 United Parcel Service 01/28/03 Page:1 PLD Control Report 08:12 AM ----------- -------------------------------------------------------------------- Pickup Date:20030203 S equence#:000001111111002 #of Segments:000000000000000005 Shipper#:4334A4 Book/Page#:1111111002 Shipments:000 001 Packages:0000000001 10000008800000000Successful completion - No errors found. Value Description 3 3=Control Report 00000640 Length of Control Report Value Description 1 1=Status Report 00000088 Length of Control Report UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-pld Value Description 0002 Number of Reports 00001306 Length of all Reports Sample2: application/x-ups-pld part Content-type: application/x-ups-pld Content-length: 1319 000200001306200001200 KDGPLRS1 United Parcel Service 01/28/03 Host Access 08:28 AM PLD Error Report PAGE 1 -------------------------- ----------------------------------------------------- Err Error Code/ Message/ Tracking Seg Field Fiel d Number ID Name Contents ------------------------------------------------------------------------------- 9124 Weight cannot be zero for a non-letter. 1Z4334A46800000016 *BA ShipmentActualWeight +0000000000000000 5491 PLD File contains Fatal Errors. Correct errors a nd resubmit. 10000008800025491PLD File contains Fatal Errors. Correct errors and resubmit. Value Description 1 2=Error Report 00001200 Length of Control Report Value Description 1 1=Status Report 00000088 Length of Control Report UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-pld Status Report contains a Return Code, a Reason Code and a Reason Text fixed length: Pos. Length Description 1 4 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 0002 - Unsuccessful Return Code Fatal errors were found in the file 0003 - Unsuccessful Return Code Severe errors were found 5 4 Reason Code (see SPF Documentation for more Details) 9 Xbyte Reason Text (see SPF Documentation for more Details) Status Report Sample 1 10000008800000000Successful completion - No errors found. Status Report Sample 2 10000008800025491PLD File contains Fatal Errors. Correct errors and resubmit. Status Report Sample 3 10000008800026504Password is invalid. UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-pld Control Report the length of this report is always X * 80 Byte Insert a [CR] [LF] after each 80Bytes and you will get a well formed human readable report Sample Error Report / unparsed 300000640 KDGPLCR1 United Parcel Service 01/28/03 Page:1 PLD Control Report 08:40 AM ------------------------------------------------------------------------------- Pickup Date:20030203 Sequence#:000001111111002 #of Segments:000000000000000005 Shipper#:4334A4 Book/Page#:1111111002 Shipments:000001 Packages:0000000001 Sample Error Report / parsed 300000640 KDGPLCR1 United Parcel Service 01/28/03 Page:1 PLD Control Report 08:40 AM ------------------------------------------------------------------------------- Pickup Date:20030203 Sequence#:000001111111002 #of Segments:000000000000000005 Shipper#:4334A4 Book/Page#:1111111002 Shipments:000001 Packages:0000000001 80 UPS | EUR Region EBSG

PLD0200 RESPONSE application/x-ups-pld Error Report the length of this report is always X * 80 Byte Inset a [CR] [LF] after each 80Bytes and you will get a well formed human readable report Sample Error Report / unparsed 200001200 KDGPLRS1 United Parcel Service 01/28/03 Host Access 08:40 AM PLD Error Report PAGE 1 ------------------------------------------------------------------------------- Err Error Code/ Message/ Tracking Seg Field Field Number ID Name Contents ------------------------------------------------------------------------------- 6715 Invalid 1z Service Level for the chosen UPS services 1Z4334A45600000011 *PA PackageTrackingNumber 1Z4334A45600000011 5481 PLD File submitted with above errors. Correct for next upload. Sample Error Report / parsed 200001200 KDGPLRS1 United Parcel Service 01/28/03 Host Access 08:40 AM PLD Error Report PAGE 1 ------------------------------------------------------------------------------- Err Error Code/ Message/ Tracking Seg Field Field Number ID Name Contents 6715 Invalid 1z Service Level for the chosen UPS services 1Z4334A45600000011 *PA PackageTrackingNumber 1Z4334A45600000011 5481 PLD File submitted with above errors. Correct for next upload. 80 UPS | EUR Region EBSG

PLD0200 RESPONSE --BOUNDARY Content-type: text/html Content-length: 138 <HTML> <HEAD> <TITLE>UPS Internet Software</TITLE> </HEAD> <BODY> <P>UPS Internet Software, Copyright UPS 1998</P> </BODY> </HTML> Content-type: application/x-ups-psmpld Content-length: 104 UPSOnLine%1.0%0000%0000Successful completion - No errors found. Content-type: application/x-ups-pld Content-length: 759 000200000746300000640 KDGPLCR1 United Parcel Service 01/28/03 Page:1 PLD Control Report 08:12 AM ------------------------------------------------------------------------------- Pickup Date:20030203 Sequence#:000001111111002 #of Segments:000000000000000005 Shipper#:4334A4 Book/Page#:1111111002 Shipments:000001 Packages:0000000001 10000008800000000Successful completion - No errors found. --BOUNDARY-- The Text The Response Type – 0000 Successful The Reports – 2 Reports ( Control + Status ) UPS | EUR Region EBSG

Thank you © Copyright 2003 United Parcel Service of America, Inc. All rights reserved.