Skip to content
Permalink
Browse files
Don't set to "null" as that then creates a DefaultValidationEventHand…
…ler which prints things out to System.out.

git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1546125 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dkulp committed Nov 27, 2013
1 parent c873f99 commit 02df8d6837563f5749b6d983e771b71652425c9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
@@ -127,7 +127,16 @@ public Marshaller createMarshaller(Object elValue, MessagePartInfo part) {
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
marshaller.setListener(databinding.getMarshallerListener());
if (setEventHandler) {
marshaller.setEventHandler(veventHandler);
ValidationEventHandler h = veventHandler;
if (veventHandler == null) {
h = new ValidationEventHandler() {
public boolean handleEvent(ValidationEvent event) {
//continue on warnings only
return event.getSeverity() == ValidationEvent.WARNING;
}
};
}
marshaller.setEventHandler(h);
}

final Map<String, String> nspref = databinding.getDeclaredNamespaceMappings();
@@ -633,7 +633,7 @@ private void testExceptionCases(DocLitWrappedCodeFirstService port) throws Excep
port.modifyFoo(foo);
fail("Expected exception not found");
} catch (SOAPFaultException ex) {
assertTrue(ex.getMessage().contains("NoName is not a valid name"));
assertTrue(ex.getMessage(), ex.getMessage().contains("NoName is not a valid name"));
}
try {
Foo foo = new Foo();

0 comments on commit 02df8d6

Please sign in to comment.