[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: One Question About Character Conversation .. XML
wow !!
Great !! it works fine when I edit the file with EDTF and then F15,
option 3 and 1208 in ccsid field.
But ...
I'll wait other answer to see if I can write directly from httpapi in
that CCSID ( 1208 )...
if not, well I'll have to Qcmdexc ChgAtr ...
Best Regards
[1]hr@xxxxxxxxxxxx escribi� Hi,
unless Scott has a clever way to do this, you have a CCSID 1252
file with UTF-8 encoding.
Try this ....
CHGATR OBJ('yourfile.xml) ATR(*CCSID) VALUE(1208)
If the charecters displays alright aftewr that, you
CPY OBJ ... FROMCCSID(1208) TOCCSID(284)
Nicolas Machado [2]<nicolas.machado@xxxxxxxxxxxxx>
Sent by: [3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
03-11-2009 10:05
Please respond to
HTTPAPI and FTPAPI Projects [4]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
To
HTTPAPI and FTPAPI Projects [5]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
cc
Subject
Re: One Question About Character Conversation .. XML
Hi again.
The tool is HTTPAPI.
I'm using this function:
rc = http_url_post_stmf(
%trimr(URLPost)
: %trimr(tmpf)
: %trimr(tmprf)
: 120 //Time out
: HTTP_USERAGENT
: 'text/xml'
: SOAPAction);
Because I ( you Scott) write the response to a ifs file.
Then I parse it with %xml-into
// Parsea Tag de Respuesta
opts = 'doc=file allowmissing=yes allowextra=yes ' +
'case=any trim=none ' ;
opts = %trimr(opts) + ' ' +
'path=SOAP-ENV:Envelope/SOAP-ENV:Body/' +
'WS_Calcular_Impuestos' +
'.ExecuteResponse/' +
'Response/' +
'XML_Impuestos_Calculados.Impuesto' ;
// opts = %trimr(opts) + ' ' +
// 'ccsid=284' ;
ifsFile = %trimr(tmprf) ;
xml-into %Handler(ImpHnd: xDummy )
%XML(ifsFile : opts ) ;
if not %error();
endif ;
As you can see , I tried with CCSID opt code , but RPGLE throws me an
error.
The file is saved with CCSID = 1252 , when I change to 284, the
character are unreadable, all of them, even the one without accents.
I hope this help to you.
I attach, httpapi_debug.txt and a XML file that is like the one I
parse
with xml-into.
This xml file, if I open in my PC with the IE, I can see the accents
correctly.
Best Regards
[6]hr@xxxxxxxxxxxx escribi� > Looks to me like your are receiving UTF-8 and not CCSID-1252
(dobbelt
> byte instead of SBCS)
>
> Scott Klement [7]<sk@xxxxxxxxxxxxxxxx>
> Sent by: [8]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
> 02-11-2009 21:58
>
> Please respond to
> HTTPAPI and FTPAPI Projects [9]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
>
>
To
>
> HTTPAPI and FTPAPI Projects [10]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
>
>
cc
>
>
Subject
>
> Re: One Question About Character Conversation .. XML
>
> Can you provide some information about what you're doing? Is
this
> FTPAPI? HTTPAPI? Something else?
> What routines are you calling? What are you specifying for the
> CCSIDs?
> Nicolas Machado wrote:
> > Hi, as you may have noticed, my natural languaje is spanish,
and
> we
> > have something called accents, �,�,.. etc.
> >
> > I'm receiving an XML and procesing the file just fine,
except for
> > those character that I know should be accents.
> > for example :
> > "jurisdicci��n" instead of "jurisdicci� > > Where is the problem here? in the CCSID ? in some step or
> parameter or
> > maybe because the response doesn't have the encoding tag ?
>
----------------------------------------------------------------------
> -
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [11]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
> -
>
>
>
----------------------------------------------------------------------
--
>
>
----------------------------------------------------------------------
-
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [12]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
-
>
--
.::.
Nicolas Machado
Metodo Argentina S.A.
_____________________
Tel: 02262 527431
Necochea, Buenos Aires.
<?xml version = "1.0" encoding = "utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=[13]"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=[14]"http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC=[15]"http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi=[16]"http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<WS_Calcular_Impuestos.ExecuteResponse xmlns="GIS20">
<Request>
<TpoCbte>0</TpoCbte>
<DocTpo>80</DocTpo>
<DocNro>30567839377</DocNro>
<TipoBien>0</TipoBien>
<CodConcepto>1</CodConcepto>
<CodJurEnt>901</CodJurEnt>
<ImporteSBT>2001000.00</ImporteSBT>
<ImporteDTOs>0.00</ImporteDTOs>
<MonCod>0054</MonCod>
<MonCot>3.8500</MonCot>
<EsDevolucion>0</EsDevolucion>
<PagoGranos>0</PagoGranos>
</Request>
<Messages>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>----------- Parametros
------------------------
PerCod: 41 - BIENId: 0 - CONCEPID: 1 - Dev: 0
Total_Fac: 2001000.0000 - Desc: 0.0000 - Recargo: 0.0000
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [901] Previa Tipo 3
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [902] Previa Tipo 2
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [915] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [904] Previa Tipo 1
--------------------------------
El coeficiente de la jurisdicci��n es menor al coeficiente del sujeto
en jurisdicci��n
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>La base imponible de la operaci��n es >=
a la de la jurisdicci��n
La Jurisdiccion tiene reducci��n de IIBB
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [913] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [917] Previa Tipo 5
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [919] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [924] Previa Tipo 4
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [921] Previa Tipo 6
--------------------------------
El Sujeto es Agente
</ErrDetalle>
</XML_Errores.Error>
</Messages>
<Response>
<XML_Impuestos_Calculados.Impuesto>
<CodImpuesto>IVA</CodImpuesto>
<TaxDescripcion>IVA</TaxDescripcion>
<BasImponible>2001000.00</BasImponible>
<TaxAlic>10.5000</TaxAlic>
<ImpuestoCalculado>210105.00</ImpuestoCalculado>
<StringContable>08900000</StringContable>
</XML_Impuestos_Calculados.Impuesto>
<XML_Impuestos_Calculados.Impuesto>
<CodImpuesto>PER_IIBB</CodImpuesto>
<TaxDescripcion>PERCEPCI��N DE IIB(0)</TaxDescripcion>
<BasImponible>2001000.00</BasImponible>
<TaxAlic>0.7500</TaxAlic>
<ImpuestoCalculado>15007.50</ImpuestoCalculado>
<StringContable>0898</StringContable>
</XML_Impuestos_Calculados.Impuesto>
</Response>
<Error>OK</Error>
</WS_Calcular_Impuestos.ExecuteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTPAPI Ver 1.12 released 2005-08-12
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /gis20/aws_calcular_impuestos.aspx HTTP/1.1
Host: 10.50.61.24
User-Agent: http-api/1.11
Content-Type: text/xml
SOAPAction: GIS20action/AWS_CALCULAR_IMPUESTOS.Execute
Expect: 100-continue
Content-Length: 978
recvresp(): entered
HTTP/1.1 100 Continue
SetError() �13: HTTP/1.1 100 Continue
sendraw(): entered
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv=[17]"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:gis="GIS20">
<soapenv:Header/>
<soapenv:Body>
<gis:WS_Calcular_Impuestos.Execute>
<gis:Request>
<gis:TpoCbte>01</gis:TpoCbte>
<gis:DocTpo>80</gis:DocTpo>
<gis:DocNro>30567839377</gis:DocNro>
<gis:TipoBien>0001</gis:TipoBien>
<gis:CodConcepto>0001</gis:CodConcepto>
<gis:CodJurEnt>0902</gis:CodJurEnt>
<gis:ImporteSBT>63047.00</gis:ImporteSBT>
<gis:ImporteDTOs>.00</gis:ImporteDTOs>
<gis:MonCod>DOL</gis:MonCod>
<gis:MonCot>3.0800</gis:MonCot>
<gis:PagoGranos>0</gis:PagoGranos>
<gis:EsDevolucion>0</gis:EsDevolucion>
<gis:FechaOriginal>0000-00-00</gis:FechaOriginal>
<gis:DevolucionParcial>0</gis:DevolucionParcial>
</gis:Request>
</gis:WS_Calcular_Impuestos.Execute>
</soapenv:Body>
</soapenv:Envelope>
recvresp(): entered
HTTP/1.1 200 OK
Date: Fri, 23 Oct 2009 20:18:56 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml;charset=utf-8
Content-Length: 4222
SetError() �13: HTTP/1.1 200 OK
recvdoc parms: identity 4222
recvdoc(): entered
SetError() �0:
<?xml version = "1.0" encoding = "utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=[18]"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=[19]"http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC=[20]"http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi=[21]"http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<WS_Calcular_Impuestos.ExecuteResponse xmlns="GIS20">
<Request>
<TpoCbte>1</TpoCbte>
<DocTpo>80</DocTpo>
<DocNro>30567839377</DocNro>
<TipoBien>1</TipoBien>
<CodConcepto>1</CodConcepto>
<CodJurEnt>902</CodJurEnt>
<ImporteSBT>63047.00</ImporteSBT>
<ImporteDTOs>0.00</ImporteDTOs>
<MonCod>DOL</MonCod>
<MonCot>3.0800</MonCot>
<PagoGranos>0</PagoGranos>
<EsDevolucion>0</EsDevolucion>
<FechaOriginal>0000-00-00</FechaOriginal>
<DevolucionParcial>0</DevolucionParcial>
</Request>
<Messages>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>----------- Parametros
------------------------
PerCod: 41 - BIENId: 1 - CONCEPID: 1 - Dev: 0
Total_Fac: 63047.0000 - Desc: 0.0000 - Recargo: 0.0000
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [901] Previa Tipo 3
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [902] Previa Tipo 2
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [915] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [904] Previa Tipo 1
--------------------------------
El coeficiente de la jurisdicci��n es menor al coeficiente del sujeto
en jurisdicci��n
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [905] Previa Tipo 1
--------------------------------
El tipo de bien de la operacion est�� excluido (100%)
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [913] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [917] Previa Tipo 5
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [919] Previa Tipo 1
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [924] Previa Tipo 4
--------------------------------
No devolvio registros PERJUR
</ErrDetalle>
</XML_Errores.Error>
<XML_Errores.Error>
<ErrCod>900</ErrCod>
<ErrDescripcion>Error desconocido.</ErrDescripcion>
<ErrDetalle>-- [921] Previa Tipo 6
--------------------------------
El Sujeto es Agente
</ErrDetalle>
</XML_Errores.Error>
</Messages>
<Response>
<XML_Impuestos_Calculados.Impuesto>
<CodImpuesto>IVA</CodImpuesto>
<TaxDescripcion>IVA</TaxDescripcion>
<BasImponible>63047.00</BasImponible>
<TaxAlic>10.5000</TaxAlic>
<ImpuestoCalculado>6619.94</ImpuestoCalculado>
<StringContable>08900000</StringContable>
</XML_Impuestos_Calculados.Impuesto>
</Response>
<Error>OK</Error>
</WS_Calcular_Impuestos.ExecuteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
http_close(): entered
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. To unsubscribe, please go to:
[22]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
_______________________________________________________________________
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
[23]http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
--
.::.
Nicolas Machado
Metodo Argentina S.A.
_____________________
Tel: 02262 527431
Necochea, Buenos Aires.
References
1. mailto:hr@xxxxxxxxxxxx
2. mailto:nicolas.machado@xxxxxxxxxxxxx
3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
4. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
6. mailto:hr@xxxxxxxxxxxx
7. mailto:sk@xxxxxxxxxxxxxxxx
8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
9. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
10. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
11. http://www.scottklement.com/mailman/listinfo/ftpapi
12. http://www.scottklement.com/mailman/listinfo/ftpapi
13. http://schemas.xmlsoap.org/soap/envelope/
14. http://www.w3.org/2001/XMLSchema
15. http://schemas.xmlsoap.org/soap/encoding/
16. http://www.w3.org/2001/XMLSchema-instance
17. http://schemas.xmlsoap.org/soap/envelope/
18. http://schemas.xmlsoap.org/soap/envelope/
19. http://www.w3.org/2001/XMLSchema
20. http://schemas.xmlsoap.org/soap/encoding/
21. http://www.w3.org/2001/XMLSchema-instance
22. http://www.scottklement.com/mailman/listinfo/ftpapi
23. 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
-----------------------------------------------------------------------