prathyushreddylpr commented on PR #1516:
URL: https://github.com/apache/cxf/pull/1516#issuecomment-1824836938

   > > But serialized string contains two string items(example is provided in 
the above comment) and one of them contained the value "required=true" and 
hence the order is important
   > 
   > I don't see two items, I see (from your examples):
   > 
   > 
![image](https://user-images.githubusercontent.com/509855/282986961-2c2a5e62-4e8c-43c5-ad53-701c6f39a5e7.png)
   > 
   > and
   > 
   > 
![image](https://user-images.githubusercontent.com/509855/282987051-fca189f8-3787-4112-b50a-305bfc8eb9d1.png)
   > 
   > The other two string items belong to `beanTwoItem` which is nested 
serialized bean
   
   Sorry for the confusion, I have debugged the issue further and understood 
that the issue is not with the serializing of the string but with the parsing 
of the 'xmlString' here: 
https://github.com/apache/cxf/blob/74069a140737603a0a59435de308401c4351a80b/rt/javascript/javascript-tests/src/test/resources/deserializationTests.js#L35
   
   I observed that sometimes when the string is converted to XML, the 
attributes' values become null(see screenshot below), and defining propOrder 
will trigger a more consistent marshaling behavior within JAXB. When propOrder 
is defined, JAXB takes additional steps to ensure all properties are accounted 
for and processed systematically, which it might not do when relying on the 
default (implicit) order.
   
   <img width="917" alt="image" 
src="https://github.com/apache/cxf/assets/112648268/07889652-17a5-47ad-ab09-7a442734a0c0";>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to