-
Notifications
You must be signed in to change notification settings - Fork 0
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
encode special characters when serializing entity to XML #9
Conversation
|
||
assertNotNull(result.getEntity().getProperty("test")); | ||
String actualTest1 = (String) result.getEntity().getProperty("test").getValue(); | ||
assertEquals("", actualTest1); |
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.
What's the relation between \u0005
and 
?
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.
This is not correct. actualTest1
should be equal to "\u0005". The XML should be un-encoded when read back from the server. If it is not, then you have a bug and the test should be failing.
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.
\u0005 is java's way of encoding special character, which cannot be accept in web service. In Web Service world, it is widely adopted to use Numeric Character Reference (http://en.wikipedia.org/wiki/Numeric_character_reference ). Unfortunately, decode numeric character reference is not provided in standard Java library. We can consider doing that for the customer in the convenience layer.
A new issue filed Azure#142
I don't see where you have addressed the second part of the issue, the loss of whitespace. Please add a unit test for that as well, to verify that your fix completely fixes the issue. |
encode special characters when serializing entity to XML
Forward Integration from dev to AssetCRUD branch.
Removed use of XMLGregorianCalendar
Refactor Replace hard-coded "urn:WindowsAzureMediaServices" in tests wit...
Fixed test cross contamination - create new config, don't reuse current ...
Merge changes from the private branch to release branch
Azure#111