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´m trying to implemente a web service that uses MTOM Attachments. > > The way I´m doing is "Annotation if JAXB bean". The problem is that > > the wsdl that I generate with ant task "java2wsdl" doesn´t add the > > annotation @XmlMimeType("application/octet-stream") in the > > <wsdl:types>. > > > > 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 = title; } > > @XmlTransient public DataHandler getXmlData() { return xmlData;} > > public void setXmlData(DataHandler xmlData) {this.xmlData = > > xmlData;} } > > -------------------------------------------------------------------- > >-------- > > > > My service is: > > -------------------------------------------------------------------- > >-------- @WebService > > public interface ServicioFormularios { > > @WebResult(name="uuid") > > String guardaFormulario(@WebParam(name="xml")FicheroXML xml); > > } > > -------------------------------------------------------------------- > >-------- > > > > > > My cxf configuration is: > > -------------------------------------------------------------------- > >-------- <beans xmlns="http://www.springframework.org/schema/beans" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:jaxws="http://cxf.apache.org/jaxws" > > xsi:schemaLocation="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"> > > > > <import resource="classpath:META-INF/cxf/cxf.xml"/> > > <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> > > <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> > > > > <jaxws:endpoint > > id="servicioFormulario" > > implementor="com.servicios.ServicioFormulariosImpl" > > address="/servicioFormulario"> > > <jaxws:properties> > > <entry key="mtom-enabled" value="true"/> > > </jaxws:properties> > > </jaxws:endpoint> > > </beans> > > -------------------------------------------------------------------- > >-------- > > > > The wsdl generated whit java2wsdl: > > -------------------------------------------------------------------- > >-------- . > > .. > > ... > > <xs:complexType name="ficheroXML"> > > <xs:sequence> > > <xs:element minOccurs="0" name="xmlData" type="xs:base64Binary"/> > > <xs:element minOccurs="0" name="title" type="xs:string"/> > > </xs:sequence> > > </xs:complexType> > > ... > > .. > > . > > <xs:complexType name="guardaFormulario"> > > <xs:sequence> > > <xs:element minOccurs="0" name="xml" type="ficheroXML"/> > > </xs:sequence> > > </xs:complexType> > > ... > > .. > > . > > -------------------------------------------------------------------- > >-------- > > > > Why the attribute > > (xmime:expectedContentTypes="application/octet-stream") isn´t in the > > "xmlData" element of "FicheroXML" ? > > > > Any ideas ... it seam like the annotation @XmlMimeType it´s not > > running. > > > > Thanks in advance. -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog