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

Re: Issue with POST Connection (With CDATA XML)



   Mario,
   You have enabled an old feature of HTTPAPI that has been left intact
   for backwards compatibility... it uses tables for translation (instead
   of CCSIDs).   When you do this, the CCSIDs you define to HTTPAPI are
   irrelevant, since the tables will be used instead.   You cannot support
   Unicode with tables.
   This is configured by hand before compiling HTTPAPI.  It is configured
   by changing the CONFIG_H code.  If you look in that code, you'll see
   something like this:
    /undefine HTTP_USE_TABLES
    /if defined(HTTP_USE_TABLES)
   D HTTP_TOEBC      C                   CONST('QTCPEBC')
   D HTTP_TOASC      C                   CONST('QTCPASC')
    /else
   D HTTP_EBCDIC     C                   CONST(0)
   D HTTP_ASCII      C                   CONST(819)
    /endif
   In yours, you have 'HTTP_USE_TABLES' defined (not 'undefined', as I
   have above.)   You should change this to use 'undefined', and then
   recompile HTTPAPI (by re-calling the INSTALL program provided).  This
   will allow you to use CCSIDs instead of tables.  Once using CCSIDs, you
   should get the proper symbols if you have the proper CCSIDs defined to
   HTTPAPI.
   I don't remember if there are any bugs related to this in version 1.13
   (which was 8 years ago!).   So if you still have problems, the next
   step is to update HTTPAPI.

   On 2/3/2014 3:34 PM, Mario Salgado Montenegro wrote:

   I have this issue, trying to make the post without luck, please let me
   know what's wrong
   Thanks
   1.- DEBUG FILE (AS400)
   HTTPAPI Ver 1.13.1 released 2006-01-03
   New tables set, ASCII=QTCPASC. EBCDIC=QTCPEBC
   SetError() ¬69: HTTPAPI was compiled to use tables rather than CCSIDs
   http_url_post(): entered
   http_persist_open(): entered
   http_long_ParseURL(): entered
   http_persist_post(): entered
   http_long_ParseURL(): entered
   do_post(): entered
   POST /singecmotorcitas/citas.asmx HTTP/1.1
   Host: 172.30.7.2
   User-Agent: Mozilla/5.0 (X11; U; OS400)
   Content-Type: text/xml;charset=iso-8859-1
   SOAPAction: [1][1]http://tempuri.org/ws_MotorSINGEC/Citas/RecibeXML
   Expect: 100-continue
   Content-Length: 1384
   recvresp(): entered
   HTTP/1.1 100 Continue
   Via: 1.1 MIGRA-ISA
   SetError() ¬13: HTTP/1.1 100 Continue
   senddoc(): entered
   <soap:Envelope xmlns:xsi="[2][2]http://www.w3.org/2001/XMLSchema-instance";
   xmlns:xsd="[3][3]http://www.w3.org/2001/XMLSchema";
   xmlns:soap="[4][4]http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><R
   ecibeXML
   xmlns="[5][5]http://tempuri.org/ws_MotorSINGEC/Citas";><stringXML><&#65533;&#6
