On Thursday, May 05, 2011 12:53:41 PM ext2 wrote:
> By the way, if the attachment is bigger than 64K. the temporary file of
> first attachment will be left on disk and keep open until the web service
> client's jvm exit;
> 
> The CXF version is 2.3.3

Can you try with 2.3.4 just to make sure (I'm not expecting much of a change, 
but it may fix it)?

If it's still an issue, is there anyway to create a "hello world" type test 
case for it and attach to a JIRA?

Dan


> 
> > -----original-----
> > Sender: ext2 [mailto:[email protected]]
> > Time: 2011/5/6 0:00
> > Receiver: [email protected]
> > Subject: MTOM Attament Cleaning Problems / Bugs ?
> > 
> > Hi:
> > When webservice client receiving the MTOM reponse(which  have more than
> 
> one
> 
> > attachments), the client cannot release Http-Connection correctly;
> > 
> > In my program all DataHandler's input stream have been consumed and
> > closed correctly; but the http-connection still cannot be released
> > correctly;
> > 
> > the import thing is : if we only have one attachment, the http-connection
> > can be released correctly. But more than one attachments, cannot release
> > http-connection correctly;
> > 
> > 
> > Following is a simple example for illustrate the wsdl and clients:
> > MTOM Reponse Schema:
> > <complexType name="DataHandlerType2">
> > 
> >  <sequence>
> >  
> >   <element name="nameR" type="xsd:string" />
> >   <element name="attachinfoR1" type="xsd:base64Binary"
> > 
> > xmime:expectedContentTypes="application/octet-stream"/>
> > <element name="attachinfoR2" type="xsd:base64Binary"
> > xmime:expectedContentTypes="application/octet-stream"/>
> > </sequence>
> > </complexType>
> > 
> > 
> > Program is :
> > 
> > ...do webservice invoke and got the reply
> > is = reply.getAttachinfoR1().getDataSource().getInputStream();
> > readClose(is);
> > is = reply.getAttachinfoR2().getDataSource().getInputStream();
> > readClose(is);
> > 
> > private void readClose(InputStream is) throws IOException {
> > 
> >     while(is.read() != -1)
> >     
> >             ;
> >     
> >     is.close();
> > 
> > }

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to