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

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



Christian,

I am somewhat lost, because from what I understood so far is that your program produces and sends the right data. At least that is what my log and the HTTPAPI log showed us.

Nevertheless let us try to check two more things:

a) What statements did you have to change to fix the 'Ü' problem? Are you talking about the statements that produce the XML message? Statements like this one:

g_requestBuffer =                                                
   '<?xml version="1.0" encoding="UTF-8"?>'                     +
   '<soapenv:Envelope'                                          +
   ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";';

For those statements I suggest to change the double quotes (") to single quotes (') like this:

g_requestBuffer =                                                
   '<?xml version=''1.0'' encoding=''UTF-8''?>'                     +
   '<soapenv:Envelope'                                          +
   ' xmlns:soapenv=''http://schemas.xmlsoap.org/soap/envelope/''';

Please notice that you need to replace one double quote with two single quotes to satisfy the RPG compiler.

b) Is it possible to get a debug log from the receiving server to see what it received? It was great if we could get a log from a message sent by soapUI and a message sent by the RPG program. I wonder what the differences are.

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von larsenvalverde@xxxxxxxxx
Gesendet: Dienstag, 3. November 2015 20:01
An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Fwd: Posting data in CCSID 1026 not well received by server in UFT-8

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
-----------------------------------------------------------------------
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------