cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Shakirin <>
Subject RE: CXF mtom on the client
Date Mon, 22 Apr 2013 08:59:10 GMT
Hi Stefan,

Didn’t find any obvious problem in you configuration.
How you fill your WSDocument.innhold DataHandler in client, based on URL or DataSource?
I will recommend to look mtom sample from CXF contribution and try to find the difference
with your code.

Did you test it without jaxb fluent api?
I am very curious where is really the problem.


From: Stefan Magnus Landrø []
Sent: Montag, 22. April 2013 10:09
To: Andrei Shakirin
Subject: Re: CXF mtom on the client

Hi Andrei,

We're using cxf 2.7.4

We're using the wsdl2java maven plugin with the following config:


This generates the following service interface:

 * This class was generated by Apache CXF 2.7.4
 * 2013-04-22T09:44:31.901+02:00
 * Generated source version: 2.7.4
@WebService(targetNamespace = "http://........../v1", name = "OppdatereHenvendelsesBehandlingPortType")
@XmlSeeAlso({ObjectFactory.class, tjeneste.virksomhet.henvendelse.v1.informasjon.ObjectFactory.class})
public interface OppdatereHenvendelsesBehandlingPortType {


    @WebResult(name = "dokumentId", targetNamespace = "")
    @RequestWrapper(localName = "opprettDokument", targetNamespace = "http://.../v1", className
= "tjeneste.virksomhet.oppdaterehenvendelsesbehandling.v1.OpprettDokument")
    @ResponseWrapper(localName = "opprettDokumentResponse", targetNamespace = "http://tjeneste/virksomhet/oppdaterehenvendelsesbehandling/v1",
className = "tjeneste.virksomhet.oppdaterehenvendelsesbehandling.v1.OpprettDokumentResponse")
    public java.lang.Long opprettDokument(
        @WebParam(name = "dokument", targetNamespace = "")
        tjeneste.virksomhet.henvendelse.v1.informasjon.WSDokument dokument,
        @WebParam(name = "dokumentForventningId", targetNamespace = "")
        java.lang.Long dokumentForventningId,
        @WebParam(name = "behandlingsId", targetNamespace = "")
        java.lang.String behandlingsId


WSDokument is the class containing the binary data:

@XmlType(name = "dokument", propOrder = {
public class WSDokument {
    protected long id;
    protected String filnavn;

    protected DataHandler innhold;

    @XmlElement(type = String.class)
    @XmlJavaTypeAdapter(Adapter1 .class)
    @XmlSchemaType(name = "dateTime")
    protected DateTime opplastetDato;


We're passing in the service interface in the spring config like this:

    <jaxws:client id="oppdatereHenvendelsesBehandlingService" xmlns:henvendelse="http://service.provider.henvendelse.dialogarena.sbl/"

                 <entry key="mtom-enabled" value="true"/>

I'll try to do som serious debugging today to see what is going on. Any pointers to where
I should look?


2013/4/20 Andrei Shakirin <<>>

Your configuration seems to be OK.

Do you use generated client? Could you paste the client code here as well?
Which version of CXF do you use?


> -----Original Message-----
> From: Stefan Magnus Landrø [<>]
> Sent: Freitag, 19. April 2013 14:44
> To:<>
> Subject: CXF mtom on the client
> Hi,
> We are trying to enable mtom on the client side using the following config
>  <jaxws:client id="........">
>              <jaxws:properties>
>              <entry key="mtom-enabled" value="true"/>
>              </jaxws:properties>
>     </jaxws:client>
> but are seeing some unexpected results.
> 10 MB files get inlined in the soap message as base64 even if cxf generating a
> HTTP mulitpart request.
> And yes, we have enabled mtom in the wsdl:
>    <xs:element minOccurs="0" name="content" type="xs:base64Binary"
>       xmime:expectedContentTypes="application/octet-stream"/>
> And, responses containing large files, get split into several parts in the http
> response.
> What could be going on?
> Cheers
> Stefan


TesTcl - a unit test framework for iRules
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message