Hi,

where do you observe that behavior ? Via the soap monitor or by using
a TCP (HTTP more specifically) sniffer ? Normally to see if MTOM is
working you should use some TCP monitor, soap monitor or any other
soap message monitor won't help you.

--Angel

On 1/17/07, Nathan Kuroczycki <[EMAIL PROTECTED]> wrote:
Hi,

I am trying to send the request XML with the binary within an MTOM
attachment. However, the code below sends the binary inline with the rest of
the xml request. My understanding from the Axis2 examples is that by
enabling MTOM, the binary will be sent as a referenced attachment. Is there
something that I'm not doing?

Thanks,
Nathan


ServiceClient service = new ServiceClient();



Options options = new Options();

options.setTo(new EndpointReference(URL));

options.setAction("urn:update");

options.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE );

service.setOptions(options);



try {



OMFactory fac = OMAbstractFactory.getOMFactory();

OMNamespace omNs = fac.createOMNamespace("catalog", "");

OMElement up = fac.createOMElement("in0", omNs);



FileDataSource fds = new FileDataSource("file.xml");

DataHandler dataHandler = new DataHandler(fds);



OMText textData = fac.createOMText(dataHandler, true);

textData.setOptimize(true);



up.addChild(textData);



//OMElement res = service.sendReceive(up);

//service.fireAndForget(up);

service.sendRobust(up);

}

catch(Exception error) {

error.printStackTrace();

}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to