Search in sources :

Example 6 with CollectingValidationEventHandler

use of com.helger.jaxb.validation.CollectingValidationEventHandler in project phase4 by phax.

the class Ebms3ReaderBuilderTest method testExpectSoap11ButFileIsSoap12.

@Test
public void testExpectSoap11ButFileIsSoap12() {
    final CollectingValidationEventHandler aCVEH = new CollectingValidationEventHandler();
    final Soap11Envelope aEnv = Ebms3ReaderBuilder.soap11().setValidationEventHandler(aCVEH).read(new ClassPathResource("/soap12test/UserMessage12.xml"));
    assertNull(aEnv);
    assertFalse(aCVEH.getErrorList().isEmpty());
}
Also used : Soap11Envelope(com.helger.phase4.soap11.Soap11Envelope) CollectingValidationEventHandler(com.helger.jaxb.validation.CollectingValidationEventHandler) ClassPathResource(com.helger.commons.io.resource.ClassPathResource) Test(org.junit.Test)

Aggregations

CollectingValidationEventHandler (com.helger.jaxb.validation.CollectingValidationEventHandler)6 ClassPathResource (com.helger.commons.io.resource.ClassPathResource)5 Ebms3Messaging (com.helger.phase4.ebms3header.Ebms3Messaging)5 Test (org.junit.Test)5 Soap11Envelope (com.helger.phase4.soap11.Soap11Envelope)4 Element (org.w3c.dom.Element)3 CommonsHashMap (com.helger.commons.collection.impl.CommonsHashMap)1 IError (com.helger.commons.error.IError)1 EAS4CompressionMode (com.helger.phase4.attachment.EAS4CompressionMode)1 WSS4JAttachment (com.helger.phase4.attachment.WSS4JAttachment)1 Ebms3CollaborationInfo (com.helger.phase4.ebms3header.Ebms3CollaborationInfo)1 Ebms3Error (com.helger.phase4.ebms3header.Ebms3Error)1 Ebms3MessageInfo (com.helger.phase4.ebms3header.Ebms3MessageInfo)1 Ebms3PartInfo (com.helger.phase4.ebms3header.Ebms3PartInfo)1 Ebms3PartyId (com.helger.phase4.ebms3header.Ebms3PartyId)1 Ebms3PayloadInfo (com.helger.phase4.ebms3header.Ebms3PayloadInfo)1 Ebms3Property (com.helger.phase4.ebms3header.Ebms3Property)1 Ebms3PullRequest (com.helger.phase4.ebms3header.Ebms3PullRequest)1 Ebms3Receipt (com.helger.phase4.ebms3header.Ebms3Receipt)1 Ebms3SignalMessage (com.helger.phase4.ebms3header.Ebms3SignalMessage)1