You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Priya <la...@gmail.com> on 2013/04/01 10:42:43 UTC

Re: MTOM: large attachments eating up JVM heap

> 
> 
> I'm wondering if it might be possible to run the wsdl2java stuff on a 
slightly modified wsdl.   An XSLT could
> likely take the original WSDL, replace the expectectContentTypes with 
something like:
> 
> > <xs:element name="content" type="xs:base64Binary" 
xmime:expectedContentTypes="image/jpeg,
> image/png, image/gif, application/octet-stream"/>
> 
> and then run the wsdl2java on that modified WSDL.   That should then get the 
DataHandler instead.  The runtime
> and everything could still use the original WSDL.
> 
> Dan
> 
> On Sep 21, 2012, at 9:42 AM, Marcel Stör <ma...@...> wrote:
> 
> > On 21.09.2012 15:33, Glen Mazza wrote:
> >> On 09/21/2012 08:08 AM, Marcel Stör wrote:
> >>> The bad news:
> >>> d) Since we run wsdl2java in each an every Maven build a) isn't an
> >>> option anyway.
> >>> 
> >> 
> >> wsdl2java should be able to generate DataHandlers within method
> >> signatures, my MTOM/Apache FOP tutorial[1] will generate the following
> >> service endpoint interface for uploading/downloading PDFs:
> > 
> > Yes, that's because you use xmime:expectedContentTypes="application/octet-
stream" in the WSDL/XSD.
> > 
> > In addition to my image attachment I also have a CSV attachment type with 
a text/csv MIME type. For this
> class the content attribute is a DataHandler.
> > 
> > <xs:complexType name="csvAttachment">
> >  <xs:complexContent>
> >    <xs:extension base="me:attachment">
> >      <xs:sequence>
> >        <xs:element name="content" type="xs:base64Binary" 
xmime:expectedContentTypes="text/csv"/>
> >      </xs:sequence>
> >    </xs:extension>
> >  </xs:complexContent>
> > </xs:complexType>
> > <xs:complexType name="imageAttachment">
> >  <xs:complexContent>
> >    <xs:extension base="me:attachment">
> >      <xs:sequence>
> >        <xs:element name="content" type="xs:base64Binary" 
xmime:expectedContentTypes="image/jpeg,
> image/png, image/gif"/>
> >      </xs:sequence>
> >    </xs:extension>
> >  </xs:complexContent>
> > </xs:complexType>
> > 
> > public class CsvAttachment extends Attachment {
> >  @XmlElement(required = true)
> >  @XmlMimeType("text/csv")
> >  protected DataHandler content;
> > 
> > public class ImageAttachment extends Attachment {
> >  @XmlElement(required = true)
> >  @XmlMimeType("image/*")
> >  protected Image content;
> > 
> > Cheers,
> > Marcel
> 


Hi Daniel,

Please help me out in Processing the csv files using MTOM Axis2 web service.
I have used dataHandler. 
But how to parse the data and send it back again as CSV file as the attachment.

Please suggest few samples.

Thanks and Regards,
Priya
Daniel Kulp <dk...@...> writes: