Giter Club home page Giter Club logo

phase4's Introduction

phase4 - lightweight AS4 client and server

Logo

Maven Central javadoc

phase4 is an embeddable, lightweight Java library to send and receive AS4 messages.

Please see the Wiki for all details.

If you like the project, a star on GitHub is always appreciated.


My personal Coding Styleguide | It is appreciated if you star the GitHub project if you like it.

phase4's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phase4's Issues

Signature Attachment not found

Hi Phillip,

I'm experiencing a very odd error: I have setup phase4 peppol server webapp with a custom part that stores the files to specific locations and return AS4MessageProcessorResult.createSuccess() when done processing. I also setup an oxalis server and tried sending a message from oxalis to phase4 server. ON the oxalis side I get the below error. I also tried in testbed and the testbed fails sending the message to phase4. With the local oxalis I see that the underlying error is that attachment not found thing. It seems to be a signature attachment. Is there anything I can do to solve this somehow? I should mention that teh transaction is processed correctly by teh phase4 server and I can see all generated files; it seems the signal message response has some sort of issue.

2020-06-20 14:54:18,789 ERROR [eu.sendregning.oxalis.Main] Execution failed: no.difi.oxalis.as4.lang.OxalisAs4TransmissionException: Failed to send message
java.util.concurrent.ExecutionException: no.difi.oxalis.as4.lang.OxalisAs4TransmissionException: Failed to send message
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at eu.sendregning.oxalis.Main.main(Main.java:225)
Caused by: no.difi.oxalis.as4.lang.OxalisAs4TransmissionException: Failed to send message
        at no.difi.oxalis.as4.outbound.As4MessageSender.invoke(As4MessageSender.java:108)
        at no.difi.oxalis.as4.outbound.As4MessageSender.send(As4MessageSender.java:89)
        at no.difi.oxalis.as4.outbound.As4MessageSenderFacade.send(As4MessageSenderFacade.java:20)
        at no.difi.oxalis.api.outbound.MessageSender.send(MessageSender.java:59)
        at no.difi.oxalis.outbound.transmission.DefaultTransmitter.perform(DefaultTransmitter.java:149)
        at no.difi.oxalis.outbound.transmission.DefaultTransmitter.transmit(DefaultTransmitter.java:93)
        at eu.sendregning.oxalis.TransmissionTask.performTransmission(TransmissionTask.java:166)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:94)
        at eu.sendregning.oxalis.TransmissionTask.call(TransmissionTask.java:48)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: javax.xml.ws.soap.SOAPFaultException: javax.xml.crypto.dsig.TransformException: Attachment not found
        at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:285)
        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:330)
        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:241)
        at no.difi.oxalis.as4.outbound.As4MessageSender.invoke(As4MessageSender.java:105)
        ... 14 common frames omitted
Caused by: org.apache.cxf.binding.soap.SoapFault: javax.xml.crypto.dsig.TransformException: Attachment not found
        at org.apache.cxf.ws.security.wss4j.WSS4JUtils.createSoapFault(WSS4JUtils.java:236)
        at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:376)
        at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:212)
        at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor.handleMessage(PolicyBasedWSS4JInInterceptor.java:123)
        at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor.handleMessage(PolicyBasedWSS4JInInterceptor.java:76)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:829)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1693)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1570)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371)
        at org.apache.cxf.ext.logging.LoggingOutputStream.postClose(LoggingOutputStream.java:53)
        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:228)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
        at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:349)
        at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:322)
        ... 16 common frames omitted
Caused by: org.apache.wss4j.common.ext.WSSecurityException: javax.xml.crypto.dsig.TransformException: Attachment not found
        at org.apache.wss4j.dom.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:399)
        at org.apache.wss4j.dom.processor.SignatureProcessor.handleToken(SignatureProcessor.java:232)
        at org.apache.wss4j.dom.engine.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:340)
        at org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessageInternal(WSS4JInInterceptor.java:320)
        ... 36 common frames omitted
Caused by: javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.dsig.TransformException: Attachment not found
        at org.apache.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:541)
        at org.apache.jcp.xml.dsig.internal.dom.DOMReference.validate(DOMReference.java:383)
        at org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.validate(DOMXMLSignature.java:277)
        at org.apache.wss4j.dom.processor.SignatureProcessor.verifyXMLSignature(SignatureProcessor.java:372)
        ... 39 common frames omitted
Caused by: javax.xml.crypto.dsig.TransformException: Attachment not found
        at org.apache.wss4j.dom.transform.AttachmentContentSignatureTransform.attachmentRequestCallback(AttachmentContentSignatureTransform.java:141)
        at org.apache.wss4j.dom.transform.AttachmentContentSignatureTransform.transform(AttachmentContentSignatureTransform.java:120)
        at org.apache.jcp.xml.dsig.internal.dom.DOMTransform.transform(DOMTransform.java:169)
        at org.apache.jcp.xml.dsig.internal.dom.DOMReference.transform(DOMReference.java:453)
        ... 42 common frames omitted

Exception when setting maxRetries to 0

When trying to send message with maxRetries set to 0 and outgoing dumper set, the following exception is thrown. Not for maxRetries > 0.

Caused by: java.lang.IllegalStateException: This should only be called for repeatable entities at com.helger.phase4.http.BasicHttpPoster._createDumpingHttpEntity(BasicHttpPoster.java:257) ~[phase4-lib-0.12.3-SNAPSHOT.jar:0.12.3-SNAPSHOT]

I think this didn't happened in 0.10.0.

Class AS4Handler won't compile

Hello Phillip

I downloaded the latest source code of ph-as4. The class AS4Handler won't compile in using IBM JDK 1.8. I get Type mismatch: cannot convert from element type Object to Header on line 189

image

Dynamic Profile Detection

Since we want to support more then one profile like eSENS and AnotherProfile (e.g. ENTSOG), we need a way to discover them dynamically, with fields that are already contained in the request. How to do this?

Failed to create JAXB context for package 'com.helger.peppol.smp'

Hi Phillip,

I am facing this issue when trying to send a file through the server. Do you have any idea what I could do to solve this one?
Below is the log I get when it tries to send the file:

2019-07-21T12:11:03,629]` [ph-as4] [INFO ] [main] Logging initialized @3754ms to org.eclipse.jetty.util.log.Slf4jLog -- org.eclipse.jetty.util.log.Log.initialized(Log.java:193)
WARNING: jetty-runner is deprecated.
         See Jetty Documentation for startup options
         https://www.eclipse.org/jetty/documentation/
[2019-07-21T12:11:03,666] [ph-as4] [INFO ] [main] Runner -- org.eclipse.jetty.runner.Runner.configure(Runner.java:235)
[2019-07-21T12:11:03,894] [ph-as4] [INFO ] [main] jetty-9.4.14.v20181114; built: 2018-11-14T21:20:31.478Z; git: c4550056e785fb5665914545889f21dc136ad9e6; jvm 1.8.0_161-b12 -- org.eclipse.jetty.server.Server.doStart(Server.java:370)
[2019-07-21T12:11:04,101] [ph-as4] [WARN ] [main] Unrecognized ASM version, assuming ASM7 -- org.eclipse.jetty.annotations.AnnotationParser.asmVersion(AnnotationParser.java:125)
[2019-07-21T12:11:04,627] [ph-as4] [INFO ] [main] Scanning elapsed time=524ms -- org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:489)
[2019-07-21T12:11:04,924] [ph-as4] [INFO ] [main] DefaultSessionIdManager workerName=node0 -- org.eclipse.jetty.server.session.DefaultSessionIdManager.doStart(DefaultSessionIdManager.java:365)
[2019-07-21T12:11:04,925] [ph-as4] [INFO ] [main] No SessionScavenger set, using defaults -- org.eclipse.jetty.server.session.DefaultSessionIdManager.doStart(DefaultSessionIdManager.java:370)
[2019-07-21T12:11:04,928] [ph-as4] [INFO ] [main] node0 Scavenging every 660000ms -- org.eclipse.jetty.server.session.HouseKeeper.startScavenging(HouseKeeper.java:149)
[2019-07-21T12:11:05,033] [ph-as4] [INFO ] [main] Successfully read AS4 configuration file from as4.properties -- com.helger.as4.servlet.mgr.AS4ServerConfiguration.reinit(AS4ServerConfiguration.java:75)
[2019-07-21T12:11:05,312] [ph-as4] [INFO ] [main] Setting servlet context path to '/ph-as4'! -- com.helger.servlet.ServletContextPathHolder.setServletContextPath(ServletContextPathHolder.java:70)
[2019-07-21T12:11:05,336] [ph-as4] [INFO ] [main] Using 'D:\Business\upwork\Peppolstack\as4\as4-data' as the data path -- com.helger.photon.app.io.WebFileIO.initPaths(WebFileIO.java:92)
[2019-07-21T12:11:05,346] [ph-as4] [INFO ] [main] Using 'D:\Business\upwork\Peppolstack\as4\ph-as4-server-webapp-test\src\main\webapp' as the servlet context path -- com.helger.photon.app.io.WebFileIO.initPaths(WebFileIO.java:99)
[2019-07-21T12:11:05,360] [ph-as4] [INFO ] [main] Setting persistent long ID factory [[WebIOLongIDFactory@0x082ea68c: reserveCount=20; ID=0; lastID=-1]; file=D:\Business\upwork\Peppolstack\as4\as4-data\persistent_id.dat] -- com.helger.commons.id.factory.GlobalIDFactory.lambda$setPersistentLongIDFactory$7(GlobalIDFactory.java:151)
[2019-07-21T12:11:05,361] [ph-as4] [INFO ] [main] Setting persistent int ID factory com.helger.photon.core.servlet.WebAppListener$$Lambda$366/988850650@79dc5318 -- com.helger.commons.id.factory.GlobalIDFactory.lambda$setPersistentIntIDFactory$3(GlobalIDFactory.java:103)
[2019-07-21T12:11:05,362] [ph-as4] [INFO ] [main] Session passivation is now disabled -- com.helger.web.scope.mgr.WebScopeManager.setSessionPassivationAllowed(WebScopeManager.java:99)
[2019-07-21T12:11:05,383] [ph-as4] [INFO ] [main] Default PasswordHashCreator algorithm set to 'PBKDF2_1000_48' -- com.helger.photon.security.password.hash.PasswordHashCreatorManager.setDefaultPasswordHashCreatorAlgorithm(PasswordHashCreatorManager.java:149)
[2019-07-21T12:11:05,384] [ph-as4] [INFO ] [main] Set global password constraints to [PasswordConstraintList@0x74bf1791: constraints=[[PasswordConstraintMinLength@0x54504ecd: minLength=6]]] -- com.helger.photon.security.password.GlobalPasswordSettings.setPasswordConstraintList(GlobalPasswordSettings.java:104)
[2019-07-21T12:11:05,398] [ph-as4] [INFO ] [main] RequestTrackerMonitor was installed successfully. -- com.helger.xservlet.requesttrack.RequestTracker.<init>(RequestTracker.java:122)
[2019-07-21T12:11:05,452] [ph-as4] [INFO ] [main] Moving audit files -- com.helger.photon.audit.AuditManager.<init>(AuditManager.java:157)
[2019-07-21T12:11:05,453] [ph-as4] [INFO ] [main] Finished moving 0 files -- com.helger.photon.audit.AuditManager.<init>(AuditManager.java:169)
[2019-07-21T12:11:05,514] [ph-as4] [INFO ] [main] Trying to initialize DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\audits\2019\07\20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO.lambda$initialRead$a6f1c75c$1(AbstractSimpleDAO.java:281)
[2019-07-21T12:11:05,530] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:05,570] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\security\users.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:05,574] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\security\roles.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:05,588] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\security\usergroups.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:05,594] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\security\usertokens.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:05,597] [ph-as4] [INFO ] [main] PhotonSecurityManager was initialized -- com.helger.photon.security.mgr.PhotonSecurityManager.onAfterInstantiation(PhotonSecurityManager.java:135)
[2019-07-21T12:11:06,994] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,001] [ph-as4] [INFO ] [main] Successfully registered SOAP header element processor for {http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/}Messaging -- com.helger.as4.servlet.soap.SOAPHeaderElementProcessorRegistry.registerHeaderElementProcessor(SOAPHeaderElementProcessorRegistry.java:71)
[2019-07-21T12:11:07,008] [ph-as4] [INFO ] [main] Successfully registered SOAP header element processor for {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security -- com.helger.as4.servlet.soap.SOAPHeaderElementProcessorRegistry.registerHeaderElementProcessor(SOAPHeaderElementProcessorRegistry.java:71)
[2019-07-21T12:11:07,010] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\as4-mpc.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:07,012] [ph-as4] [INFO ] [main] Trying to write WAL DAO file 'as4-mpc.xml' -- com.helger.dao.wal.AbstractWALDAO._writeToFile(AbstractWALDAO.java:842)
[2019-07-21T12:11:07,012] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,030] [ph-as4] [INFO ] [main] Trying to write WAL DAO file 'as4-mpc.xml' -- com.helger.dao.wal.AbstractWALDAO._writeToFile(AbstractWALDAO.java:842)
[2019-07-21T12:11:07,040] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\as4-pmode.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:07,053] [ph-as4] [INFO ] [main] Registered AS4 profile 'cef' -- com.helger.as4.profile.AS4ProfileManager.registerProfile(AS4ProfileManager.java:85)
[2019-07-21T12:11:07,054] [ph-as4] [INFO ] [main] 1 AS4 profile is registered  -- com.helger.as4.profile.AS4ProfileManager._registerAll(AS4ProfileManager.java:66)
[2019-07-21T12:11:07,057] [ph-as4] [INFO ] [main] Trying to initialize WAL DAO XML file 'D:\Business\upwork\Peppolstack\as4\as4-data\as4-duplicate-incoming.xml' -- com.helger.dao.wal.AbstractWALDAO.initialRead(AbstractWALDAO.java:469)
[2019-07-21T12:11:07,058] [ph-as4] [INFO ] [main] MetaAS4Manager was initialized -- com.helger.as4.mgr.MetaAS4Manager.onAfterInstantiation(MetaAS4Manager.java:76)
[2019-07-21T12:11:07,123] [ph-as4] [INFO ] [main] Using default implementation for ThreadExecutor -- com.helger.quartz.impl.StdSchedulerFactory._instantiate(StdSchedulerFactory.java:850)
[2019-07-21T12:11:07,125] [ph-as4] [INFO ] [main] Job execution threads will use class loader of thread: main -- com.helger.quartz.simpl.SimpleThreadPool.initialize(SimpleThreadPool.java:257)
[2019-07-21T12:11:07,152] [ph-as4] [INFO ] [main] QuartzSchedulerThread Inheriting ContextClassLoader of thread: main -- com.helger.quartz.core.QuartzSchedulerThread.<init>(QuartzSchedulerThread.java:98)
[2019-07-21T12:11:07,155] [ph-as4] [INFO ] [main] Initialized Scheduler Signaller of type: class com.helger.quartz.core.SchedulerSignaler -- com.helger.quartz.core.SchedulerSignaler.<init>(SchedulerSignaler.java:47)
[2019-07-21T12:11:07,155] [ph-as4] [INFO ] [main] Mini Quartz Scheduler v.4.0.1 created. -- com.helger.quartz.core.QuartzScheduler.<init>(QuartzScheduler.java:176)
[2019-07-21T12:11:07,156] [ph-as4] [INFO ] [main] JobFactory set to: com.helger.quartz.simpl.SimpleJobFactory@38be305c -- com.helger.quartz.core.QuartzScheduler.setJobFactory(QuartzScheduler.java:2247)
[2019-07-21T12:11:07,157] [ph-as4] [INFO ] [main] RAMJobStore initialized. -- com.helger.quartz.simpl.RAMJobStore.initialize(RAMJobStore.java:121)
[2019-07-21T12:11:07,157] [ph-as4] [INFO ] [main] Scheduler meta-data: Mini Quartz Scheduler (v4.0.1) 'MiniQuartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'com.helger.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'com.helger.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'com.helger.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
 -- com.helger.quartz.core.QuartzScheduler.initialize(QuartzScheduler.java:185)
[2019-07-21T12:11:07,158] [ph-as4] [INFO ] [main] Quartz scheduler 'MiniQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' -- com.helger.quartz.impl.StdSchedulerFactory._instantiate(StdSchedulerFactory.java:976)
[2019-07-21T12:11:07,158] [ph-as4] [INFO ] [main] Quartz scheduler version: 4.0.1 -- com.helger.quartz.impl.StdSchedulerFactory._instantiate(StdSchedulerFactory.java:978)
[2019-07-21T12:11:07,159] [ph-as4] [INFO ] [main] Scheduler MiniQuartzScheduler_$_NON_CLUSTERED started. -- com.helger.quartz.core.QuartzScheduler.start(QuartzScheduler.java:348)
[2019-07-21T12:11:07,167] [ph-as4] [INFO ] [main] Succesfully scheduled job 'AS4DuplicateCleanupJob-10' with TriggerKey DEFAULT.6da64b5bd2ee-7390bc4c-d75c-4ea5-a7bb-9a5fd2d1dc06 - starting at 2019-07-21T12:11:07.161 -- com.helger.schedule.quartz.GlobalQuartzScheduler.scheduleJob(GlobalQuartzScheduler.java:168)
[2019-07-21T12:11:07,189] [ph-as4] [INFO ] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Start processing directory change events in 'D:\Business\upwork\Peppolstack\as4\messages\send' -- com.helger.commons.io.watchdir.WatchDir.processEvents(WatchDir.java:245)
[2019-07-21T12:11:07,485] [ph-as4] [INFO ] [main] Created PMode with ID 'SIMPLE_ONEWAY' -- com.helger.as4.model.pmode.PModeManager.createPMode(PModeManager.java:70)
[2019-07-21T12:11:07,485] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,492] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,492] [ph-as4] [INFO ] [main] Created PMode with ID 'SIMPLE_TWOWAY' -- com.helger.as4.model.pmode.PModeManager.createPMode(PModeManager.java:70)
[2019-07-21T12:11:07,499] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,499] [ph-as4] [INFO ] [main] Created PMode with ID 'ONEWAY_RETRY' -- com.helger.as4.model.pmode.PModeManager.createPMode(PModeManager.java:70)
[2019-07-21T12:11:07,507] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,506] [ph-as4] [INFO ] [main] Created PMode with ID 'ONEWAY_ONLY_SIGN' -- com.helger.as4.model.pmode.PModeManager.createPMode(PModeManager.java:70)
[2019-07-21T12:11:07,512] [ph-as4] [INFO ] [main] Created PMode with ID 'PING' -- com.helger.as4.model.pmode.PModeManager.createPMode(PModeManager.java:70)
[2019-07-21T12:11:07,512] [ph-as4] [INFO ] [AsyncAuditor] Trying to write DAO file 'audits/2019/07/20190721.xml' -- com.helger.dao.simple.AbstractSimpleDAO._writeToFile(AbstractSimpleDAO.java:508)
[2019-07-21T12:11:07,514] [ph-as4] [INFO ] [main] Servlet 'default' is mapped to [/] -- com.helger.as4.server.servlet.AS4WebAppListener.afterContextInitialized(AS4WebAppListener.java:88)
[2019-07-21T12:11:07,514] [ph-as4] [INFO ] [main] Servlet 'jsp' is mapped to [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP] -- com.helger.as4.server.servlet.AS4WebAppListener.afterContextInitialized(AS4WebAppListener.java:88)
[2019-07-21T12:11:07,514] [ph-as4] [INFO ] [main] Servlet 'AS4Servlet' is mapped to [/as4] -- com.helger.as4.server.servlet.AS4WebAppListener.afterContextInitialized(AS4WebAppListener.java:88)
[2019-07-21T12:11:07,515] [ph-as4] [INFO ] [main] Servlet context '/ph-as4' was initialized in 2577 milli seconds -- com.helger.photon.core.servlet.WebAppListener.contextInitialized(WebAppListener.java:692)
[2019-07-21T12:11:07,590] [ph-as4] [INFO ] [main] Started o.e.j.w.WebAppContext@59662a0b{/ph-as4,file:///D:/Business/upwork/Peppolstack/as4/ph-as4-server-webapp-test/src/main/webapp/,AVAILABLE}{file:///D:/Business/upwork/Peppolstack/as4/ph-as4-server-webapp-test/src/main/webapp/} -- org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:855)
[2019-07-21T12:11:07,625] [ph-as4] [INFO ] [main] Started ServerConnector@6a988392{HTTP/1.1,[http/1.1]}{0.0.0.0:8081} -- org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:292)
[2019-07-21T12:11:07,626] [ph-as4] [INFO ] [main] Started @7757ms -- org.eclipse.jetty.server.Server.doStart(Server.java:407)
[2019-07-21T12:11:16,983] [ph-as4] [INFO ] [WAL-Listener-1] Trying to write WAL DAO file 'security/users.xml' -- com.helger.dao.wal.AbstractWALDAO._writeToFile(AbstractWALDAO.java:842)
[2019-07-21T12:11:16,990] [ph-as4] [INFO ] [WAL-Listener-1] Deleted successfully imported WAL file 'D:\Business\upwork\Peppolstack\as4\as4-data\security\users.xml.wal' -- com.helger.dao.wal.AbstractWALDAO._deleteWALFileAfterProcessing(AbstractWALDAO.java:1010)
[2019-07-21T12:11:17,485] [ph-as4] [INFO ] [WAL-Listener-1] Trying to write WAL DAO file 'as4-pmode.xml' -- com.helger.dao.wal.AbstractWALDAO._writeToFile(AbstractWALDAO.java:842)
[2019-07-21T12:11:17,495] [ph-as4] [INFO ] [WAL-Listener-1] Deleted successfully imported WAL file 'D:\Business\upwork\Peppolstack\as4\as4-data\as4-pmode.xml.wal' -- com.helger.dao.wal.AbstractWALDAO._deleteWALFileAfterProcessing(AbstractWALDAO.java:1010)
[2019-07-21T12:13:13,931] [ph-as4] [INFO ] [qtp932285561-14] Static server information set: [StaticServerInfo@0x005ae0a6: scheme=http; serverName=localhost; serverPort=8081; contextPath=/ph-as4; fullServerPath=http://localhost:8081; fullServerAndContextPath=http://localhost:8081/ph-as4] -- com.helger.servlet.StaticServerInfo.init(StaticServerInfo.java:148)
[2019-07-21T12:13:13,959] [ph-as4] [WARN ] [qtp932285561-14] HTTP status code 405 in response to GET 'http://localhost:8081/ph-as4/as4' -- com.helger.xservlet.filter.XServletFilterConsistency.checkStatusCode(XServletFilterConsistency.java:82)
[2019-07-21T12:30:17,964] [ph-as4] [INFO ] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Trying to send D:\Business\upwork\Peppolstack\as4\messages\send\Use Case 1.a_ExampleFile_PEPPOL BIS.xml -- com.helger.as4.server.servlet.DropFolderUserMessage._send(DropFolderUserMessage.java:101)
JAXP: using thread context class loader (WebAppClassLoader=1661123505@6302bbb1) for search
JAXP: Looking up system property 'javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema'
JAXP: The property is undefined.
JAXP: found null in $java.home/jaxp.properties
JAXP: attempting to use the platform default XML Schema validator
JAXP: factory 'com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory' was found for http://www.w3.org/2001/XMLSchema
[2019-07-21T12:30:18,290] [ph-as4] [INFO ] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Creating JAXB context for package org.unece.cefact.namespaces.sbdh using ClassLoader sun.misc.Launcher$AppClassLoader@5910e440 -- com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:64)
JAXP: find factoryId =javax.xml.datatype.DatatypeFactory
JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl using ClassLoader: null
JAXP: find factoryId =javax.xml.transform.TransformerFactory
JAXP: loaded from fallback value: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
JAXP: created new instance of class com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl using ClassLoader: null
JAXP: find factoryId =javax.xml.datatype.DatatypeFactory
JAXP: loaded from fallback value: com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
JAXP: created new instance of class com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl using ClassLoader: null
[2019-07-21T12:30:19,176] [ph-as4] [INFO ] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Read PEPPOL SMP client properties from smp-client.properties -- com.helger.peppol.smpclient.SMPClientConfiguration.<clinit>(SMPClientConfiguration.java:63)
[2019-07-21T12:30:20,228] [ph-as4] [INFO ] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Creating JAXB context for package com.helger.peppol.smp using ClassLoader sun.misc.Launcher$AppClassLoader@5910e440 -- com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:64)
[2019-07-21T12:30:20,322] [ph-as4] [ERROR] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Failed to create JAXB context for package 'com.helger.peppol.smp' using ClassLoader sun.misc.Launcher$AppClassLoader@5910e440: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}XPath.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.TransformType.content
		at com.helger.xsds.xmldsig.TransformType
		at private java.util.List com.helger.xsds.xmldsig.TransformsType.transform
		at com.helger.xsds.xmldsig.TransformsType
		at private com.helger.xsds.xmldsig.TransformsType com.helger.xsds.xmldsig.ReferenceType.transforms
		at com.helger.xsds.xmldsig.ReferenceType
		at public javax.xml.bind.JAXBElement com.helger.xsds.xmldsig.ObjectFactory.createReference(com.helger.xsds.xmldsig.ReferenceType)
		at com.helger.xsds.xmldsig.ObjectFactory
		at private java.util.List com.helger.xsds.xmldsig.CanonicalizationMethodType.content
		at com.helger.xsds.xmldsig.CanonicalizationMethodType
		at private com.helger.xsds.xmldsig.CanonicalizationMethodType com.helger.xsds.xmldsig.SignedInfoType.canonicalizationMethod
		at com.helger.xsds.xmldsig.SignedInfoType
		at private com.helger.xsds.xmldsig.SignedInfoType com.helger.xsds.xmldsig.SignatureType.signedInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}HMACOutputLength.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.SignatureMethodType.content
		at com.helger.xsds.xmldsig.SignatureMethodType
		at private com.helger.xsds.xmldsig.SignatureMethodType com.helger.xsds.xmldsig.SignedInfoType.signatureMethod
		at com.helger.xsds.xmldsig.SignedInfoType
		at private com.helger.xsds.xmldsig.SignedInfoType com.helger.xsds.xmldsig.SignatureType.signedInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}KeyName.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.KeyInfoType.content
		at com.helger.xsds.xmldsig.KeyInfoType
		at private com.helger.xsds.xmldsig.KeyInfoType com.helger.xsds.xmldsig.SignatureType.keyInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory
 -- com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:89)
[2019-07-21T12:30:20,324] [ph-as4] [ERROR] [WatchDir-D:\Business\upwork\Peppolstack\as4\messages\send--1943634661] Error sending D:\Business\upwork\Peppolstack\as4\messages\send\Use Case 1.a_ExampleFile_PEPPOL BIS.xml -- com.helger.as4.server.servlet.DropFolderUserMessage._send(DropFolderUserMessage.java:206)
com.helger.peppol.smpclient.exception.SMPClientException: Unknown error thrown by SMP server (Failed to create JAXB context for package 'com.helger.peppol.smp' using ClassLoader sun.misc.Launcher$AppClassLoader@5910e440)
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.getConvertedException(AbstractGenericSMPClient.java:473) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeGenericRequest(AbstractGenericSMPClient.java:505) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.smpclient.SMPClientReadOnly.getServiceRegistration(SMPClientReadOnly.java:399) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.smpclient.SMPClientReadOnly.getServiceRegistrationOrNull(SMPClientReadOnly.java:477) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.smpclient.SMPClientReadOnly.getEndpoint(SMPClientReadOnly.java:523) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.as4.server.servlet.DropFolderUserMessage._send(DropFolderUserMessage.java:116) ~[classes/:?]
	at com.helger.as4.server.servlet.DropFolderUserMessage.lambda$init$efe07f9b$1(DropFolderUserMessage.java:250) ~[classes/:?]
	at com.helger.commons.io.watchdir.WatchDir.lambda$processEvents$2(WatchDir.java:322) ~[ph-commons-9.3.4.jar:9.3.4]
	at com.helger.commons.callback.CallbackList.forEach(CallbackList.java:190) ~[ph-commons-9.3.4.jar:9.3.4]
	at com.helger.commons.io.watchdir.WatchDir.processEvents(WatchDir.java:322) ~[ph-commons-9.3.4.jar:9.3.4]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: java.lang.IllegalArgumentException: Failed to create JAXB context for package 'com.helger.peppol.smp' using ClassLoader sun.misc.Launcher$AppClassLoader@5910e440
	at com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:90) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.commons.cache.Cache.getFromCache(Cache.java:206) ~[ph-commons-9.3.4.jar:9.3.4]
	at com.helger.jaxb.JAXBContextCache.getFromCache(JAXBContextCache.java:135) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller._createUnmarshaller(GenericJAXBMarshaller.java:434) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller.read(GenericJAXBMarshaller.java:474) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:327) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:128) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:98) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:153) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:253) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.peppol.httpclient.SMPHttpResponseHandlerSigned.handleEntity(SMPHttpResponseHandlerSigned.java:178) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractSMPResponseHandler.handleResponse(AbstractSMPResponseHandler.java:80) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223) ~[httpclient-4.5.8.jar:4.5.8]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) ~[httpclient-4.5.8.jar:4.5.8]
	at com.helger.httpclient.HttpClientManager.execute(HttpClientManager.java:192) ~[ph-httpclient-9.1.2.jar:9.1.2]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeRequest(AbstractGenericSMPClient.java:427) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeGenericRequest(AbstractGenericSMPClient.java:501) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	... 9 more
Caused by: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory could not be instantiated: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}XPath.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.TransformType.content
		at com.helger.xsds.xmldsig.TransformType
		at private java.util.List com.helger.xsds.xmldsig.TransformsType.transform
		at com.helger.xsds.xmldsig.TransformsType
		at private com.helger.xsds.xmldsig.TransformsType com.helger.xsds.xmldsig.ReferenceType.transforms
		at com.helger.xsds.xmldsig.ReferenceType
		at public javax.xml.bind.JAXBElement com.helger.xsds.xmldsig.ObjectFactory.createReference(com.helger.xsds.xmldsig.ReferenceType)
		at com.helger.xsds.xmldsig.ObjectFactory
		at private java.util.List com.helger.xsds.xmldsig.CanonicalizationMethodType.content
		at com.helger.xsds.xmldsig.CanonicalizationMethodType
		at private com.helger.xsds.xmldsig.CanonicalizationMethodType com.helger.xsds.xmldsig.SignedInfoType.canonicalizationMethod
		at com.helger.xsds.xmldsig.SignedInfoType
		at private com.helger.xsds.xmldsig.SignedInfoType com.helger.xsds.xmldsig.SignatureType.signedInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}HMACOutputLength.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.SignatureMethodType.content
		at com.helger.xsds.xmldsig.SignatureMethodType
		at private com.helger.xsds.xmldsig.SignatureMethodType com.helger.xsds.xmldsig.SignedInfoType.signatureMethod
		at com.helger.xsds.xmldsig.SignedInfoType
		at private com.helger.xsds.xmldsig.SignedInfoType com.helger.xsds.xmldsig.SignatureType.signedInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory
There's no ObjectFactory with an @XmlElementDecl for the element {http://www.w3.org/2000/09/xmldsig#}KeyName.
	this problem is related to the following location:
		at private java.util.List com.helger.xsds.xmldsig.KeyInfoType.content
		at com.helger.xsds.xmldsig.KeyInfoType
		at private com.helger.xsds.xmldsig.KeyInfoType com.helger.xsds.xmldsig.SignatureType.keyInfo
		at com.helger.xsds.xmldsig.SignatureType
		at private com.helger.xsds.xmldsig.SignatureType com.helger.peppol.smp.SignedServiceMetadataType.signature
		at com.helger.peppol.smp.SignedServiceMetadataType
		at public javax.xml.bind.JAXBElement com.helger.peppol.smp.ObjectFactory.createSignedServiceMetadata(com.helger.peppol.smp.SignedServiceMetadataType)
		at com.helger.peppol.smp.ObjectFactory

	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:146) ~[?:1.8.0_161]
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:335) ~[?:1.8.0_161]
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) ~[?:1.8.0_161]
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) ~[?:1.8.0_161]
	at com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:80) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.commons.cache.Cache.getFromCache(Cache.java:206) ~[ph-commons-9.3.4.jar:9.3.4]
	at com.helger.jaxb.JAXBContextCache.getFromCache(JAXBContextCache.java:135) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller._createUnmarshaller(GenericJAXBMarshaller.java:434) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller.read(GenericJAXBMarshaller.java:474) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:327) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:128) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:98) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:153) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:253) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.peppol.httpclient.SMPHttpResponseHandlerSigned.handleEntity(SMPHttpResponseHandlerSigned.java:178) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractSMPResponseHandler.handleResponse(AbstractSMPResponseHandler.java:80) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223) ~[httpclient-4.5.8.jar:4.5.8]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) ~[httpclient-4.5.8.jar:4.5.8]
	at com.helger.httpclient.HttpClientManager.execute(HttpClientManager.java:192) ~[ph-httpclient-9.1.2.jar:9.1.2]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeRequest(AbstractGenericSMPClient.java:427) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeGenericRequest(AbstractGenericSMPClient.java:501) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	... 9 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
	at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:460) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:292) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1138) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:286) ~[jaxb-runtime-2.2.11.jar:2.2.11]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_161]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_161]
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:171) ~[?:1.8.0_161]
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:131) ~[?:1.8.0_161]
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:335) ~[?:1.8.0_161]
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:431) ~[?:1.8.0_161]
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:394) ~[?:1.8.0_161]
	at com.helger.jaxb.JAXBContextCache.lambda$new$3fed5817$1(JAXBContextCache.java:80) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.commons.cache.Cache.getFromCache(Cache.java:206) ~[ph-commons-9.3.4.jar:9.3.4]
	at com.helger.jaxb.JAXBContextCache.getFromCache(JAXBContextCache.java:135) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller._createUnmarshaller(GenericJAXBMarshaller.java:434) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.GenericJAXBMarshaller.read(GenericJAXBMarshaller.java:474) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:327) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:128) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:98) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:153) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.jaxb.IJAXBReader.read(IJAXBReader.java:253) ~[ph-jaxb-9.3.4.jar:9.3.4]
	at com.helger.peppol.httpclient.SMPHttpResponseHandlerSigned.handleEntity(SMPHttpResponseHandlerSigned.java:178) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractSMPResponseHandler.handleResponse(AbstractSMPResponseHandler.java:80) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223) ~[httpclient-4.5.8.jar:4.5.8]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) ~[httpclient-4.5.8.jar:4.5.8]
	at com.helger.httpclient.HttpClientManager.execute(HttpClientManager.java:192) ~[ph-httpclient-9.1.2.jar:9.1.2]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeRequest(AbstractGenericSMPClient.java:427) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	at com.helger.peppol.httpclient.AbstractGenericSMPClient.executeGenericRequest(AbstractGenericSMPClient.java:501) ~[peppol-smp-client-7.0.1.jar:7.0.1]
	... 9 more

Add callback method to retrieve the generated raw SBD

On using the Phase4PeppolSender.Builder and passing the bytes of the UBL via the builder's setPayload(byte[]) method, there is currently no way to obtain the generated SBD. While technically the SBD could be obtained via the output stream that is fed into our customized IAS4OutgoingDumper implementation, further filtering and decryption are necessary. Especially the decryption part is probably the blocking part though as we do not have access to the targets private key unfortunately.

A callback method that is invoked right after the SBD was generated would therefore be highly appreciated. The callback should probably support deep copying of the SBD in order to prevent posterior changes done to the original SBD while handling the callback.

Make the Message ID suffix customizable

By default all the message IDs end with "@phase4".
This should be extensible, so that @phase4.anyone" is possible as a suffix.
It needs to be ensured, that the rules of RFC 822 are maintained

N Pmode sets were registered but none was set as default

When the AS4 server received a file I got an error saying that No PMode was set as default. This error went away when I commented out line 54 in AS4CEFProfileRegistarSPI. Maybe there is a better way to specify teh default PMode set without changing code?

Adding an Attachment throws an IllegalStateException

PEPPOL Testbed complained that the payload was not sent as an attachment so I converted the setPayload call to an addAttachment one but i get the following error when sending:
`java.lang.IllegalStateException: The input stream was already acquired 1 times!
at com.helger.mail.datasource.InputStreamProviderDataSource.getInputStream(InputStreamProviderDataSource.java:71) ~[ph-mail-9.1.2.jar:9.1.2]
at com.helger.mail.datasource.IEncodingAwareDataSource$1.getInputStream(IEncodingAwareDataSource.java:65) ~[ph-mail-9.1.2.jar:9.1.2]
at javax.activation.DataHandler.writeTo(DataHandler.java:305) ~[?:1.8.0_161]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1694) ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:996) ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:561) ~[javax.mail-1.6.2.jar:1.6.2]
at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:84) ~[javax.mail-1.6.2.jar:1.6.2]
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:889) ~[?:1.8.0_161]
at javax.activation.DataHandler.writeTo(DataHandler.java:317) ~[?:1.8.0_161]
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1694) ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1913) ~[javax.mail-1.6.2.jar:1.6.2]
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1887) ~[javax.mail-1.6.2.jar:1.6.2]
at com.helger.as4.http.HttpMimeMessageEntity.writeTo(HttpMimeMessageEntity.java:91) ~[classes/:?]
at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:152) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) ~[httpclient-4.5.8.jar:4.5.8]
at com.helger.httpclient.HttpClientManager.execute(HttpClientManager.java:192) ~[ph-httpclient-9.1.2.jar:9.1.2]
at com.helger.httpclient.HttpClientManager.execute(HttpClientManager.java:157) ~[ph-httpclient-9.1.2.jar:9.1.2]
at com.helger.as4.client.BasicHttpPoster.sendGenericMessage(BasicHttpPoster.java:157) ~[classes/:?]
at com.helger.as4.client.AbstractAS4Client.sendMessage(AbstractAS4Client.java:205) ~[classes/:?]

Any idea what might be wrong?
BTW I was able to get past the previous encryption bug by creating a CertificateStore with the receivedCert :D.

Any way to get the response MDN when running the client?

I tried intercepting the response MDN when I send a document through with the client but I only get the raw response with the encrypted/signed envelope. I don't see a way to extract the actual reply sent. Am I missing something?

SunCertPathBuilderException when sending Peppol Message

I am getting the following exception when trying to send a Peppol Message to another Access Point:

2020-11-05 15:04:43.311 WARN 4672 --- [nio-8081-exec-1] c.h.p.utils.PeppolCertificateChecker : Certificate is revoked sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ~[na:na] at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) ~[na:na] at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297) ~[na:na] at com.helger.peppol.utils.PeppolCertificateChecker.isCertificateRevoked(PeppolCertificateChecker.java:308) ~[peppol-commons-8.1.1.jar:8.1.1] at com.helger.peppol.utils.PeppolCertificateChecker._checkCertificate(PeppolCertificateChecker.java:428) ~[peppol-commons-8.1.1.jar:8.1.1] at com.helger.peppol.utils.PeppolCertificateChecker.checkPeppolAPCertificate(PeppolCertificateChecker.java:459) ~[peppol-commons-8.1.1.jar:8.1.1] at com.helger.phase4.peppol.Phase4PeppolSender._checkReceiverAPCert(Phase4PeppolSender.java:176) ~[phase4-peppol-client-0.10.0.jar:0.10.0] at com.helger.phase4.peppol.Phase4PeppolSender.access$100(Phase4PeppolSender.java:76) ~[phase4-peppol-client-0.10.0.jar:0.10.0] at com.helger.phase4.peppol.Phase4PeppolSender$AbstractPeppolUserMessageBuilder.finishFields(Phase4PeppolSender.java:479) ~[phase4-peppol-client-0.10.0.jar:0.10.0] at com.helger.phase4.peppol.Phase4PeppolSender$Builder.finishFields(Phase4PeppolSender.java:733) ~[phase4-peppol-client-0.10.0.jar:0.10.0] at com.helger.phase4.sender.AbstractAS4UserMessageBuilderMIMEPayload.sendMessage(AbstractAS4UserMessageBuilderMIMEPayload.java:131) ~[phase4-lib-0.10.0.jar:0.10.0] at de.itelligence.peppol.ap.outbound.OutboundMessageService.sendPeppolMessage(OutboundMessageService.java:57) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]

The SMP under which the other AP is registered has the correct Certificate setup in the Endpoint. But the peppol-client still says the other Certificate has been revoked. It is a completely new Production Certificate.

Surely there is some misconfiguration on my side. Are there any traps I could have ran into or something I did not notice?

"Content is not allowed in prolog" if response returned contains headers and stuff

I sent a message and got back a response like:

--_=9506296633188159IBM9506296633188159MOKO
Content-Transfer-Encoding: 8bit
Content-ID: 1a2c317d-2e74-4eb3-9067-146e40ec91c7
Content-Type: application/soap+xml; charset=UTF-8

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><ns2:Messaging xmlns:ns2="http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="true" wsu:Id="soapheader-1"><ns2:SignalMessage><ns2:MessageInfo><ns2:Timestamp>2019-12-11T13:24:36.267Z</ns2:Timestamp><ns2:MessageId>5d5aa198-43ef-4edc-bf5f-43c3e834af87@1576070676267</ns2:MessageId><ns2:RefToMessageId>0ebedbc8-0cbf-434e-b316-783180bf9571@phase4</ns2:RefToMessageId></ns2:MessageInfo><ns2:Receipt><ns3:NonRepudiationInformation xmlns:ns3="http://docs.oasis-open.org/ebxml-bp/ebbp-signals-2.0"><ns3:MessagePartNRInformation><ns5:Reference xmlns:ns5="http://www.w3.org/2000/09/xmldsig#" URI="cid:phase4-att-4aff8294-68ee-430b-936c-ce1c9472a5b5"><ns5:Transforms><ns5:Transform Algorithm="http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Content-Signature-Transform"></ns5:Transform></ns5:Transforms><ns5:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ns5:DigestMethod><ns5:DigestValue>oFOIvmFARmKLYGvAJnEBhth3iPzhWDCwL7pa+Njk6SY=</ns5:DigestValue></ns5:Reference></ns3:MessagePartNRInformation><ns3:MessagePartNRInformation><ns5:Reference xmlns:ns5="http://www.w3.org/2000/09/xmldsig#" URI="#id-81954218-5f14-4bb6-ba08-07c3eb1277c0"><ns5:Transforms><ns5:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ns5:Transform></ns5:Transforms><ns5:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ns5:DigestMethod><ns5:DigestValue>8l3vKa8HMlu3IczLPKK+gaZ+h/8vLLZFnZH5MamVN+I=</ns5:DigestValue></ns5:Reference></ns3:MessagePartNRInformation><ns3:MessagePartNRInformation><ns5:Reference xmlns:ns5="http://www.w3.org/2000/09/xmldsig#" URI="#phase4-msg-f6d66172-c40d-40a8-b30a-69a3f6f77e63"><ns5:Transforms><ns5:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ns5:Transform></ns5:Transforms><ns5:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ns5:DigestMethod><ns5:DigestValue>oFBG/szdavlrwwE4K5/GjGkhVRULsySLSWhrIfLlScc=</ns5:DigestValue></ns5:Reference></ns3:MessagePartNRInformation></ns3:NonRepudiationInformation></ns2:Receipt></ns2:SignalMessage></ns2:Messaging><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="true"><wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="signingCert">MIIF1DCCA7ygAwIBAgIQGr0pf7rjKjMwCPx6u9+4jjANBgkqhkiG9w0BAQsFADBrMQswCQYDVQQGEwJCRTEZMBcGA1UEChMQT3BlblBFUFBPTCBBSVNCTDEWMBQGA1UECxMNRk9SIFRFU1QgT05MWTEpMCcGA1UEAxMgUEVQUE9MIEFDQ0VTUyBQT0lOVCBURVNUIENBIC0gRzIwHhcNMTkxMTEyMDAwMDAwWhcNMjExMTAxMjM1OTU5WjBhMRIwEAYDVQQDDAlQQVUwMDAzNDUxFzAVBgNVBAsMDlBFUFBPTCBURVNUIEFQMSUwIwYDVQQKDBxEZXBhcnRtZW50IG9mIEh1bWFuIFNlcnZpY2VzMQswCQYDVQQGEwJBVTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL147LZwNHIoMQFAz5vU3o7tdvF4N9UHMjc+IQ3/CMtrlChXs2ludh6uPnPKubcXMd9KAPB1bJX5vwTqwmFyJFUKkrPw408caLiDu1FEFk71R6oPhrJXM97aqqRI/sh66fPcNCHjCKJ8WIfs9eZ+5X26dzkrwWPKBAeeQL2sb+VIXjuPE5XSIVU7BPgPNGUafBjgxPN8It0R10fxCddS3pEB6v3GOTLcEFlDKz8K6WO3zy4qyX4KcxXPCiM08C1yeinmWXLtxDeX7GXVewNBS7PY2w8iuRd6GxAAXqogFXo5L+QttGX15Q83Waz+RwOFkYvA5meTklAtyxV06soHth0CAwEAAaOCAXwwggF4MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgOoMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMCMB0GA1UdDgQWBBSZcke8t1jZaQFhBJ2aRQ9NaPUpSTBdBgNVHR8EVjBUMFKgUKBOhkxodHRwOi8vcGtpLWNybC5zeW1hdXRoLmNvbS9jYV82YTkzNzczNGEzOTNhMDgwNWJmMzNjZGE4YjMzMTA5My9MYXRlc3RDUkwuY3JsMDcGCCsGAQUFBwEBBCswKTAnBggrBgEFBQcwAYYbaHR0cDovL3BraS1vY3NwLnN5bWF1dGguY29tMB8GA1UdIwQYMBaAFGtvS7bxN7orPH8Yzborsrl8KjfrMC0GCmCGSAGG+EUBEAMEHzAdBhNghkgBhvhFARABAgMBAYGpkOEDFgY5NTc2MDgwOQYKYIZIAYb4RQEQBQQrMCkCAQAWJGFIUjBjSE02THk5d2Eya3RjbUV1YzNsdFlYVjBhQzVqYjIwPTANBgkqhkiG9w0BAQsFAAOCAgEAe/82yLK6ialu+laNP9T9XuXs2bZ7RpWs3xprC8t+8kUV5UDd5f+8Ti+txO8cvsm7l+MKRNGGIQV8OUwDFoydrADXM7VLfWmtw7q+BtolIVwlDnCYkkPkpIdAGsWeaP7jnw57zJ0qMhLF9kaCc0seFL9fFjioF5MC2R8TGPMgy4pUl5cetNx4lJbN6dGUq8dUgZebKhUrI+JTqxARhIlImmI86fuxOa8gkxD90Z0ND0nO+a1yFCol2sA6fB3WiwsnkESZlK0YfkMHjy1WEpB26INC1IIL8WJ0ifyK8iuERjoyQ64/u/26ngaQX3XoDBugH5U2FQfKDeIAMDYq3xeUyioTT5WfWu0ueBDQsBqg2/ostayiusrcGKUtOPOpUYLJKX7BdGR2qvWnhbFQVPPUFlFSZeQEumOUskx5+tjIxEVbM1Ocfrs/8p4pW1q2EHT92knqGTpG14mSn0NVntBQumdPhIUTtjMiY55GAcL7cdq+oRY+D+mAdxJnFmH7uLc61ES95lXtcdw6XGvZOcNV+dsTuwRJR3t2JPLXdiUjDbp++ZWY9AIcfG7r9rZ0EzUdrKxGuq65Hk9eev6883FBUEeuPFAq3oWStyjtI1yuWRTHVNaBU+n9dHD8BlfoEJaymC2pQO/ec8NKwyCrUf5AXX6xaJhQQ77cmn5Ge2blXyg=</wsse:BinarySecurityToken><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></ds:SignatureMethod><ds:Reference URI="#soapheader-1"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod><ds:DigestValue>YWewkJXepXl8Tt+RVKh+6LOMnquy+iv41IL2V2RA+hQ=</ds:DigestValue></ds:Reference><ds:Reference URI="#soapbody"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod><ds:DigestValue>MuXTb3M4BFAClqp28AnKQQJPuH1XxCZZle+49qRiZVk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>AWwXxbtSIVhuxP+RaLsg/LY2RCoEDSt/oe/H8MNgNSSQr88/paw80FbULfzrzyQu82ga1PEM7syaDrt1w+UWrfkf+FjiXb+mj2vH+9IvnUBBvQ/is6DeWRdYtuyrhg3a4Rehb5tJqbpVB4DW2TnTGccWCq3Al8QT/MotrA3MuJqWVqChyfiBrk9KqDGPa9rX9/kxYY/xM78lIrtHFrFlj+Fyf9Ng8O1qAstX3ALbvAdHMAuu5Ot6OxXabm6hNLFU2XQz59cHKjXNAXzGiKuSrwQwmJWm+C/l+XNXoPjBV/HDjOzg8D5uqIOyKFhQrx7wDMjt0kp07Q9uRXkZOwPYrw==</ds:SignatureValue><ds:KeyInfo Id="KeyId-urn:uuid:38689DB9DD7E992F181576070676664"><wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-urn:uuid:38689DB9DD7E992F181576070676665"><wsse:Reference URI="#signingCert" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"></wsse:Reference></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></soapenv:Header><soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="soapbody"></soapenv:Body></soapenv:Envelope>
--_=9506296633188159IBM9506296633188159MOKO--

In log I see this error when processing the signal:

2019-12-11T15:24:35,099 INFO  com.helger.phase4.peppol.Phase4PeppolSender._sendHttp(Phase4PeppolSender.java:205) - Successfully transmitted AS4 document with message ID '0ebedbc8-0cbf-434e-b316-783180bf9571@phase4' to 'https://test.ap.ebmsb.humanservices.gov.au/pbus/as4'
2019-12-11T15:27:28,251 ERROR com.helger.commons.log.LogHelper.log(LogHelper.java:323) - [fatal_error] @ (1:1) [SAX] Content is not allowed in prolog. (org.xml.sax.SAXParseException: Content is not allowed in prolog.)
2019-12-11T15:27:28,254 ERROR com.helger.commons.log.LogHelper.log(LogHelper.java:323) - [error] @ (1:1) [SAX] Content is not allowed in prolog. (org.xml.sax.SAXParseException: Content is not allowed in prolog.)
org.xml.sax.SAXParseException: Content is not allowed in prolog.
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) ~[?:1.8.0_161]
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) ~[?:1.8.0_161]
	at com.helger.xml.serialize.read.DOMReader.readXMLDOM(DOMReader.java:334) [ph-xml-9.3.8.jar:9.3.8]
	at com.helger.xml.serialize.read.DOMReader.readXMLDOM(DOMReader.java:237) [ph-xml-9.3.8.jar:9.3.8]
	at com.helger.xml.serialize.read.DOMReader.readXMLDOM(DOMReader.java:231) [ph-xml-9.3.8.jar:9.3.8]
	at com.helger.phase4.peppol.Phase4PeppolSender.parseSignalMessage(Phase4PeppolSender.java:123) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender._sendHttp(Phase4PeppolSender.java:220) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender._sendAS4Message(Phase4PeppolSender.java:515) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender.access$100(Phase4PeppolSender.java:106) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender$Builder.sendMessage(Phase4PeppolSender.java:1056) [classes/:?]
	at com.as4.sender.AS4PEPPOLSender.send(AS4PEPPOLSender.java:262) [classes/:?]
	at com.as4.sender.AS4PEPPOLSender.main(AS4PEPPOLSender.java:180) [classes/:?]
