Samisa,
As I described in my previous email, it looks like MTOM is not supported
by the Microsoft's IIS.
I can't even enable MTOM and pass over the simple requests without
attachments.
So I am looking for a way to stream the content of file inside the XML
element, without MTOM.
Thanks,
~ Alex.
On 11/26/2010 12:04 AM, Samisa Abeysinghe wrote:
The MTOM sample of Axis2 can be found here:
https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/samples/mtom/
And it also has a readme:
https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/samples/mtom/README.txt
HTH
On Fri, Nov 26, 2010 at 7:15 AM, Alex A <[email protected]
<mailto:[email protected]>> wrote:
Hi, Thanks for answering
EWS is Microsoft Exchange's SOAP service.
MS provides [somewhat broken] wsdl, so can generate a stub.
In that stub,
wsdl's type definition <xs:element minOccurs="0" name="Content"
type="xs:base64Binary"/>
handled via
public void setContent(byte[] content) {}
Which works nice for small "Contents" and wasteful for large ones.
I was hoping to attach info via MTOM and something like
FileDataSource src = new FileDataSource("/tmp/big.png");
MessageContext messageContext =
MessageContext.getCurrentMessageContext();
DataHandler dataHandler = new DataHandler(src);
messageContext.addAttachment(dataHandler);
then setting a ContentID in the actual XML element.
BUT - I am unable to use MTOM - after enabling it, even for
simplest requests without attachments, Microsoft's IIS gives me
ErrorSchemaValidation - Data at the root level is invalid. Line 1,
position 1.
Which makes me think that apparently MS IIS is unable to handle
multipart http.
I am wondering how can I make "Stub" reading from stream instead
of byte[].
I read about using DataHandlers but now scratching my head how can
I plug it in, so that the attached info will be a part of the XML,
not the second block in multipart http.
Please pardon my ignorance if any - I am new to this field.
Let me know if information is not sufficient.
When you say Axis2 works with large attachments, could you give me
a concrete example of how it's done?
Thanks,
~ Alex.
On 11/25/2010 7:34 PM, Samisa Abeysinghe wrote:
What is EWS? And large attachment should just work with Axis2 as
you do with normal attachments.
On Thu, Nov 25, 2010 at 7:50 PM, Alex A <[email protected]
<mailto:[email protected]>> wrote:
Some clarifications:
I use Axis2/J 1.5.1 only as a client, linux environment.
Server is MS Windows IIS, MS Exchange with EWS enabled.
Thanks,
~ Alex.
On 11/25/2010 9:02 AM, Alex A wrote:
Hello, All
Trying to create emails with attachments in Exchange
server via EWS.
But having hard time making it work with large
attachments, MTOM or not.
Can someone provide an example of creating a large
attachment with Axis2 via EWS?
Thanks,
~ Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]
<mailto:[email protected]>
For additional commands, e-mail:
[email protected]
<mailto:[email protected]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
<mailto:[email protected]>
For additional commands, e-mail:
[email protected]
<mailto:[email protected]>
Samisa ...
http://samisa-abeysinghe.blogspot.com/
Samisa ...
http://samisa-abeysinghe.blogspot.com/