Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 012D818C39 for ; Sun, 24 Jan 2016 16:06:41 +0000 (UTC) Received: (qmail 23724 invoked by uid 500); 24 Jan 2016 16:06:40 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 23476 invoked by uid 500); 24 Jan 2016 16:06:40 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 23338 invoked by uid 99); 24 Jan 2016 16:06:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jan 2016 16:06:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D89562C1F62 for ; Sun, 24 Jan 2016 16:06:39 +0000 (UTC) Date: Sun, 24 Jan 2016 16:06:39 +0000 (UTC) From: "Andreas Veithen (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AXIS2-4602) JAX-WS MTOM issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Veithen updated AXIS2-4602: ----------------------------------- Fix Version/s: (was: 1.7.1) 1.8.0 > JAX-WS MTOM issue > ----------------- > > Key: AXIS2-4602 > URL: https://issues.apache.org/jira/browse/AXIS2-4602 > Project: Axis2 > Issue Type: Bug > Components: jaxws > Reporter: Isuru Eranga Suriarachchi > Fix For: 1.8.0 > > Attachments: jaxws-mtom-fix.txt > > > In Axis2 JAX-WS implementation, org.apache.axis2.jaxws.message.Block is extending OMDataSourceExt. In the response messages of normal invocations, this object is kept inside the body of the SOAPEnvelope and directly serialized without building the OMElement. In order to handle MTOM, it uses the JAXBAttachmentMarshaller which writes data handler objects into the MTOMXMLStreamWriter. > MTOM works fine as far as the return OMElement is not built and directly serialized using the OMDataSource. But if the OMElement is built by some handler on the return path, JAXB Block is written to a ByteArrayOutputStream and read as a ByteArray (through the getReader() method of BlockImpl). Therefore, the OMElement which is built using this ByteArray, doesn't know about MTOM. So, the response is given as base64 (inline). > So even though the service is MTOM enabled, if some handler (Ex: Security) builds the body element, the binary response data is transmitted as base64-encoded inline, instead of as a separate binary attachment (see below - I remove most of the returned data due to its length): > --MIMEBoundaryurn_uuid_6A41A9AB6F9E3EEAB71262792774662 > Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" > Content-Transfer-Encoding: binary > Content-ID: <0.urn:uuid:6A41A9AB6F9E3EEAB71262792774663@apache.org> > f39/f39/f39/f39... > --MIMEBoundaryurn_uuid_6A41A9AB6F9E3EEAB71262792774662-- -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org