You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Talkov, Roger" <Ro...@automic.com> on 2015/10/27 02:33:25 UTC
Inline attachments sent as MTOM
I have a Request Object with an attachment field of byte [], I expect the attachment to go across as Inline data base 64 encoded, code snippet below.
@XmlElement(required = true)
protected byte[] inputBinary;
but it appears to be sent as an MTOM attachment:
LoggingOutInterceptor: Outbound Message
---------------------------
ID: 1
Address: http://vwgarwin01:8080/testWS/testws
Encoding: UTF-8
Http-Method: POST
Content-Type: multipart/related; type="text/xml"; boundary="uuid:76ef1055-95fd-466a-b973-af39492ca798"; start="<ro...@cxf.apache.org>"; start-info="text/xml"
Headers: {Accept=[*/*], SOAPAction=[""]}
Payload: --uuid:76ef1055-95fd-466a-b973-af39492ca798
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-ID: <ro...@cxf.apache.org>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns3:echoRequest4 xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="http://www.automic.com/wsdl/test"><input>test input</input><inputBoolean>false</inputBoolean><inputBinary><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1559899d-330e-478b-91fd-c7bf8c8ea1e0-1@cxf.apache.org"/></inputBinary><inputFloat>0.0</inputFloat><inputDouble>0.0</inputDouble><inputInteger>0</inputInteger><inputLong>0</inputLong><inputShort>0</inputShort><inputByte>0</inputByte><inputUnsignedInt>0</inputUnsignedInt><inputUnsignedLong>0</inputUnsignedLong><inputUnsignedShort>0</inputUnsignedShort><inputUnsignedByte>0</inputUnsignedByte><inputAnyURI>http://dummy</inputAnyURI><inputQName xmlns:prefix="namespaceURI">prefix:localPart</inputQName></ns3:echoRequest4></soap:Body></soap:Envelope>
--uuid:76ef1055-95fd-466a-b973-af39492ca798
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <15...@cxf.apache.org>
binary test
--uuid:76ef1055-95fd-466a-b973-af39492ca798-
Is there any way I can have it go out as inline data?
Roger Talkov
Senior Software Engineer
Roger.Talkov@automic.com
+14256332568
+14256332568
Come join us at Automic World 2015<http://www.automicworld.com/en>
The Scottsdale Resort at McCormick Ranch
[http://1c9e30b70c73eb198123-9b11260827274175546df9d773dd515f.r87.cf2.rackcdn.com/AW_Email_Signature.png]<http://1c9e30b70c73eb198123-9b11260827274175546df9d773dd515f.r87.cf2.rackcdn.com/AW_Email_Signature.png>
Twitter: #AutomicWorld<http://ctt.ec/fG_Rr>
Event Email: aw2015@automic.com<ma...@automic.com>
This email (including any attachments) may contain information which is privileged, confidential, or protected. If you are not the intended recipient, note that any disclosure, copying, distribution, or use of the contents of this message and attached files is prohibited. If you have received this email in error, please notify the sender and delete this email and any attached files.
RE: Inline attachments sent as MTOM
Posted by "Talkov, Roger" <Ro...@automic.com>.
I'm using the dynamic client and even thought I set:
requestContext.put (Message.MTOM_ENABLED, "false") the attachment goes thru looking like MTOM.
Our code uses whatever wsdl the user enters so I can't add @XmlInlineBinaryData annotation to the field
Roger
-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, October 27, 2015 7:22 AM
To: users@cxf.apache.org
Cc: Daransky, Peter <Pe...@automic.com>; Berger, Franz <Fr...@automic.com>
Subject: Re: Inline attachments sent as MTOM
You can turn off MTOM, but that would force inline for everything. The other option would be to add @XmlInlineBinaryData annotation to the field to force that one to be inlined and not affect the others.
Dan
> On Oct 26, 2015, at 9:33 PM, Talkov, Roger <Ro...@automic.com> wrote:
>
> I have a Request Object with an attachment field of byte [], I expect the attachment to go across as Inline data base 64 encoded, code snippet below.
>
> @XmlElement(required = true)
> protected byte[] inputBinary;
>
> but it appears to be sent as an MTOM attachment:
>
> LoggingOutInterceptor: Outbound Message
> ---------------------------
> ID: 1
> Address: http://vwgarwin01:8080/testWS/testws
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: multipart/related; type="text/xml"; boundary="uuid:76ef1055-95fd-466a-b973-af39492ca798"; start="<ro...@cxf.apache.org>"; start-info="text/xml"
> Headers: {Accept=[*/*], SOAPAction=[""]}
> Payload: --uuid:76ef1055-95fd-466a-b973-af39492ca798
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: binary
> Content-ID: <ro...@cxf.apache.org>
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns3
> :echoRequest4 xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns3="http://www.automic.com/wsdl/test"><input>test
> input</input><inputBoolean>false</inputBoolean><inputBinary><xop:Inclu
> de xmlns:xop="http://www.w3.org/2004/08/xop/include"
> href="cid:1559899d-330e-478b-91fd-c7bf8c8ea1e0-1@cxf.apache.org"/></in
> putBinary><inputFloat>0.0</inputFloat><inputDouble>0.0</inputDouble><i
> nputInteger>0</inputInteger><inputLong>0</inputLong><inputShort>0</inp
> utShort><inputByte>0</inputByte><inputUnsignedInt>0</inputUnsignedInt>
> <inputUnsignedLong>0</inputUnsignedLong><inputUnsignedShort>0</inputUn
> signedShort><inputUnsignedByte>0</inputUnsignedByte><inputAnyURI>http:
> //dummy</inputAnyURI><inputQName
> xmlns:prefix="namespaceURI">prefix:localPart</inputQName></ns3:echoReq
> uest4></soap:Body></soap:Envelope>
> --uuid:76ef1055-95fd-466a-b973-af39492ca798
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: binary
> Content-ID: <15...@cxf.apache.org>
>
> binary test
> --uuid:76ef1055-95fd-466a-b973-af39492ca798—
>
> Is there any way I can have it go out as inline data?
>
>
> Roger Talkov
> Senior Software Engineer
> Roger.Talkov@automic.com
> +14256332568
> +14256332568
>
> Come join us at Automic World 2015
> The Scottsdale Resort at McCormick Ranch
>
>
>
> Twitter: #AutomicWorld
> Event Email: aw2015@automic.com
> This email (including any attachments) may contain information which is privileged, confidential, or protected. If you are not the intended recipient, note that any disclosure, copying, distribution, or use of the contents of this message and attached files is prohibited. If you have received this email in error, please notify the sender and delete this email and any attached files.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
This email (including any attachments) may contain information which is privileged, confidential, or protected. If you are not the intended recipient, note that any disclosure, copying, distribution, or use of the contents of this message and attached files is prohibited. If you have received this email in error, please notify the sender and delete this email and any attached files.
Re: Inline attachments sent as MTOM
Posted by Daniel Kulp <dk...@apache.org>.
You can turn off MTOM, but that would force inline for everything. The other option would be to add @XmlInlineBinaryData annotation to the field to force that one to be inlined and not affect the others.
Dan
> On Oct 26, 2015, at 9:33 PM, Talkov, Roger <Ro...@automic.com> wrote:
>
> I have a Request Object with an attachment field of byte [], I expect the attachment to go across as Inline data base 64 encoded, code snippet below.
>
> @XmlElement(required = true)
> protected byte[] inputBinary;
>
> but it appears to be sent as an MTOM attachment:
>
> LoggingOutInterceptor: Outbound Message
> ---------------------------
> ID: 1
> Address: http://vwgarwin01:8080/testWS/testws
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: multipart/related; type="text/xml"; boundary="uuid:76ef1055-95fd-466a-b973-af39492ca798"; start="<ro...@cxf.apache.org>"; start-info="text/xml"
> Headers: {Accept=[*/*], SOAPAction=[""]}
> Payload: --uuid:76ef1055-95fd-466a-b973-af39492ca798
> Content-Type: text/xml; charset=UTF-8
> Content-Transfer-Encoding: binary
> Content-ID: <ro...@cxf.apache.org>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns3:echoRequest4 xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns3="http://www.automic.com/wsdl/test"><input>test input</input><inputBoolean>false</inputBoolean><inputBinary><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1559899d-330e-478b-91fd-c7bf8c8ea1e0-1@cxf.apache.org"/></inputBinary><inputFloat>0.0</inputFloat><inputDouble>0.0</inputDouble><inputInteger>0</inputInteger><inputLong>0</inputLong><inputShort>0</inputShort><inputByte>0</inputByte><inputUnsignedInt>0</inputUnsignedInt><inputUnsignedLong>0</inputUnsignedLong><inputUnsignedShort>0</inputUnsignedShort><inputUnsignedByte>0</inputUnsignedByte><inputAnyURI>http://dummy</inputAnyURI><inputQName xmlns:prefix="namespaceURI">prefix:localPart</inputQName></ns3:echoRequest4></soap:Body></soap:Envelope>
> --uuid:76ef1055-95fd-466a-b973-af39492ca798
> Content-Type: application/octet-stream
> Content-Transfer-Encoding: binary
> Content-ID: <15...@cxf.apache.org>
>
> binary test
> --uuid:76ef1055-95fd-466a-b973-af39492ca798—
>
> Is there any way I can have it go out as inline data?
>
>
> Roger Talkov
> Senior Software Engineer
> Roger.Talkov@automic.com
> +14256332568
> +14256332568
>
> Come join us at Automic World 2015
> The Scottsdale Resort at McCormick Ranch
>
>
>
> Twitter: #AutomicWorld
> Event Email: aw2015@automic.com
> This email (including any attachments) may contain information which is privileged, confidential, or protected. If you are not the intended recipient, note that any disclosure, copying, distribution, or use of the contents of this message and attached files is prohibited. If you have received this email in error, please notify the sender and delete this email and any attached files.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com