Couple of options:
1) Turn off mtom. That should keep it inlined. 2) Add @XmlInlineBinaryData to the managerNonce field 3) Depending on how mtom is turned on, you can control the threshold size. For example, if using the @MTOM annotation, you can do @MTOM(threshold=1024) or similar to force MTOM for only larger byte[] sizes Dan On Saturday, August 13, 2011 12:17:51 PM robbywillz wrote: > Hi, > > I'm facing a problem in converting a Byte Array to Base64 Binary. > The managerNonce supposed to be converted to Base64Binary format as it is > defined as byte[], but it converts to XOP format. The server expects this in > Base64Binary format. > > Can you please help me on how to convert this to Base64 format? > > I'm using Apache CXF 2.3.3 version. > > --uuid:b151f053-b6cc-402f-a008-b1e2ca56dad1 > Content-Type: text/xml; charset=UTF-8; type="text/xml"; > Content-Transfer-Encoding: binary > Content-ID: <[email protected]> > > <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><startRegi > stration > xmlns="http://www.nokiasiemens.com/ne3s/1.0"><managerIdentity><uniqueId>wil > liam_myne3s_test</uniqueId><type>ne3s_ws_client</type><vendor>NSN</vendor><r > elease>1.0</release></managerIdentity><agentUniqueId>Esymac</agentUniqueId>< > notificationConsumerURL>http://localhost:7070/ne3sws/services</notificationC > onsumerURL><reRegisterInterval>10</reRegisterInterval>*<managerNonce><xop:In > clude xmlns:xop="http://www.w3.org/2004/08/xop/include" > href="cid:[email protected]"/></ma > nagerNonce>*<soc>[email protected]</soc></star > tRegistration></soap:Body></soap:Envelope> > --uuid:b151f053-b6cc-402f-a008-b1e2ca56dad1 > Content-Type: application/octet-stream > Content-Transfer-Encoding: binary > Content-ID: <[email protected]> > > 1313260562190 > > > Regards, > William > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Convert-Byte-Array-to-Base64Binary-tp469690 > 3p4696903.html Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
