WSDL2RPG FAQ. FAQ How to Send Base64 Encoded Passwords

Similar documents
WSDL2RPG FAQ. How to Troubleshoot Performance Problems

Contents. ARSXML... 1 Purpose... 1 Syntax... 1 Description... 2 Parameters for ARSXML [add update delete]... 2 Parameters for ARSXML export...

Unicode Support. Chapter 2:

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

CS603: Distributed Systems

RPC. Remote Procedure Calls. Robert Grimm New York University

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

Distributed Systems 8. Remote Procedure Calls

End-to-End Data. Presentation Formatting. Difficulties. Outline Formatting Compression

Overview. Exercise 0: Implementing a Client. Setup and Preparation

LZ UTF8. LZ UTF8 is a practical text compression library and stream format designed with the following objectives and properties:

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

Chapter 4 Communication

CFX_BASE64. A Base64 Solution for ColdFusion Users. For Windows, Linux & Solaris. Software Version 3.0. Published 02/12/2003

The following steps guide you through logging in to the Virtual Gateway:

Sysco Market Login Help

Overview. Exercise 0: Implementing a Client. Setup and Preparation

European Publication Server - Web Service Access 1.1 -

Casabac Unicode Support

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

Chapter 4: Computer Codes. In this chapter you will learn about:

Slide 1 Side Effects Duration: 00:00:53 Advance mode: Auto

Security Instructions:

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

CSCI-1680 RPC and Data Representation John Jannotti

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

This is a list of questions and answers about Unicode in Perl, intended to be read after perlunitut.

IT101. Characters: from ASCII to Unicode

Distributed Systems. Web Services (WS) and Service Oriented Architectures (SOA) László Böszörményi Distributed Systems Web Services - 1

A short introduction to Web Services

A. Getting Started About e-access Enrolling in e-access: Authenticating your account Login... 5

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

TARGETPROCESS JIRA INTEGRATION GUIDE

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

To begin using the CEO portal, you will need to complete the new user setup.

Distributed Systems Recitation 3. Tamim Jabban

Web services (GSE NL)

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

CS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction

Homework #5: Low Level File I/O Drill Problem #1

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017

Remote Procedure Call

Communication. Distributed Systems IT332

OptRight WageView Employee Reference Guide

Interfaces to tools: applications, libraries, Web applications, and Web services

Binary Codes. Dr. Mudathir A. Fagiri

Apache Thrift Introduction & Tutorial

This is a sample chapter from Brad Stone s training e-rpg Powertools Stone on CGIDEV2 Get your copy of this important training now.

Release Bulletin Mainframe Connect Client Option for CICS 15.0

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy

Communication in Distributed Systems

CS 430 Computer Architecture. C/Assembler Arithmetic and Memory Access William J. Taffe. David Patterson

COMPETITIVE ANALYSIS ACTION GUIDE

Self Service Registration Quick Reference

Remote Procedure Calls (RPC)

