[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><�
5533;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>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">
� <soap:Body>
� � <soap:Fault>
� � � <faultcode>soap:Client</faultcode>
� � � <faultstring>Server was unable to read request.
--> There
is an error in XML document (1, 252). --> The '��' character
,
hexadecimal value 0x9B, cannot be included in a name. Line 1, position
253.</faultstring>
� � � <detail />
� � </soap:Fault>
� </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/">
� <soap:Body>
� � <RecibeXML xmlns="[13][12]http://tempuri.org/ws_MotorSING
EC/Citas">
� � � <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>
� � </RecibeXML>
� </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:
� � � � � setup();
� � � � � Rc = WebService();
� � � � � If Rc <> 1;
� � � � � ErrMsg = http_error();
� � � � � Rc = -1;
� � � � � EndIf;
� � � � � *inlr = *on;
� � � p Setup � � � �
� b
� � � � � /free
� � � � � � http_debug(*ON);
� � � � � � http_setCCSIDs(81
9:0);
� � � � � � filename= *blanks
;
� � � � � � filename= '/tmp/'
+ %trim(USER) + 'debug_migra' +
'.txt';
� � � � � � filename= %trim(f
ilename);
� � � � � � rc = 0;
� � � � � /end-free
� � � p Setup � � � �
� e
� � � p WebService � � � b
� � � d WebService � � � pi 
5533; � � � � � 10i 0
� � � � � /free
� � � � � file2 � = @file;
� � � � � urlsa � = *blanks;
� � � � � soap � = *blanks;
� � � � � @post � = *blanks;
� � � � � soap � = %trim(@xml
);
� � � � � chain (fun) xmlurl;
� � � � � if � %found;
� � � � � urlsa � = *blanks;
� � � � � @Post = %trim(xmluso);
� � � � � eval urlsa=%trim(%Subst(xml
uso:1:100));
� � � � � eval soapaction=%trim(%Subs
t(xmluso:153:100));
� � � � � pgm01(@post);
� � � � � pgm01(urlsa);
� � � � � @post = %trim(@post);
� � � � � urlsa = %trim(urlsa);
� � � � � endif;
� � � � � soap_bk = soap;
� � � � � tiempo = 35;
� � � � � soap = soap_bk;
� � � � � � callp � htt
p_debug(*ON: filename);
� � � � � � rc = � http
_url_post_xml(%trim(urlsa)
� � � � � � � �
; � � � � � � : %addr(SOAP) + 2
� � � � � � � �
; � � � � � � : %len(SOAP)
� � � � � � � �
; � � � � � � : *null
� � � � � � � �
; � � � � � � : %paddr(Incoming
)
� � � � � � � �
; � � � � � � : %addr(ProcessJr
n)
� � � � � � � �
; � � � � � � : HTTP_TIMEOUT
� � � � � � � �
; � � � � � � : HTTP_USERAGENT
� � � � � � � �
; � � � � � � : 'text/xml'
� � � � � � � �
; � � � � � � : %trim(soapactio
n));
� � � � � � return rc;
� � � � � /End-free
� � � p WebService � � � e
� � � p Incoming � � � �
; b
� � � d Incoming � � � �
; pi
� � � d � ProcessJrn � � ʏ
33; � � � � � 100a
� � � d � depth � � �
� � � � � � � �
10i 0 value
� � � d � name � � � &
#65533; � � � � � � � 10
24a � varying
const
� � � d � path � � � &
#65533; � � � � � � 24576a A
533; varying const
� � � d � value � � �
� � � � � � � 65535a A
533; varying const
� � � d � attrs � � �
� � � � � � � �
� * � dim(32767)
� � � d � � � � ᦙ
3; � � � � � � � ᦙ
3; � � � � � const
options(*varsize)
� � � D atof � � � � &
#65533; � PR � � � � � �
8F �
extproc('atof')
� � � D � string � � �
� � � � � � � �
� * � value
options(*string)
� � � � � /free
� � � � � if (name = 'faultstring');
� � � � � ProcessJrn = value;
� � � � � endif;
� � � � � /end-free
� � � p Incoming � � � �
; E � � � � � � �
� � � � � � � �
� �
�Thanks for your support!! �
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
-----------------------------------------------------------------------