Omar Elfada
Omar Elfada

Reputation: 394

Spring ws - AxiomSoapMessage & attachment with MTOM are inline

im trying to understand how the AxiomSoapMessageFactory handles request (the body & attachment) but i dont understand some points (or they are maybe features)

i 'm using AxioSoapMessageFactory like this :

<bean id="messageFactory" class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
    <property name="payloadCaching" value="true"/>
    <property name="attachmentCaching" value="true"/>
</bean>

Here is the point :

I have thought that the AxiomSoapMessage will contain :

But the attachment is intead inline See this screenshot

So why is the attachment inline like here ? Is what any interceptor will see ? What is the benefit of have an attachment inline if the attachmentCaching (see above) was set to true ?

I know i should ask this on the Spring forum but it seems almost death concerning answers. Thanks in advance for your help !

Upvotes: 2

Views: 2260

Answers (2)

user1521469
user1521469

Reputation: 21

I've noticed the property attachmentCaching in AxiomSoapMessageFactory only being used if the soap message has content type as Multipart message. So how do I get my client to send Multipart message with attachment in it?

Upvotes: 2

aledbf
aledbf

Reputation: 777

You need to enable mtom attachments in the Marshaller (by default it's disabled in Jaxb2Marshaller)

Upvotes: 1

Related Questions