-
Notifications
You must be signed in to change notification settings - Fork 0
add xlink type to content #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Efficace !!!!
@@ -70,6 +70,7 @@ public String serializeJsonEDXL(EdxlMessage edxlMessage) throws JsonProcessingEx | |||
} | |||
|
|||
public String serializeXmlEDXL(EdxlMessage edxlMessage) throws JsonProcessingException { | |||
return xmlMapper.writeValueAsString(edxlMessage); | |||
String baseXml = xmlMapper.writeValueAsString(edxlMessage); | |||
return baseXml.replace("<content>", "<content xlink:type=\"resource\">"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca s'applique que sur le premier match ? Pas de risque avec des balises internes qui seraient aussi ?? Peut-être mettre un test dessus aussi avec un CustomContent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si, mais je ne vois qu'avec customContent que ça pourrait arriver - donc pas dans la cible donc - car en dessous les autres balises content éventuelles seraient forcément namespacées différemment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ca avait pas commenté désolé
<content xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="resource"> | ||
<jsonContent> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bizarre ce "jsonContent" dans un XML non ?
Et pourquoi tous les fichiers exemples XML qui sont générés à partir des JSON ne sont pas modifiés ? Alors que ton test a l'air bien OK pourtant !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tous ces fichiers générés sont des "UseCase messages", donc un niveau en-dessous de la modif effectuée.
Le cas que tu décris est particulier : le RS-ERROR contient errorCode, errorCause et sourceMessage, et le type de sourceMessage est très libre (Map<String, Object>). Notre petit utilitaire de conversion n'a pas l'intelligence de se dire que dans le cas d'un RS-ERROR, il faudrait remplacer jsonContent par XMLContent, mais c'est un cas très particulier quand même.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aligné mais pourquoi xmlns:xlink="http://www.w3.org/1999/xlink"
?
|
…nto fix/add-xlink-type-to-content
|
|
No description provided.