5533;CDATA
   &#65533;<?xml version="1.0" encoding="utf-8"?><cita ciudad="2"
   idTransaccion="" tipoCita="1" numTransaccion="" idCita="" fechaCita=""
   horaCita="" confirm="0"
   estatusConfirm=""><ciudadano><numeroIdentidad>0501-1982-01837</numeroId
   entidad><nombreCompleto>Felipe Garcia
   Calero</nombreCompleto><numeroIdentificacion></numeroIdentificacion></c
   iudadano><datosTransaccion><fechaTransaccion>15/01/2014</fechaTransacci
   on><idSucursal>01</idSucursal><duracionPasaporte>2</duracionPasaporte><
   costoPasaporte>0</costoPasaporte><costoCita>0</costoCita><montoCredito>
   0</montoCredito><totalTransaccion>0</totalTransaccion><tipoCambio>0</ti
   poCambio><folioTGR1>0</folioTGR1><transaccionExtranjero><pais></pais><c
   iudad></ciudad><tipoServicio></tipoServicio><numDocPago></numDocPago><c
   omentarioPago></comentarioPago><montoPago></montoPago></transaccionExtr
   anjero></datosTransaccion><pasaporteAnterior><libretaAnterior></libreta
   Anterior><fechaExpedicion></fechaExpedicion><fechaVencimiento></fechaVe
   ncimiento><tiempoVigencia></tiempoVigencia><mesesVigencia></mesesVigenc
   ia></pasaporteAnterior></cita>!!></stringXML></RecibeXML></soap:Body></
   soap:Envelope>
   recvresp(): entered
   HTTP/1.1 500 Internal Server Error.
   Connection: Keep-Alive
   Content-Length: 578
   Date: Mon, 03 Feb 2014 19:44:50 GMT
   Content-Type: text/xml; charset=utf-8
   Server: Microsoft-IIS/6.0
   X-Powered-By: [6]ASP.NET
   X-AspNet-Version: 1.1.4322
   Cache-Control: private
   SetError() ¬13: HTTP/1.1 500 Internal Server Error.
   recvdoc parms: identity 578
   recvdoc(): entered
   SetError() ¬0:
   <?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope
   xmlns:soap="[7][6]http://schemas.xmlsoap.org/soap/envelope/";
   xmlns:xsi="[8][7]http://www.w3.org/2001/XMLSchema-instance";
   xmlns:xsd="[9][8]http://www.w3.org/2001/XMLSchema";>
   &#65533;  <soap:Body>
   &#65533;  &#65533;  <soap:Fault>
   &#65533;  &#65533;  &#65533;  <faultcode>soap:Client</faultcode>
   &#65533;  &#65533;  &#65533;  <faultstring>Server was unable to read request.
 --&gt; There
   is an error in XML document (1, 252). --&gt; The '&#65533;&#65533;' character
,
   hexadecimal value 0x9B, cannot be included in a name. Line 1, position
   253.</faultstring>
   &#65533;  &#65533;  &#65533;  <detail />
   &#65533;  &#65533;  </soap:Fault>
   &#65533;  </soap:Body>
   </soap:Envelope>
   SetError() ¬13: HTTP/1.1 500 Internal Server Error.
   http_close(): entered
   2.
   This is the XML our client give me to make the connection, look the
   CDATA I think therés the problem:
   <soap:Envelope
   xmlns:xsi="[10][9]http://www.w3.org/2001/XMLSchema-instance";
   xmlns:xsd="[11][10]http://www.w3.org/2001/XMLSchema";
   xmlns:soap="[12][11]http://schemas.xmlsoap.org/soap/envelope/";>
   &#65533;  <soap:Body>
   &#65533;  &#65533;  <RecibeXML xmlns="[13][12]http://tempuri.org/ws_MotorSING
EC/Citas">
   &#65533;  &#65533;  &#65533;  <stringXML><![CDATA[<?xml version="1.0"
   encoding="utf-8"?><cita ciudad="2" idTransaccion="" tipoCita="1"
   numTransaccion="" idCita="" fechaCita="" horaCita="" confirm="0"
   estatusConfirm=""><ciudadano><numeroIdentidad>0501-1982-01837</numeroId
   entidad><nombreCompleto>Felipe Garcia
   Calero</nombreCompleto><numeroIdentificacion></numeroIdentificacion></c
   iudadano><datosTransaccion><fechaTransaccion>01/27/2014</fechaTransacci
   on><idSucursal>01</idSucursal><duracionPasaporte>2</duracionPasaporte><
   costoPasaporte>0</costoPasaporte><costoCita>0</costoCita><montoCredito>
   0</montoCredito><totalTransaccion>0</totalTransaccion><tipoCambio>0</ti
   poCambio><folioTGR1>0</folioTGR1><transaccionExtranjero><pais></pais><c
   iudad></ciudad><tipoServicio></tipoServicio><numDocPago></numDocPago><c
   omentarioPago></comentarioPago><montoPago></montoPago></transaccionExtr
   anjero></datosTransaccion><pasaporteAnterior><libretaAnterior></libreta
   Anterior><fechaExpedicion></fechaExpedicion><fechaVencimiento></fechaVe
   ncimiento><tiempoVigencia></tiempoVigencia><mesesVigencia></mesesVigenc
   ia></pasaporteAnterior></cita>]]></stringXML>
   &#65533;  &#65533;  </RecibeXML>
   &#65533;  </soap:Body>
   </soap:Envelope>
   3.
   This is part of my source code, please let me know why debug file is
   giving me an error code:
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  setup();
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  Rc = WebService();
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  If Rc <> 1;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  ErrMsg = http_error();
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  Rc = -1;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  EndIf;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  *inlr = *on;
   &#65533;  &#65533;  &#65533; p Setup &#65533;  &#65533;  &#65533;  &#65533;
&#65533;  b
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /free
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  http_debug(*ON);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  http_setCCSIDs(81
9:0);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  filename= *blanks
;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  filename= '/tmp/'
 + %trim(USER) + 'debug_migra' +
   '.txt';
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  filename= %trim(f
ilename);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  rc = 0;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /end-free
   &#65533;  &#65533;  &#65533; p Setup &#65533;  &#65533;  &#65533;  &#65533;
&#65533;  e
   &#65533;  &#65533;  &#65533; p WebService &#65533;  &#65533;  &#65533; b
   &#65533;  &#65533;  &#65533; d WebService &#65533;  &#65533;  &#65533; pi &#6
5533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; 10i 0
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /free
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  file2 &#65533; = @file;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  urlsa &#65533; = *blanks;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  soap &#65533;  = *blanks;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  @post &#65533; = *blanks;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  soap &#65533;  = %trim(@xml
);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  chain (fun) xmlurl;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  if &#65533; %found;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  urlsa &#65533; = *blanks;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  @Post = %trim(xmluso);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  eval urlsa=%trim(%Subst(xml
uso:1:100));
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  eval soapaction=%trim(%Subs
t(xmluso:153:100));
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  pgm01(@post);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  pgm01(urlsa);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  @post = %trim(@post);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  urlsa = %trim(urlsa);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  endif;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  soap_bk = soap;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  tiempo = 35;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  soap = soap_bk;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; callp &#65533; htt
p_debug(*ON: filename);
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; rc = &#65533; http
_url_post_xml(%trim(urlsa)
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : %addr(SOAP) + 2
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : %len(SOAP)
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : *null
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : %paddr(Incoming
)
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : %addr(ProcessJr
n)
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : HTTP_TIMEOUT
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : HTTP_USERAGENT
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : 'text/xml'
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533
;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  : %trim(soapactio
n));
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; return rc;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /End-free
   &#65533;  &#65533;  &#65533; p WebService &#65533;  &#65533;  &#65533; e
   &#65533;  &#65533;  &#65533; p Incoming &#65533;  &#65533;  &#65533;  &#65533
; b
   &#65533;  &#65533;  &#65533; d Incoming &#65533;  &#65533;  &#65533;  &#65533
; pi
   &#65533;  &#65533;  &#65533; d &#65533;  ProcessJrn &#65533;  &#65533;  &#655
33;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  100a
   &#65533;  &#65533;  &#65533; d &#65533;  depth &#65533;  &#65533;  &#65533;
&#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
10i 0 value
   &#65533;  &#65533;  &#65533; d &#65533;  name &#65533;  &#65533;  &#65533;  &
#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; 10
24a &#65533;  varying
   const
   &#65533;  &#65533;  &#65533; d &#65533;  path &#65533;  &#65533;  &#65533;  &
