Re: MTOM attachments question

2008-02-25 Thread Daniel Kulp
On Saturday 23 February 2008, Benson Margulies wrote:
> 2.0.4 doesn't know anything about xmime:expectedContentType, AFAIK. Do
> you have the @MTOM annotation in place to enable the threshold?

Yea, you're backwords

2.0.4 should deal with the expectedContentType stuff fine.   It DOESN'T, 
however, have an @MTOM annotation.   That was added in 2.1.

In general, and base64Binary thing in the wsdl should be attachable if 
MTOM is turned on.   However, our default threshold is 4K.   Under 4k 
and it will be inlined.

Dan


> 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  > 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-Config
> >File
> >
> > 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:
> > >
> > > * > > implementor="
> > > com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> > > address="/FileTransferWebService">
> > > 
> > >   
> > > 
> > > *
> > >
> > > 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.



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: MTOM attachments question

2008-02-24 Thread Benson Margulies
I'm sorry, my head was on sideways. I was confusing the WSDL extension with
the xmime stuff (xmime:base64Binary) that goes on the wire.

On Sat, Feb 23, 2008 at 2:48 PM, Glen Mazza <[EMAIL PROTECTED]> wrote:

> Really?  Our MTOM docs mention the expectedContentType attribution in
> multiple places: http://cwiki.apache.org/CXF20DOC/mtom.html.  I wonder
> if CXF could pass the TCK if it actually ignored it.
>
> Glen
>
> Am Samstag, den 23.02.2008, 12:33 -0500 schrieb Benson Margulies:
> > 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  > > 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:
> > > >
> > > > * > > > implementor="
> > > > com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> > > > address="/FileTransferWebService">
> > > > 
> > > >   
> > > > 
> > > > *
> > > >
> > > > 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.
> > >
> > >
>
>


Re: MTOM attachments question

2008-02-23 Thread Glen Mazza
Really?  Our MTOM docs mention the expectedContentType attribution in
multiple places: http://cwiki.apache.org/CXF20DOC/mtom.html.  I wonder
if CXF could pass the TCK if it actually ignored it.

Glen

Am Samstag, den 23.02.2008, 12:33 -0500 schrieb Benson Margulies:
> 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  > 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:
> > >
> > > * > > implementor="
> > > com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> > > address="/FileTransferWebService">
> > > 
> > >   
> > > 
> > > *
> > >
> > > 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.
> >
> >



Re: MTOM attachments question

2008-02-23 Thread Benson Margulies
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  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:
> >
> > * > implementor="
> > com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> > address="/FileTransferWebService">
> > 
> >   
> > 
> > *
> >
> > 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.
>
>


Re: MTOM attachments question

2008-02-22 Thread Glen Mazza
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 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:
> 
> * implementor="
> com.iafis.sici.server.webServiceImpl.FileTransferWebServiceImpl"
> address="/FileTransferWebService">
> 
>   
> 
> *
> 
> 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.