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

Re: [Ftpapi] YNT: YNT: [Supheli E-Posta] Re: YNT: SetError() #73: CCSID conversion failed



Hi Nihat,

I'm not sure that translating the XML entities to plain characters without fully parsing the XML would be a good idea.  The resulting data may not be valid XML.  You are welcome to write your own software to do that if you wish, but HTTPAPI is not going to do that for you.

If you wish to parse the XML and utilize the already parsed response, that is certainly something I can help you with. Though, honestly, I would use XML-INTO instead of http_parse_xml_string() for new programs.

I did not mean to imply that http_req() would parse XML for you.  Merely that its a simpler/better alternative than http_url_parse_raw() for doing HTTP communication.

-SK


On 11/19/2020 8:03 AM, Nihat Ezer wrote:

Scott,

 

Managed to properly see the XML entities in name-value pairs by http_parse_xml_string().

 

However, i need to store the response itself in this way, but neither can reproduce the response from the name-value pairs nor can retrieve it with proper status

 

http_req() did not help much, as the result is the same as before

 

--

Thank you,

Nihat

 

Kimden: Nihat Ezer
Tarih: Thursday, November 19, 2020 12:49 AM
Kime: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Konu: YNT: [Ftpapi] YNT: [Supheli E-Posta] Re: YNT: SetError() #73: CCSID conversion failed

 

Scott,

 

Being newbie yet, I thought that either of the http_url_post_raw() and http_xlatedyn() does it on behalf of expat as it is included/embedded in HTTPAPI.

 

Here is the point i missed actually and what i am asking you for help on how to get it done.

 

--

Cheers,

Nihat

 

Kimden: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> Yerine Scott Klement
Tarih: Thursday, November 19, 2020 12:22 AM
Kime: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Konu: Re: [Ftpapi] YNT: [Supheli E-Posta] Re: YNT: SetError() #73: CCSID conversion failed

 

DİKKAT: Bu e-posta kurum dışından gönderilmiştir. Zararlı dosya veya bağlantılar (link) içerebilir. Kaynağından emin olmadığınız dosyaları/bağlantıları (link) açarken veya e-postayı cevaplarken dikkatli olunuz.


Nihat,

Apologies if I missed that.. I didn't see anywhere in this conversation where you mentioned you were using expat.  Can you show us the code that calls expat and how you're receiving the output from it?

-SK

On 11/18/2020 2:25 PM, Nihat Ezer wrote:

My XML parser is apparently the one included in HTTPAPI, eXpat, and here is the screen from its installation document attached to the mail, did i miss something with it?

 

                      Version 1.40 Released 2019-08-15                       

                                                                              

 In version 1.10 of HTTPAPI, routines are available for parsing XML data     

 received from web servers. These routines require the use of an open-source 

 XML parsing software called <eXpat/>.   http://www.libexpat.org             

                                                                              

 Would you like to build eXpat from source code?                  Y           

    - This requires a working ILE C compiler.                                

    - This requires the System Openness Includes library                     

    - Select N here if you have a pre-built copy of eXpat in                 

        LIBHTTP.                                                             

                                                                              

 Would you like to compile support for eXpat into HTTPAPI?        Y          

     - This requires a V5R1 or later release of the ILE RPG compiler         

                                                                              

F3=Exit                                                Press ENTER to continue

 

--

Cheers,

Nihat

 

Kimden: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> Yerine Scott Klement
Tarih: Wednesday, November 18, 2020 11:02 PM
Kime: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Konu: [Supheli E-Posta] Re: [Ftpapi] YNT: SetError() #73: CCSID conversion failed

 

DİKKAT: Bu e-posta kurum dışından gönderilmiştir. Zararlı dosya veya bağlantılar (link) içerebilir. Kaynağından emin olmadığınız dosyaları/bağlantıları (link) açarken veya e-postayı cevaplarken dikkatli olunuz.


Your XML parser should do that automatically.

 

On 11/18/2020 1:30 PM, Nihat Ezer wrote:

Instead of unicode decimal codes like &#305; and &#231; i would like to properly see the small letter dotless I and small letter C with cedilla respectively, otherwise they would not make sense much to Turkish end-users. Moreover, i need your help on how to get it done.

 

--

Cheers,

Nihat

 

Kimden: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> Yerine John Place
Tarih: Wednesday, November 18, 2020 10:12 PM
Kime: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Konu: [Supheli E-Posta] Re: [Ftpapi] SetError() #73: CCSID conversion failed

 

DİKKAT: Bu e-posta kurum dışından gönderilmiştir. Zararlı dosya veya bağlantılar (link) içerebilir. Kaynağından emin olmadığınız dosyaları/bağlantıları (link) açarken veya e-postayı cevaplarken dikkatli olunuz.


NSFW – Just throwing that out there

 

--

Thank You,
John Place

284 Fuel Supply LLC
General Manager
Direct Line: 563-468-5289
Cell: 563-529-0162
Email: John.Place@xxxxxxxxxxxxxxx
            
Notice:  Any agreement discussed or implied in this message is for discussion purposes only and may not be relied upon to bind the company.  Agreements are binding only when fully committed to writing and executed by authorized representatives of all the parties.  The information contained herein, while provided in good faith and believed to be accurate, is provided by 284 Fuel Supply, LLC and or Iowa 80 Group, Inc. and their affiliates as an accommodation to their readers for information purposes only, it is not guaranteed as to accuracy or completeness.  The information contained in this communication is confidential and is intended only for the use of the addressee. It is solely the property of 284 Fuel Supply and or Iowa 80 Group Inc. and their affiliates. Unauthorized use of this information, in whole or in part, is strictly prohibited. If you have received this communication in error, please notify us immediately by return e-mail and destroy this communication, including all attachments and any copies.

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Wednesday, November 18, 2020 11:46
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Ftpapi] SetError() #73: CCSID conversion failed

 

According to the manual this error code means "The conversion stopped because of an incomplete character or shift state sequence at the end of the input buffer."

Is it possible that the receiveBuffer.size is incorrect?  Or, whatever process you are using to write the data to the receiveBuffer is not writing it correctly?

Does it work better if you use http_req()?

 

On 11/18/2020 12:10 AM, Nihat Ezer wrote:

Greetings,

 

Attempting to run the following, i have seen that response is not seen properly as it contains special characters with Unicode decimal codes such as &#305; &#231; etc, and gives error message, "SetError() Ö73: CCSID conversion failed: The value specified for the argument is not correct."

 

What am i doing wrong or this could be due to something wrong on the other side, debug or trace file is attached to the mail, can you please advise ?

 

dcl-s peIstekCevap varchar(9999);

dcl-ds receiveBuffer qualified;

   size int(10) inz;

   data char(32767) inz;

end-ds;

 

http_setCCSIDs(1208:1026);

loReturnCode = http_url_post_raw(glUrl

                  : %addr(peIstekCevap)+2

                  : %len(%trim(peIstekCevap))

                  : FD

                  : %paddr(asws_httpVeriyiAl)

                  : HTTP_TIMEOUT

                  : *omit

                  : 'text/xml; charset=UTF-8'

                  : '"http://xxx.com/CoreIns/aMethod"'

 

http_xlatedyn(receiveBuffer.size: %addr(receiveBuffer.data) : TO_EBCDIC: pEbcdic);

 

--

Thank you,

Nihat

 

 



 


-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi