This commit is contained in:
Arjen Poutsma
2007-06-25 09:18:27 +00:00
parent 13dbad0ffc
commit 6728a33c7f
3 changed files with 5 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ public class Jaxb2Marshaller extends AbstractJaxbMarshaller implements MimeMarsh
private Map<java.lang.String, ?> jaxbContextProperties;
private boolean mtomEnabled = true;
private boolean mtomEnabled = false;
/**
* Sets the <code>XmlAdapter</code>s to be registered with the JAXB <code>Marshaller</code> and
@@ -127,8 +127,8 @@ public class Jaxb2Marshaller extends AbstractJaxbMarshaller implements MimeMarsh
}
/**
* Indicates whether MTOM support should be enabled or not. Default is <code>true</code>, marshalling using XOP/MTOM
* is enabled.
* Indicates whether MTOM support should be enabled or not. Default is <code>false</code>, marshalling using
* XOP/MTOM is not enabled.
*/
public void setMtomEnabled(boolean mtomEnabled) {
this.mtomEnabled = mtomEnabled;

View File

@@ -199,6 +199,7 @@ public class Jaxb2MarshallerTest extends XMLTestCase {
public void testMarshalAttachments() throws Exception {
marshaller = new Jaxb2Marshaller();
marshaller.setClassesToBeBound(new Class[]{BinaryObject.class});
marshaller.setMtomEnabled(true);
marshaller.afterPropertiesSet();
MimeContainer mimeContainer = createMock(MimeContainer.class);

View File

@@ -114,6 +114,7 @@ public class Jaxb2UnmarshallerTest extends TestCase {
public void testMarshalAttachments() throws Exception {
unmarshaller = new Jaxb2Marshaller();
unmarshaller.setClassesToBeBound(new Class[]{BinaryObject.class});
unmarshaller.setMtomEnabled(true);
unmarshaller.afterPropertiesSet();
MimeContainer mimeContainer = createMock(MimeContainer.class);