jimma commented on a change in pull request #437: [CXF-7823]:JAXBEncoderDecoder
doesn't respect @XmlType's propOrder in…
URL: https://github.com/apache/cxf/pull/437#discussion_r212657313
##########
File path:
systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
##########
@@ -73,7 +78,37 @@ public void testExtraSubClassWithJaxbFromEndpoint() throws
Throwable {
Assert.assertEquals(expected, widgetFromService);
}
+ @Test
+ public void testExceptionPropertyOrder() throws Throwable {
+ BusFactory.getThreadDefaultBus().getOutFaultInterceptors().add(new
LoggingOutInterceptor(fault));
+ TestService testClient = getTestClient();
+
((BindingProvider)testClient).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+
"http://localhost:" + PORT
+ +
"/service/TestEndpoint");
+ try {
+ testClient.echo("Exception");
+ } catch (PropertyOrderException e) {
+ Assert.assertTrue("Expect <message> element is before <data>
element :" + fault.getMessage(),
+ fault.getMessage().indexOf("</message><data") >
-1);
+ }
+ }
+
+ static class TestLoggingEventSender implements LogEventSender {
+ private String logMessage;
+
+ public String getMessage() {
+ return logMessage;
+ }
+ public void cleaerMessage() {
Review comment:
Fixed. Thanks for review @andrei-ivanov
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services