2.0.4 doesn't know anything about xmime:expectedContentType, AFAIK. Do you
have the @MTOM annotation in place to enable the threshold?

On Fri, Feb 22, 2008 at 8:01 PM, Glen Mazza <[EMAIL PROTECTED]> wrote:

> Some possibilities:
>
> 1.) From Step #5 of [1], make sure you have xmime:expectedContentTypes
> declared in your WSDL (you can see me using it under <element
> name="getWeatherForecastResponse" at the top).
>
> 2.) From Step #6 of [1], make sure you use @BindingType annotation just
> before your web service implementation.
>
> 3.)  Also, your address in your cxf.xml ("/FileTransferWebService") may
> need to be a full URL as shown in our sample here[2].
>
> HTH,
> Glen
>
>
> [1] http://www.jroller.com/gmazza/date/20071102
> [2]
> http://cwiki.apache.org/confluence/display/CXF20DOC/MTOM#MTOM-ConfigFile
>
>
> Am Freitag, den 22.02.2008, 21:19 +0100 schrieb Eliú:
> > Hi, i'm new with CXF and i'm trying to use MTOM attachments in my web
> > services.
> > I followed the Apache CXF 2.0 User's Guide and right now i can get a
> binary
> > file from the server to my client using MTOM attachments.
> > My problem is that i cannot send a file from the client to the server
> using
> > MTOM. When I pass my JAXB class or the DataHandler
> > as a parameter to the Web Service, it always goes base64Binary encoded
> in
> > the request SOAP message.
> > In the server side, i have this endpoint declaration:
> >
> > *<jaxws:endpoint id="FileTransferWebService"
> >     implementor="
> > com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> >     address="/FileTransferWebService">
> >     <jaxws:properties>
> >       <entry key="mtom-enabled" value="true"/>
> >     </jaxws:properties>
> > </jaxws:endpoint>*
> >
> > and this is my JAXB bean:
> >
> > [EMAIL PROTECTED]
> > public class BinaryFile {
> >
> >     /**
> >      * Contenido binario del archivo.
> >      */
> >     @XmlMimeType("application/octet-stream")
> >     private DataHandler imageData;
> >
> >     /**
> >      * @return el valor de imageData como InputStream
> >      * @throws IOException en caso de error al obtener el
> >      * InputStream a partir del DataHandler
> >      */
> >     public InputStream getInputStream() throws IOException {
> >         return imageData.getInputStream();
> >     }
> >
> >     /**
> >      * @param imageData el valor de imageData a establecer
> >      */
> >     public void setImageData(DataHandler imageData) {
> >         this.imageData = imageData;
> >     }
> > }*
> >
> > When i call this service:
> >
> > *BinaryFile getOperationCodesFile(String filePath);*
> >
> > the file comes in the response SOAP as MTOM attachment, but when i call
> this
> > other:
> >
> > *void updateOpCodesFileOnServer(BinaryFile file, Date updateDate);*
> >
> > the file goes in the request message inside the Envelope of the SOAP
> message
> > encoded as a base64Binary.
> > I need to know if i can send the file to the server as a MTOM attachment
> > with CXF and annotations for JAXB beans.
> > Thanks in advance.
> >
> > P.D.: I'm not a member of this mailing list, so i'll thank you if you
> copy
> > your replay to this address. Thanks.
>
>

Reply via email to