Skip to content

Conversation

@ptorres-prowide
Copy link
Contributor

No description provided.

@zubri
Copy link
Member

zubri commented Feb 21, 2023

Task linked: CU-85zrnb6u1 PW - 631 ⁃ XML Handling

@ptorres-prowide ptorres-prowide marked this pull request as draft February 21, 2023 22:57
@ptorres-prowide
Copy link
Contributor Author

@zubri fijate que te deje unos comments para confirmar sobre
iso20022-core/src/main/java/com/prowidesoftware/swift/model/mx/AbstractMX.java

@ptorres-prowide
Copy link
Contributor Author

**Por lo que vi, a las clases Mx de dominio, deberíamos agregarle un metodo extra. Ejemplifico con MxPacs00800108:

Existente:**

    public static MxPacs00800108 parse(String xml, MxRead parserImpl) {
        return ((MxPacs00800108) parserImpl.read(MxPacs00800108 .class, xml, _classes));
    }

Nuevo:

    public static MxPacs00800108 parse(String xml, MxRead parserImpl, MxReadConfiguration conf) {
        return ((MxPacs00800108) parserImpl.read(MxPacs00800108 .class, xml, _classes, new com.prowidesoftware.swift.model.mx.MxReadParams(conf)));
    }

//IS THIS OK OR WE SHOULD LEAVE AS UTF-8?????
if (usableConf.includeXMLDeclaration) {
xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
Charset charsetToUse =conf.charset != null? conf.charset:Charset.defaultCharset();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta ok esto... y estaría bueno probar generar un XML pasando un encoding diferente en Java y ver que genera.
Este cambio debiera romper unos cuantos test en tu maquina que creo que al ser Windows como default charset tiene algo distinto.

@ptorres-prowide ptorres-prowide force-pushed the CU-85zrnb6u1_PW---631--XML-Handling branch from 24dfcb1 to eb43849 Compare February 23, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants