Comments (7)
As a temporary fix I did the following:
@Nullable
public static Ebms3SignalMessage parseSignalMessage (@Nonnull @WillNotClose final AS4ResourceHelper aResHelper,
@Nonnull final byte [] aBytes) throws Phase4PeppolException
{
// Read response as XML
Document aSoapDoc = DOMReader.readXMLDOM (aBytes);
if (aSoapDoc == null || aSoapDoc.getDocumentElement () == null) {
Session newSession = Session.getDefaultInstance(new Properties());
InputStream inputStreamObj = new ByteArrayInputStream(aBytes);
try {
MimeMessage mimeMessageObj = new MimeMessage(newSession, inputStreamObj);
String contentType = mimeMessageObj.getContentType();
part = (String) mimeMessageObj.getContent();
part = part.replaceAll("\\<\\?xml(.+?)\\?\\>", "").trim();
part = part.substring(0, part.lastIndexOf('>')+1);
aSoapDoc = DOMReader.readXMLDOM (part);
if (aSoapDoc == null || aSoapDoc.getDocumentElement () == null) {
throw new Phase4PeppolException("Failed to parse as XML");
}
} catch (MessagingException e) {
throw new Phase4PeppolException("Failed to parse as XML", e);
} catch (IOException e) {
throw new Phase4PeppolException("Failed to parse as XML", e);
}
} else {
part = new String(aBytes);
}
....
from phase4.
Okay, so you found the setSignalMsgConsumer
method in the builder. This is clearly a bug...
from phase4.
In this case is there anythig I could do? Also any way to process the response message, meaning decrypt and verify the actual inside payload?
from phase4.
Thanks for the taking the time to post this here. Let me see what I can do....
from phase4.
In the meantime I verified, that it is okay, to always use MIME encoding. I need to implement this accordingly
from phase4.
@AlexandruCiobanu do you have a test endpoint for me, where the SignalMessage comes as a MIME message? Thx
from phase4.
It should be fixed in the v0.9.7 release
from phase4.
Related Issues (20)
- aProcessingErrorMessages in handleIncomingSBD HOT 6
- Sending to wildcard HOT 1
- aAPCertificate parameter in IPhase4PeppolCertificateCheckResultHandler is Nullable HOT 1
- Peppol Reporting missing C1 country code for incoming items HOT 1
- Receiving WildCard Error HOT 5
- DBNA profile HOT 2
- PMode.Leg[1].BusinessInfo.Service 'null' is unsupported HOT 12
- Enhancement request : make status of used version available via a status page or rest endpoint
- Idea: Add marks to log, so it is easier to read for human HOT 3
- Validating NRRs against sent or received messages HOT 1
- Sending Einvoice to SG ABN resulting in Invalid Certificate Error HOT 7
- Better AS4 error message when duplicate MessageId has been detected HOT 2
- Give access to the HTTP error response
- Provide a possibility to exclude stack traces from AS4 error messages HOT 1
- Not working with brainpool curve based encryption required for BDEW profile
- Bad Request: Error validating incoming AS4 UserMessage with the profile DBN Alliance following errors are present: [PMode.Leg[1].Security.X509EncryptionAlgorithm must use the value 'aes256-gcm' instead of 'aes128-gcm'] HOT 7
- Add DBNA pendant to phase4-peppol-servlet
- Trust anchor for certification path not found error for Incoming AS4 messages HOT 3
- Dynamically set responder address for incoming messages
- BDEW profile: Curve not supported: brainpoolP256r1 (1.3.36.3.3.2.8.1.1.7) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phase4.