Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 36530 invoked from network); 26 Nov 2010 12:52:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Nov 2010 12:52:17 -0000 Received: (qmail 94385 invoked by uid 500); 26 Nov 2010 12:52:15 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 94133 invoked by uid 500); 26 Nov 2010 12:52:15 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 94125 invoked by uid 99); 26 Nov 2010 12:52:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Nov 2010 12:52:14 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.208.4.194] (HELO mout.perfora.net) (74.208.4.194) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Nov 2010 12:52:08 +0000 Received: from [10.86.254.47] (198-135-0-233.cisco.com [198.135.0.233]) by mrelay.perfora.net (node=mrus3) with ESMTP (Nemesis) id 0M24nL-1OS48M48mh-00tYUC; Fri, 26 Nov 2010 07:51:46 -0500 Message-ID: <4CEFAD5C.5090201@alex-andr.org> Date: Fri, 26 Nov 2010 07:51:40 -0500 From: Alex A User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Samisa Abeysinghe CC: java-user@axis.apache.org Subject: Re: Exchange EWS and large attachments References: <4CEE6C63.1070506@alex-andr.org> <4CEE70BF.6030205@alex-andr.org> <4CEF111C.50107@alex-andr.org> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000508030109070501020907" X-Provags-ID: V02:K0:luo9nWxLGwkY1OmC0TbMNY8a9hucCsw6Rh2Njqf0a96 XuLhtFWrhSoLp0kGOIeZ2VdyGuHv5fxPtNkpEXqhvuITv2YqHK UxMU+PSTxSp5R4EuT3jiBIIEzHgl13ioehKSpSXyrjGbrvaA61 ayHLu0aPAOhz2/5UPXmB6EpOGu6zxEXqJhK6pUabL7sHs04Tay 9wDUtZwmLBYeISwP+UfPaV5FRHgM6cLMFwnpNQt/LY= --------------000508030109070501020907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 > 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 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 > > 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/ > > --------------000508030109070501020907 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/


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





--------------000508030109070501020907--