Distributed Systems Lecture 2 1. External Data Representation and Marshalling (Sec. 4.3) Request reply protocol (failure modes) (Sec. 4.

At the end of this module, the student should be able to:

Distributed Multitiered Application

DEVELOPER GUIDE PART C DEVELOPMENT STEPS

Request for Comments: 913 September 1984

SHORT NOTES / INTEGRATION AND MESSAGING

IB Computer Science Topic.2-

Chapter 4: Inter-process Communications

Table of Contents. EPSS help desk. Phone: (English, French, German, Dutch, Greek)

Variables and Data Representation

LICKING MEMORIAL HOSPITAL PATIENT PORTAL LOGON GUIDE

Reading Area Community College. Password Manager User Guide

External Data Representation (XDR)

Ch. 11: References & the Copy-Constructor. - continued -

Iowa State University: Employment System Frequently Asked Questions (FAQ)

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

(Refer Slide Time: 01:25)

Protocols SPL/ SPL

Text Compression through Huffman Coding. Terminology

What Is It? Instruction Register Address Register Data Register

SafetyNet Web Services

1 Achieving IND-CPA security

Logging Into PaymentNet for the First Time March 2015 Page 1 of 5

Ethereal Lab: Getting Started

Why Axis2: The Future of Web Services. Eran Chinthaka Apache Software Foundation & WSO2

PASSWORD RESET PORTAL USER MANUAL

Introduction to the Cisco ANM Web Services API

CITS2401 Computer Analysis & Visualisation

Logging in. Below this is a series of links to the course structure documentation for each unit in the Level 3 Diploma in Castings Technology.

ALICE: An introduction to progamming

LICKING MEMORIAL HOSPITAL PATIENT PORTAL SELF-ENROLLMENT GUIDE

Remote Procedure Call (RPC) and Transparency

C exam. IBM C IBM WebSphere Application Server Developer Tools V8.5 with Liberty Profile. Version: 1.

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

CISC-124. Casting. // this would fail because we can t assign a double value to an int // variable

Introduction. Lecture 1 MIT 12043, Fundamentals of Programming By: S. Sabraz Nawaz

CS Computer Architecture

Iowa State University: Employment System Frequently Asked Questions (FAQ)

Chapter 2. Instruction Set. RISC vs. CISC Instruction set. The University of Adelaide, School of Computer Science 18 September 2017

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Getting started with OWASP WebGoat 4.0 and SOAPUI.

Patients' FAQs. Patient Portal Version 2.7 NEXTMD.COM

Q.1. (a) [4 marks] List and briefly explain four reasons why resource sharing is beneficial.

Contents of Lecture 3

Transcription:

WSDL2RPG FAQ FAQ How to Send Base64 Encoded Passwords Status of this Document Date: 24.11.2011 Version: 1.0 Question My WSDL file specifies an element of type base64binary to carry a password to the server. Although I specify the proper password I get back an error message Invalid User/Password. What am I doing wrong? Short Answer In order to solve that problem you have to translate your password from EBCDIC to the CCSID of the target system before the Base64 marshaller encodes the password to Base64. You can include the necessary statements directly in the stub module: * Temporary fields for converting the password D passwordebcdic S 512A inz D passwordascii S like(passwordebcdic ) D based(ppasswordascii) D length S 10I 0 inz // Translate password from job CCSID to // CCSID of the remote POST data passwordebcdic = i_tns_authcredentials.password; length = HTTP_xlatedyn( %len(i_tns_authcredentials.password) : %addr(passwordebcdic) : TO_ASCII : ppasswordascii); // Produce SOAP request message request = '<?xml version="1.0" encoding="utf-8"?>' +... '<tns:password>' + // i_tns_authcredentials.password %subst(passwordascii: 1: length) ) + '</tns:password>' +... // Do not forget to free the password pointer dealloc(n) ppasswordascii;

Starting with v1.15 you can add getpostccsid() as the last parameter to ) to let your stub module take care for the correct character conversion: i_tns_authcredentials.password Answer Actually the Base64 encoding is used to send true binary data, for example a file, from one system to another system. Of course everybody expects that both files (source and target file) must exactly match. On the other hand people forget that basic feature of Base64 when sending passwords or other character data to a remote system. While this is not a problem if both systems use the same character encoding scheme, it is a problem if the CCSIDs are different. Most of the time that is true if our beloved System i is part of the communication. Sending Binary Data Again, if we are going to send binary data we want to receive the data unchanged on the target system. Hence usually the process is simple: First System A reads the data from the file and passes it to the Base64 encoder. Then the encoded data is added to the SOAP envelope and send to System B. The target system retrieves the Base64 encoded data stream from the SOAP envelope and calls the Base64 decoder to decode the data. Eventually the decoded data is written to a file. At the end of the process file B is an exact copy of file A.

Sending Character Data Now let us see what the difference that makes for character data. Let us assume we have a System i that wants to exchange data with a Java application. The CCSIDs we are faced with are EBCDIC on our local system and UTF-8 on the remote server. So what happens when we transfer the data just the way we do it for binary data? The following picture illustrates the answer: Since the byte sequence of the character data is exactly the same on both systems, the character representation is different, because the source system used EBCDIC to represent ThePassword and the target system uses UTF-8 to interpret the byte sequence. Naturally a following logon process must return Invalid User/Password. We can fix that problem by translating ThePassword from EBCDIC to UTF-8 before passing it to the Base64 encoder as shown here:

Receiving Character Data You may already know what to do when you receive Base64 encoded data from a UTF-8 system, don t you? The same character encoding problems we have when sending character data happens to happen when receiving character data. In order to fix that problem we have to convert the decoded data from UTF-8 to EBCDIC. Please notice the different data flow from right to left: Integrated Character Translation Support Starting with v1.15 WSDL2RPG can do the proper character translation for you. Either set the new parameter BASE64TYPE to *CHAR when generating the stub module or change ) and Un) by hand as shown below: Sending data: i_tns_authcredentials.password Receiving data: currentitem.value = Un value Please remember that you have to add getpostccsid() for character data and that you have to remove it for binary data. It is not unlikely that you may have stub modules with both flavours of the Base64 marshallers and unmarshallers depending on the type of data.

Your comments are important to me! Please send me your comments about this FAQ. I will greatly appreciate it. thomas.raddatz@tools400.de