This content has been marked as final. Show 4 replies
gimbal2 wrote:the hits i saw had nothing to do with SAAJ, just used the SOAPHandler facility (which is the solution the OP is looking for). the MTOM is a red herring, it's just a way of streaming attachment data more efficiently.
jtahlborn wrote:I did the same google, but it seems that the hits tend to use SAAJ and not this MTOM whatever the heck that is.
a google search for "jaxws soap header" returns plenty of promising looking results. seems odd that you are so strapped for time and you didn't check google first.
I think I have found the answer. The following code may help interested readers:
thanks for your kind replies.
WSBindingProvider wsb = (WSBindingProvider)fileServicePortType; //add the header that was added to the soap message to outbound request wsb.setOutboundHeaders(Headers.create(soapMessage.getSOAPHeader()));