Return-Path: Delivered-To: apmail-incubator-cxf-user-archive@locus.apache.org Received: (qmail 42725 invoked from network); 17 Oct 2007 02:16:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Oct 2007 02:16:11 -0000 Received: (qmail 58212 invoked by uid 500); 17 Oct 2007 02:15:57 -0000 Delivered-To: apmail-incubator-cxf-user-archive@incubator.apache.org Received: (qmail 58178 invoked by uid 500); 17 Oct 2007 02:15:57 -0000 Mailing-List: contact cxf-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-user@incubator.apache.org Delivered-To: mailing list cxf-user@incubator.apache.org Received: (qmail 58159 invoked by uid 99); 17 Oct 2007 02:15:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 19:15:57 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.79.197.59] (HELO mesa2.com) (64.79.197.59) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 02:15:57 +0000 Received: from [24.147.10.180] (account jdkulp HELO dilbert.boston.amer.iona.com) by mesa2.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 1428716; Tue, 16 Oct 2007 22:15:34 -0400 From: Daniel Kulp To: cxf-user@incubator.apache.org Subject: Re: MTOM and @XmlMimeType("application/octet-stream") annotation. Date: Tue, 16 Oct 2007 22:15:33 -0400 User-Agent: KMail/1.9.7 Cc: Jim Ma References: <13229561.post@talk.nabble.com> <200710161442.25083.dkulp@apache.org> <200710161538.07394.dkulp@apache.org> In-Reply-To: <200710161538.07394.dkulp@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200710162215.33717.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org It's definitely a bug in XmlSchema. Updating to the latest version of=20 XmlSchema helped a little bit, but not enough. It at least attempts to=20 write the extensors. The problem is the parsing only saves the last=20 extensor. I've worked around that bug by writing a Deserializer that=20 actually works correctly so it should work now. Just committed the fix=20 to trunk. Dan On Tuesday 16 October 2007, Daniel Kulp wrote: > OK. Not a JAXB issue. Seems to be an XmlSchema issue. The DOM we > feed into XmlSchema contains the contenttype stuff. If I immediately > print the schema, it's gone. :-( > > Dan > > On Tuesday 16 October 2007, Daniel Kulp wrote: > > No, this is different. That thread talks about parameters to the > > SEI methods that should be attachments. In this case, this is a > > field inside one of the objects that is a parameter. This SHOULD > > work. We just pass the object class as-is to JAXB so this seems to > > be a JAXB issue. > > > > Dan > > > > On Tuesday 16 October 2007, Jim Ma wrote: > > > This is not supported in CXF . > > > This thread FYI: > > > http://www.nabble.com/MTOM-sample-generated-WSDL-with-DataHandler- > > >on -s erver-t4210895.html > > > > > > imorales wrote: > > > > Hi all. > > > > > > > > I=C2=B4m trying to implemente a web service that uses MTOM > > > > Attachments. The way I=C2=B4m doing is "Annotation if JAXB bean". T= he > > > > problem is that the wsdl that I generate with ant task > > > > "java2wsdl" doesn=C2=B4t add the annotation > > > > @XmlMimeType("application/octet-stream") in the . > > > > > > > > My bean is: > > > > ---------------------------------------------------------------- > > > >-- -- -------- @XmlType > > > > public class FicheroXML { > > > > > > > > private String title; > > > > > > > > @XmlMimeType("application/octet-stream") > > > > private DataHandler xmlData; > > > > > > > > public String getTitle() {return title; } > > > > public void setTitle(String title) {this.title =3D title; } > > > > @XmlTransient public DataHandler getXmlData() { return > > > > xmlData;} public void setXmlData(DataHandler xmlData) > > > > {this.xmlData =3D xmlData;} } > > > > ---------------------------------------------------------------- > > > >-- -- -------- > > > > > > > > My service is: > > > > ---------------------------------------------------------------- > > > >-- -- -------- @WebService > > > > public interface ServicioFormularios { > > > > @WebResult(name=3D"uuid") > > > > String guardaFormulario(@WebParam(name=3D"xml")FicheroXML xml); > > > > } > > > > ---------------------------------------------------------------- > > > >-- -- -------- > > > > > > > > > > > > My cxf configuration is: > > > > ---------------------------------------------------------------- > > > >-- -- -------- > > > xmlns=3D"http://www.springframework.org/schema/beans" > > > > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" > > > > xmlns:jaxws=3D"http://cxf.apache.org/jaxws" > > > > xsi:schemaLocation=3D"http://www.springframework.org/schema/beans > > > > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > > > > http://cxf.apache.org/jaxws > > > > http://cxf.apache.org/schemas/jaxws.xsd"> > > > > > > > > > > > > > > > resource=3D"classpath:META-INF/cxf/cxf-extension-soap.xml"/> > > > > > > > > > > > > > > > id=3D"servicioFormulario" > > > > implementor=3D"com.servicios.ServicioFormulariosImpl" > > > > address=3D"/servicioFormulario"> > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > > > >-- -- -------- > > > > > > > > The wsdl generated whit java2wsdl: > > > > ---------------------------------------------------------------- > > > >-- -- -------- . > > > > .. > > > > ... > > > > > > > > > > > > > > > type=3D"xs:base64Binary"/> > > > type=3D"xs:string"/> > > > > > > > > ... > > > > .. > > > > . > > > > > > > > > > > > > > > > > > > > > > > > ... > > > > .. > > > > . > > > > ---------------------------------------------------------------- > > > >-- -- -------- > > > > > > > > Why the attribute > > > > (xmime:expectedContentTypes=3D"application/octet-stream") isn=C2=B4= t in > > > > the "xmlData" element of "FicheroXML" ? > > > > > > > > Any ideas ... it seam like the annotation @XmlMimeType it=C2=B4s n= ot > > > > running. > > > > > > > > Thanks in advance. =2D-=20 J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 daniel.kulp@iona.com http://www.dankulp.com/blog