Title: RE: Attachment Stream is read twice

Thanks for the information! I tried CommonsHttpSender with
CommonHttpClient 3Rc3 and CommonsCodec and it fails

---------------
java.lang.NoSuchMethodError: org.apache.commons.httpclient.MultiThreadedHttpConn
ectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionMan
agerParams;
        at org.apache.axis.transport.http.CommonsHTTPSender.initialize(CommonsHT
TPSender.java:95)
        at org.apache.axis.transport.http.CommonsHTTPSender.<init>(CommonsHTTPSe
nder.java:89)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.axis.deployment.wsdd.WSDDTargetedChain.makeNewInstance(WSD
DTargetedChain.java:157)
        at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSD
DDeployableItem.java:274)
        at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDe
ployableItem.java:260)
        at org.apache.axis.deployment.wsdd.WSDDDeployment.getTransport(WSDDDeplo
yment.java:410)
        at org.apache.axis.configuration.FileProvider.getTransport(FileProvider.
java:257)

------------------

Do you have any idea? What version of HttpClient do you suggest?


Best regards,

Stefan


-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]]
Sent: Thu 9/15/2005 2:37 PM
To: [email protected]
Subject: Re: Attachment Stream is read twice

Use CommonsHTTPSender, stream will be queried only once.

On 9/15/05, Stefan Schuster <[EMAIL PROTECTED]> wrote:
> Hello,
>
> when I create an attachemt and add it to the message
> Message.createAttachmentPart... Message.addAttachmentPart...
> The Stream set in the DataSource is requested twice
> from the DataSource.
>
> This is an problem because the stream cannot be reset (FileInputStream)
> and I dont want to buffer the whole file to be able to
> return a new stream whenever the StreamSources
> getStream() method is called.
>
> Any suggestions?
>
> Thanks in advance,
>
> Stefan
>
>


--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform



Reply via email to