#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  24576a &#65
533;  varying const
   &#65533;  &#65533;  &#65533; d &#65533;  value &#65533;  &#65533;  &#65533;
&#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533; 65535a &#65
533;  varying const
   &#65533;  &#65533;  &#65533; d &#65533;  attrs &#65533;  &#65533;  &#65533;
&#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
&#65533;  * &#65533;  dim(32767)
   &#65533;  &#65533;  &#65533; d &#65533;  &#65533;  &#65533;  &#65533;  &#6553
3;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#6553
3;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  const
   options(*varsize)
   &#65533;  &#65533;  &#65533; D atof &#65533;  &#65533;  &#65533;  &#65533;  &
#65533;  &#65533; PR &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
 8F &#65533;
   extproc('atof')
   &#65533;  &#65533;  &#65533; D &#65533;  string &#65533;  &#65533;  &#65533;
 &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
 &#65533; * &#65533;  value
   options(*string)
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /free
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  if (name = 'faultstring');
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  ProcessJrn = value;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  endif;
   &#65533;  &#65533;  &#65533;  &#65533;  &#65533; /end-free
   &#65533;  &#65533;  &#65533; p Incoming &#65533;  &#65533;  &#65533;  &#65533
; E &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
   &#65533; &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;  &#65533;
  &#65533;  &#65533;
   &#65533;Thanks for your support!! &#65533;

References

   1. [13]http://tempuri.org/ws_MotorSINGEC/Citas/RecibeXML
   2. [14]http://www.w3.org/2001/XMLSchema-instance
   3. [15]http://www.w3.org/2001/XMLSchema
   4. [16]http://schemas.xmlsoap.org/soap/envelope/
   5. [17]http://tempuri.org/ws_MotorSINGEC/Citas
   6. [18]http://ASP.NET/
   7. [19]http://schemas.xmlsoap.org/soap/envelope/
   8. [20]http://www.w3.org/2001/XMLSchema-instance
   9. [21]http://www.w3.org/2001/XMLSchema
  10. [22]http://www.w3.org/2001/XMLSchema-instance
  11. [23]http://www.w3.org/2001/XMLSchema
  12. [24]http://schemas.xmlsoap.org/soap/envelope/
  13. [25]http://tempuri.org/ws_MotorSINGEC/Citas


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

References

   1. http://tempuri.org/ws_MotorSINGEC/Citas/RecibeXML
   2. http://www.w3.org/2001/XMLSchema-instance
   3. http://www.w3.org/2001/XMLSchema
   4. http://schemas.xmlsoap.org/soap/envelope/
   5. http://tempuri.org/ws_MotorSINGEC/Citas
   6. http://schemas.xmlsoap.org/soap/envelope/
   7. http://www.w3.org/2001/XMLSchema-instance
   8. http://www.w3.org/2001/XMLSchema
   9. http://www.w3.org/2001/XMLSchema-instance
  10. http://www.w3.org/2001/XMLSchema
  11. http://schemas.xmlsoap.org/soap/envelope/
  12. http://tempuri.org/ws_MotorSINGEC/Citas
  13. http://tempuri.org/ws_MotorSINGEC/Citas/RecibeXML
  14. http://www.w3.org/2001/XMLSchema-instance
  15. http://www.w3.org/2001/XMLSchema
  16. http://schemas.xmlsoap.org/soap/envelope/
  17. http://tempuri.org/ws_MotorSINGEC/Citas
  18. http://ASP.NET/
  19. http://schemas.xmlsoap.org/soap/envelope/
  20. http://www.w3.org/2001/XMLSchema-instance
  21. http://www.w3.org/2001/XMLSchema
  22. http://www.w3.org/2001/XMLSchema-instance
  23. http://www.w3.org/2001/XMLSchema
  24. http://schemas.xmlsoap.org/soap/envelope/
  25. http://tempuri.org/ws_MotorSINGEC/Citas
  26. 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
-----------------------------------------------------------------------