Open Tomas-Kraus opened 2 years ago
No movement on this major bug in over 2 years? This issue affects all request headers, not just the "Content-Transfer-Encoding" one. When a Message is converted to a SAAJ SOAPMessage, all the original MIME header information is missing.
I'm pretty sure this is happening because the SAAJMessage constructor never calls the private "parse" method: https://github.com/eclipse-ee4j/metro-jax-ws/blob/22629d34bdcb6f414bcc9abe8ee025368a795dde/jaxws-ri/runtime/rt/src/main/java/com/sun/xml/ws/message/saaj/SAAJMessage.java#L79
This means that the next time the SAAJMessage.readAsSoapMessage method is called, it creates a new SOAPMessage object instead of returning the one that was passed to its constructor (because the internal 'parsedMessage' boolean isn't true): https://github.com/eclipse-ee4j/metro-jax-ws/blob/22629d34bdcb6f414bcc9abe8ee025368a795dde/jaxws-ri/runtime/rt/src/main/java/com/sun/xml/ws/message/saaj/SAAJMessage.java#L252
Its that new SOAPMessage object is passed the header information: https://github.com/eclipse-ee4j/metro-jax-ws/blob/22629d34bdcb6f414bcc9abe8ee025368a795dde/jaxws-ri/runtime/rt/src/main/java/com/sun/xml/ws/message/AbstractMessageImpl.java#L204
And that new SOAPMessage object is never used again :( This means that any registered javax.xml.ws.handler.soap.SOAPHandler in the chain never see the correct MimeHeaders
Hi All,
All of my SOAP request attachments has "Content-Transfer-Encoding" mime header. In our web service, we have SOAP Message Handler. When I dump the SOAPMessage contents, "Content-Transfer-Encoding" is missing. Below is the code snippet to dump the SOAPMessage.