2019-12-11T15:27:55,467 ERROR com.helger.phase4.peppol.Phase4PeppolSender._sendHttp(Phase4PeppolSender.java:233) - Internal error sending AS4 message to 'https://test.ap.ebmsb.humanservices.gov.au/pbus/as4'
com.helger.phase4.peppol.Phase4PeppolException: Failed to parse as XML
	at com.helger.phase4.peppol.Phase4PeppolSender.parseSignalMessage(Phase4PeppolSender.java:125) ~[classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender._sendHttp(Phase4PeppolSender.java:220) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender._sendAS4Message(Phase4PeppolSender.java:515) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender.access$100(Phase4PeppolSender.java:106) [classes/:?]
	at com.helger.phase4.peppol.Phase4PeppolSender$Builder.sendMessage(Phase4PeppolSender.java:1056) [classes/:?]
	at com.as4.sender.AS4PEPPOLSender.send(AS4PEPPOLSender.java:262) [classes/:?]
	at com.as4.sender.AS4PEPPOLSender.main(AS4PEPPOLSender.java:180) [classes/:?]

It seems we need some sort of mime handling in teh MDN?

no object DCH for MIME type application/soap+xml;charset=UTF-8

Hi Phillip,

I am getting the above error when running the as4 peppol client within a java software called mirth that likely starts it in a separate thread while probably injecting some of its libraries.
Any idea what I could do?

What I tried:
1 -> Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
2 -> `MailcapCommandMap mc = (MailcapCommandMap) CommandMap.getDefaultCommandMap();
mc.addMailcap("text/html;; x-java-content-handler=com.sun.mail.handlers.text_html");
mc.addMailcap("text/xml;; x-java-content-handler=com.sun.mail.handlers.text_xml");
mc.addMailcap("text/plain;; x-java-content-handler=com.sun.mail.handlers.text_plain");
mc.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
mc.addMailcap("message/rfc822;; x-java-content- handler=com.sun.mail.handlers.message_rfc822");

Error below:
[2019-11-21 04:06:42,635] ERROR (com.helger.phase4.peppol.Phase4PeppolSender:225): Internal error sending AS4 message to 'xxxxxxxxxx' javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/soap+xml;charset=UTF-8 at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:896) at javax.activation.DataHandler.writeTo(DataHandler.java:317) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1574) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:948) at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:538) at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:103) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:889) at javax.activation.DataHandler.writeTo(DataHandler.java:317) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1574) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1840) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1816) at com.helger.phase4.http.HttpMimeMessageEntity.writeTo(HttpMimeMessageEntity.java:91) at com.helger.phase4.client.AbstractAS4Client._createRepeatableEntity(AbstractAS4Client.java:544) at com.helger.phase4.client.AbstractAS4Client.sendMessageWithRetries(AbstractAS4Client.java:637) at com.helger.phase4.peppol.Phase4PeppolSender._sendHttp(Phase4PeppolSender.java:193) at com.helger.phase4.peppol.Phase4PeppolSender._sendAS4Message(Phase4PeppolSender.java:506) at com.helger.phase4.peppol.Phase4PeppolSender.access$100(Phase4PeppolSender.java:98) at com.helger.phase4.peppol.Phase4PeppolSender$Builder.sendMessage(Phase4PeppolSender.java:1016) at com.as4.sender.AS4PEPPOLSender.send(AS4PEPPOLSender.java:237) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3508) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)

Problems while processing the SecurityHeader of a received Ack do not propagate to the client

A failure while processing the security header of a received positive acknowledgement, i.e. due to a failure on resolving the correct truststore location or using outdated certificates, does not propagate correctly to the client, which leaves the client in the believe everything went smoothly even though there might be a stacktrace and/or warning present in the logs that the security header could not be processed.

In the case of aSecurityEngine.processSecurityHeader(aSOAPDoc, aRequestData) throwing a WSSSecurityException the catch block is logging the cause of the problem and feeding the error list with an respective error object before an appropriate success state is returned. This success state leads to the execution of the else block in AS4IncomingHandler that just iterates through the respective errors in the list and converts them to error messages.

After returning to the invoking method the flag for a failed SOAP header element processing is set and the updated state is returned to the invoking Phase4PeppolSender which just takes the stored signal message and puts it into the aRetWrapper.

As parseSignalMessage(...) was performed as a callback as part of the AS4IncomingHandler.parseAS4Message(...) invocation no exception is thrown here in this case and the information on the unprocessed SecurityHeader is lost and just the signal message returned to the caller.

IMO the problem is based in the handling of the IAS4MessageState which does not check for a processing failure in first place but assumes that when a signal message is present everything should have gone fine.

How to receive message level response (MLR) in phase4-peppol-client?

I'm using phase4-peppol-client to send invoice to an access point. The invoice is sent successfully and I got a receipt. But the receiver's contact person said that the invoice has an incorrect parameter and I can automatically get the error message if I enable receiving MLR. I try using methods setResponseConsumer and setSignalMsgConsumer from Phase4PeppolSender.Builder but cannot get the MLR.

My question is how to receive MLR in phase4-peppol-client?

Create a camel enpoint (sending and receiving)

I've been trying to do this for Oxalis, but on the major issues (e.g. too much code and functionslity in one method) and no response to my issues etc... I'm sort of fed up with them. Yes, it might be the most used in the world and they have coding wise some nice things but it is alsmost completely 'you need to do it our way' with some plugablility but not good integration in others systems.

So I'd like to volunteer to make a peppol endpoint for usage in camel. Sending and receiving... So you can use all other features of camel as wel (including storate, routing etc...)... Interested?

versioning issues

Hi Phil,
Happy New year!
I see an issue with versions of dependencies. I loaded teh entire project ad imported it into intellij and I see in the libraries section multiple versions of a dependency:
com.google.guava:guava:19.0
com.google.guava:guava:20.0
com.helger:pepol-smp-client:7.0.4
com.helger:pepol-smp-client:7.0.6

and the list can go on.

I think one of the parent poms referenced may be the culprits.

Storage module for AS4

Any chance to get the storage module of AS2 server (which is simply awesome) into the AS4 server as well?

[Phase4 - Springboot]

Hello Philip, I was wondering if it would be possible do provide a demo with phase4 servlet and spring boot.
Thank you in advance!

Typo in Error message

Hi,
I noticed that inside enum com.helger.phase4.error.EEbmsError sShortDescription property for EBMS_FAILED_DECRYPTION contains typo.

Actual: FailedDecyrption
Expected: FailedDecryption

Issue in Enable Persistece in Spring boot Project

I am trying to enable persistent by setting the property
phase4.manager.inmemory=false and
global.datapath=phase4-data
but the AS4 server is not starting up due to the following stack-trace

2021-05-23 15:13:26.406  INFO 23404 --- [  restartedMain] c.h.p.s.Phase4SpringbootApplication      : Starting Phase4SpringbootApplication on DESKTOP-CDB8RFB with PID 23404 (F:\work\xi\as4-server\target\classes started by khurram in F:\work\xi)
2021-05-23 15:13:26.410  INFO 23404 --- [  restartedMain] c.h.p.s.Phase4SpringbootApplication      : No active profile set, falling back to default profiles: default
2021-05-23 15:13:26.510  INFO 23404 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in C:\Users\khurram\.m2\repository\com\sun\xml\bind\jaxb-impl\3.0.0\jaxb-impl-3.0.0.jar referenced one or more files that do not exist: file:/C:/Users/khurram/.m2/repository/com/sun/xml/bind/jaxb-impl/3.0.0/jaxb-core.jar
2021-05-23 15:13:26.510  INFO 23404 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in C:\Users\khurram\.m2\repository\org\glassfish\jaxb\jaxb-core\2.2.11\jaxb-core-2.2.11.jar referenced one or more files that do not exist: file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-api-2.2.12-b140109.1041.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-core/2.2.11/txw2-2.2.11.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-core/2.2.11/istack-commons-runtime-2.21.jar
2021-05-23 15:13:26.510  INFO 23404 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in C:\Users\khurram\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.1\jaxb-runtime-2.3.1.jar referenced one or more files that do not exist: file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-api-2.3.1.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/txw2-2.3.1.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/istack-commons-runtime-3.0.7.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/stax-ex-1.8.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/FastInfoset-1.2.15.jar,file:/C:/Users/khurram/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.1/javax.activation-api-1.2.0.jar
2021-05-23 15:13:26.510  INFO 23404 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2021-05-23 15:13:26.510  INFO 23404 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2021-05-23 15:13:27.205  INFO 23404 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2021-05-23 15:13:27.309  INFO 23404 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 95ms. Found 9 JPA repository interfaces.
2021-05-23 15:13:28.507  INFO 23404 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9091 (http)
2021-05-23 15:13:28.516  INFO 23404 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-05-23 15:13:28.516  INFO 23404 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.37]
2021-05-23 15:13:28.663  INFO 23404 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-05-23 15:13:28.664  INFO 23404 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2153 ms
2021-05-23 15:13:28.752  INFO 23404 --- [  restartedMain] c.h.x.requesttrack.RequestTracker        : RequestTrackerMonitor was installed successfully.
2021-05-23 15:13:28.861  WARN 23404 --- [  restartedMain] c.h.c.e.EqualsImplementationRegistry     : Another equals implementation for class class javax.xml.bind.JAXBElement is already registered (com.helger.jaxb.adapter.config.JAXBEqualsImplementationRegistrarSPI$$Lambda$543/273220887@68158835) so it is not overwritten with com.helger.jaxb.config.JAXBEqualsImplementationRegistrarSPI$$Lambda$571/2103413172@6c050b9c
2021-05-23 15:13:28.879  INFO 23404 --- [  restartedMain] com.helger.phase4.mgr.MetaAS4Manager     : MetaAS4Manager is initialized using file system persistence
2021-05-23 15:13:28.882  INFO 23404 --- [  restartedMain] com.helger.phase4.mgr.MetaAS4Manager     : Creating AS4 managers using factory class com.helger.phase4.mgr.ManagerFactoryPersistingFileSystem
2021-05-23 15:13:28.900 ERROR 23404 --- [  restartedMain] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletRegistrationBean' defined in com.helger.phase4.springboot.servlet.ServletConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'servletRegistrationBean' threw exception; nested exception is com.helger.commons.exception.InitializationException: Failed to init MetaAS4Manager
2021-05-23 15:13:28.920  INFO 23404 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-05-23 15:13:28.927  WARN 23404 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [RequestTrackerMonitor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
2021-05-23 15:13:28.928  WARN 23404 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2021-05-23 15:13:28.935  WARN 23404 --- [  restartedMain] c.h.scope.singleton.AbstractSingleton    : Object not instantiated is destroyed soon: [MetaAS4Manager@0x060e0d6a: Status={}]
2021-05-23 15:13:28.935  INFO 23404 --- [  restartedMain] c.h.x.requesttrack.RequestTracker        : RequestTrackerMonitor is now shutting down
2021-05-23 15:13:28.936  INFO 23404 --- [  restartedMain] c.h.x.requesttrack.RequestTracker        : RequestTrackerMonitor was uninstalled successfully.
2021-05-23 15:13:28.937  WARN 23404 --- [  restartedMain] c.h.scope.singleton.AbstractSingleton    : Object not instantiated is now destroyed: [MetaAS4Manager@0x060e0d6a: Status={2}]
2021-05-23 15:13:28.948  INFO 23404 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-05-23 15:13:28.956 ERROR 23404 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at com.helger.phase4.springboot.Phase4SpringbootApplication.main(Phase4SpringbootApplication.java:49) [classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.3.2.RELEASE.jar:2.3.2.RELEASE]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:437) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:191) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:178) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:158) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	... 14 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletRegistrationBean' defined in com.helger.phase4.springboot.servlet.ServletConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'servletRegistrationBean' threw exception; nested exception is com.helger.commons.exception.InitializationException: Failed to init MetaAS4Manager
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:635) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:211) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:202) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:96) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:85) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:255) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:229) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:53) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5128) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_251]
	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_251]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_251]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_251]
	at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_251]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_251]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486) ~[tomcat-embed-core-9.0.37.jar:9.0.37]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:123) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]
	... 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.ServletRegistrationBean]: Factory method 'servletRegistrationBean' threw exception; nested exception is com.helger.commons.exception.InitializationException: Failed to init MetaAS4Manager
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	... 61 common frames omitted
Caused by: com.helger.commons.exception.InitializationException: Failed to init MetaAS4Manager
	at com.helger.phase4.mgr.MetaAS4Manager.onAfterInstantiation(MetaAS4Manager.java:117) ~[phase4-lib-1.3.0.jar:1.3.0]
	at com.helger.scope.singleton.AbstractSingleton.getSingleton(AbstractSingleton.java:560) ~[ph-scopes-10.1.1.jar:10.1.1]
	at com.helger.scope.singleton.AbstractGlobalSingleton.getGlobalSingleton(AbstractGlobalSingleton.java:65) ~[ph-scopes-10.1.1.jar:10.1.1]
	at com.helger.phase4.mgr.MetaAS4Manager.getInstance(MetaAS4Manager.java:124) ~[phase4-lib-1.3.0.jar:1.3.0]
	at com.helger.phase4.servlet.AS4ServerInitializer.initAS4Server(AS4ServerInitializer.java:60) ~[phase4-lib-1.3.0.jar:1.3.0]
	at com.helger.phase4.springboot.servlet.ServletConfig._initAS4(ServletConfig.java:104) ~[classes/:na]
	at com.helger.phase4.springboot.servlet.ServletConfig._init(ServletConfig.java:76) ~[classes/:na]
	at com.helger.phase4.springboot.servlet.ServletConfig.servletRegistrationBean(ServletConfig.java:63) ~[classes/:na]
	at com.helger.phase4.springboot.servlet.ServletConfig$$EnhancerBySpringCGLIB$$954d33f9.CGLIB$servletRegistrationBean$1(<generated>) ~[classes/:na]
	at com.helger.phase4.springboot.servlet.ServletConfig$$EnhancerBySpringCGLIB$$954d33f9$$FastClassBySpringCGLIB$$282ebb10.invoke(<generated>) ~[classes/:na]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at com.helger.phase4.springboot.servlet.ServletConfig$$EnhancerBySpringCGLIB$$954d33f9.servletRegistrationBean(<generated>) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	... 62 common frames omitted
Caused by: java.lang.IllegalStateException: Data path was not initialized!
	at com.helger.photon.app.io.WebFileIO.getDataIO(WebFileIO.java:140) ~[ph-oton-app-8.3.0.jar:8.3.0]
	at com.helger.photon.app.dao.AbstractPhotonMapBasedWALDAO.<init>(AbstractPhotonMapBasedWALDAO.java:51) ~[ph-oton-app-8.3.0.jar:8.3.0]
	at com.helger.photon.app.dao.AbstractPhotonMapBasedWALDAO.<init>(AbstractPhotonMapBasedWALDAO.java:44) ~[ph-oton-app-8.3.0.jar:8.3.0]
	at com.helger.phase4.model.mpc.MPCManager.<init>(MPCManager.java:41) ~[phase4-lib-1.3.0.jar:1.3.0]
	at com.helger.phase4.mgr.ManagerFactoryPersistingFileSystem.createMPCManager(ManagerFactoryPersistingFileSystem.java:50) ~[phase4-lib-1.3.0.jar:1.3.0]
	at com.helger.phase4.mgr.MetaAS4Manager.onAfterInstantiation(MetaAS4Manager.java:105) ~[phase4-lib-1.3.0.jar:1.3.0]
	... 79 common frames omitted

Exception listing payload: java.lang.UnsupportedOperationException in 0.10.1

Happens if AS4 HTTP Debugging and Outgoing Dumper is enabled

## Exception listing payload: java.lang.UnsupportedOperationException -- null
## java.lang.UnsupportedOperationException
1.: com.helger.phase4.client.BasicHttpPoster$1.getContent(BasicHttpPoster.java:262)
2.: org.apache.http.util.EntityUtils.toString(EntityUtils.java:201)
3.: org.apache.http.util.EntityUtils.toString(EntityUtils.java:308)
4.: com.helger.phase4.client.BasicHttpPoster.lambda$sendGenericMessage$0(BasicHttpPoster.java:219)
5.: com.helger.phase4.http.AS4HttpDebug.debug(AS4HttpDebug.java:80)
6.: com.helger.phase4.client.BasicHttpPoster.sendGenericMessage(BasicHttpPoster.java:211)
7.: com.helger.phase4.client.BasicHttpPoster.sendGenericMessageWithRetries(BasicHttpPoster.java:316)
8.: com.helger.phase4.client.AbstractAS4Client.sendMessageWithRetries(AbstractAS4Client.java:407)
9.: com.helger.phase4.servlet.AS4BidirectionalClientHelper.sendAS4AndReceiveAS4(AS4BidirectionalClientHelper.java:119)

Make PMode class static

Thanks Philip. FWIW, I think that it would be best if the PMode class and all of its subclasses were to be concrete. The reason I say this that PModes are something that we want to marshal/demarshal (serialize/deserialze). We want to store them on the file system, in databases, we want to pass them on Kafka streams and MQ queues, etc. Each of the ways that we want to store and/or transport PModes has well known utilities that can directly operate on concrete objects and marshal/demarshal (serialize/deserialze) them. Jackson data-bind, GSON, JAXB, JDBC, Java serialization, etc. If the class and/or its subclasses are not concrete, then it is more complicated and non-standard.

phase4-servlet receipt references non-existent attachment in ds:SignedInfo

I'm testing my own eInvoicing code by sending an AS4 message to phase4-servlet and I noticed that the receipt generated by phase4-servlet doesn't seem to be valid. The receipt message has no attachments, but includes a reference to the original <eb:UserMessage> attachment in wsse:Security/ds:Signature/ds:SignedInfo.

<ds:Reference URI="cid:partaba1efd30000016e149a6ed400000004_1">
  <ds:Transforms>
    <ds:Transform Algorithm="http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1#Attachment-Content-Signature-Transform"/>
  </ds:Transforms>
  <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
  <ds:DigestValue>v5F7qa6envmNTvKbnUaPJ5+6pHZHWQvQJbmhfr4hU+s=</ds:DigestValue>
</ds:Reference>

My signature verification code fails because there is no attachment on the receipt. If I understand correctly, this response is invalid under AS4 because this <ds:Reference> shouldn't be present. However, let me know if I've missed something and this response is valid somehow.

Removing line 662 from AS4RequestHandler fixes the problem, and the remaining <ds:Reference> elements (referring to the <eb:Messaging> header and the SOAP Body) which can be correctly verified.

See attached for the bad and corrected responses.

Thanks for building phase4 - it's been very handy for my testing!

MEP-Bindings leg2?

Use for the MEP-Bindings Two-Way/Push-and-Push/Push-and-Pull/Pull-and-Push

Two legs or just one

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.