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

Re: Fwd: Posting data in CCSID 1026 not well received by server in UFT-8



Christian,

Please don't take the encoding of the debug log to mean anything, really.... The problem there is that when the debug log is created, it doesn't know what the data will be. It might not even be text at all... it might be an image file, zip file, PDF file, etc, etc... it could be anything. You may have multiple HTTP requests in the same debug log, and they all may have different data that is encoded differently. Or, the HTTP protocol itself may be encoded differently than, say, an XML document that you send. So there really is not a perfect CCSID value to mark the log as... it just picks 819 as a common choice.

But, the raw binary values of the data in the debug log should be accurate. So if you want to know the exact values that are sent/received, just ignore the CCSID of the file header and look at the raw data in the file.

-SK



On 11/3/2015 1:00 PM, larsenvalverde@xxxxxxxxx wrote:
Hi again Thomas,

I will post you tomorrow an HTTP debug log, but the data in the debug log is viewed correctly.

The thing is. The file created with the code you gave to me...

           // Open input stream in order to dump the message
           hInpStream = MessageContext_InputStream_open(hMsgCtx);

           // if 1=2;
           fd = -1;
           count = MessageContext_InputStream_read(
                         hInpStream: %addr(buffer): %size(buffer));
           dow (count > 0);
              if (fd = -1);
                 fd = open('/home/raddatz/wsdl2rpg/WSDLI41001_request.xml'
                      : O_CREAT+O_EXCL+O_SHARE_RDONLY+O_WRONLY+O_CCSID
                      : S_IRWXU+S_IRWXG+S_IRWXO
                      : getPostCcsid());
              endif;
              callp write(fd: %addr(buffer): count);
              count = MessageContext_InputStream_read(
                            hInpStream: %addr(buffer): %size(buffer));
           enddo;

           if (fd <> -1);
              callp close(fd);
           endif;

           // Re-Open input stream in order to send the message
           reOpenInputStream(hMsgCtx: hInpStream);


...was created in my IFS with CCSID 1208. But the HTTP debug log is created with CCSID 819. If I take the XML from the debug log, and I use (for example) Notepad++ from Windows, to open it, I can choose between UTF-8 encoding, or ANSI (the file is opened this way by default).   If I leave it in ANSI, and I copy and paste the XML in SoapUI, and I send it to the server, the data is NOT received well.  BUT, if I change the encoding to UTF-8, and I copy/paste the XML in SoapUI, the data is received perfectly.  That’s why I thing that is a problem with my system and not with the server system (they tell me that the problem is with the data that I’m sending them).

There’s another thing.   When I use WSDL2RPG to create the programs, I have problems with the character “ (double quote), because when I change my job ccsid, the double quote in turkish ccsid (1026) is represented as a  Ü.  I have changed all the double quotes for Ü , to make it works…

With your answer, I have to assume that the data sent is ok… so the server computer must be receiving the data correctly…. (?).  I have not other way to know if they are telling me the truth…

Christian.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------