axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa.abeysin...@gmail.com>
Subject Re: Exchange EWS and large attachments
Date Fri, 26 Nov 2010 05:04:09 GMT
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 <alex@alex-andr.org> 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 <alex@alex-andr.org> 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: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>     Samisa ...
>
> http://samisa-abeysinghe.blogspot.com/
>
>
>  Samisa ...

http://samisa-abeysinghe.blogspot.com/

Mime
View raw message