0

I'm trying to call a "HTTP_URL_POST_STMF_XML", because the soap string that we have it could be bigger than 65500 characters.

My problem is that I don't know how to call it right. Always the call HTTP_URL_POST_STMF_XML return to me "500".

My call is the next one:

rc = HTTP_URL_POST_STMF_XML(
%trim(urlWS)
: %TRIM(filename)
: *NULL
: %paddr(Incoming)
: %addr(Incoming)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml'
: 'actionWS');

also I Tried to use the exercise nº 7 of Scott Klement but I don't know how to use. what I am doing wrong?

In the debug file "/tmp/httpapi_debug.txt" I have this response:

"ç?ËÈ
íËÁÊ  ÅÁ>È ÇÈÈø /øÑ
ä?>ÈÁ>È è`øÁ ÈÁÌÈ Ì_%
ë! & ÄÈÑ?> øÊ?ÄÁËËëÇÑø_Á>È!ÊÀÁÊäÊÁ/ÈÁ
ä?>ÈÁ>È <Á>ÅÈÇ

                                                                        ËÁ>ÀÊ/Ï    Á>ÈÁÊÁÀ                                                    

PARUNIC

8001-255666-P-1-9 Á>ÈÁÊÁÀ çèè&
ñ>ÈÁÊ>/% ëÁÊÎÁÊ áÊÊ?Ê à/ÈÁ ëÍ> àÁÄ å(è
ä?>ÈÁ>È è`øÁ ÈÁÌÈ Ì_% ÄÇ/ÊËÁÈ ÍÈÃ
èÊ/>ËÃÁÊ á>Ä?ÀÑ>Å ÄÇÍ>,ÁÀ

                                                                        ëÁÈáÊÊ?Ê   J    çèè&         ñ>ÈÁÊ>/% ëÁÊÎÁÊ áÊÊ?Ê                    

"

Regards

sigsag
  • 37
  • 8
  • I believe this could help you. Éxito [Extjs4 Sending accented characters to the server][1] [1]: http://stackoverflow.com/questions/25787764/extjs4-sending-accented-characters-to-the-server/25811838#25811838 – Jairo R. Flores Dec 09 '14 at 12:34

1 Answers1

3

a 500 is usually an issue with the server, but in this case I wonder if it is a character encoding issue. What is the CCSID of the stream file? WRKLNK and see what the CCSID is. Also, make sure the very first characters are <?xml version="1.0" encoding="utf-8"?> There should be nothing else: not a space, not a carriage return, nothing. You can look at the file in hex with DSPF to see what is in there.

Buck Calabro
  • 7,558
  • 22
  • 25
  • Hello Buck! The first characters are ok. The file starts without any blank space. the XML file starts with "" and the file in my ifs has "CCSID = 284". – sigsag Dec 07 '14 at 20:07
  • 284 is Spanish EBCDIC. The web site almost certainly wants either ASCII or UTF-8. UTF-8 is CCSID 1208. If Scott's API doesn't do the conversion, try creating your file with CCSID 1208. – Buck Calabro Dec 07 '14 at 21:08
  • Ok, but I can't create a file with this CCSID (1208). I'm creating a file like this. fd = open('/tmsclxml/vITEMws6.xml' : O_WRONLY+O_CREAT+O_TEXTDATA : O_RDWR : 1208); but in the properties of this file appears "ID de juego de caracteres codificados : 284 " the spanish code (284) I don't know how to change/create it ¿? – sigsag Dec 07 '14 at 21:42
  • ok, I had seen that I need one more parameter "O_CCSID" to indicate the new CSSID. Thank you for your help one more time!! – sigsag Dec 07 '14 at 21:51
  • One more thing: I think that if you write to an existing file, yu keep the file's original CCSID. You can't change it with open() - you need to delete it (maybe with unlink()) and re-create it with open(). – Buck Calabro Dec 07 '14 at 21:53