You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "HARI,SANJAYAGANESH (HP-India,ex2)" <sa...@hp.com> on 2002/01/03 12:59:14 UTC

SOAP 1.2 (attachments)

Hi All:
 
I have a question regarding the Apache SOAP 1.2. Assuming I do a RPC soap
call and the call is returning a Base64 encoded binary file, does apache
soap consider this as a server side response "with attachments" as per spec
and handle it automatically. If not, does anyone have a sample code with
Apache SOAP where a server side call returns a binary file as an attachment?
the mime samples in the distribution are not very clear to me.
 
Regards
Sanjay

Re: SOAP 1.2 (attachments)

Posted by Heitzso <he...@bellsouth.net>.
This is a case where it really is as simple as it seems,
on the server side, the called method is ...

public DataHandler getBinaryFile(String filename) {
    return new DataHandler(
        new FileDataSource(filename));
}

and on the proxy side it gets picked up as
a DataHandler.  The DataHandler stream is passed
as an attachment.

I'ld suggest (and I may be wrong, but worth a try) not
bothering with the Base64 encoding and trying something modeled
on the above.

On Thu, 2002-01-03 at 06:59, HARI,SANJAYAGANESH (HP-India,ex2) wrote:
> Hi All:
>  
> I have a question regarding the Apache SOAP 1.2. Assuming I do a RPC soap
> call and the call is returning a Base64 encoded binary file, does apache
> soap consider this as a server side response "with attachments" as per spec
> and handle it automatically. If not, does anyone have a sample code with
> Apache SOAP where a server side call returns a binary file as an attachment?
> the mime samples in the distribution are not very clear to me.
>  
> Regards
> Sanjay




Re: SOAP 1.2 (attachments)

Posted by Heitzso <he...@bellsouth.net>.
This is a case where it really is as simple as it seems,
on the server side, the called method is ...

public DataHandler getBinaryFile(String filename) {
    return new DataHandler(
        new FileDataSource(filename));
}

and on the proxy side it gets picked up as
a DataHandler.  The DataHandler stream is passed
as an attachment.

I'ld suggest (and I may be wrong, but worth a try) not
bothering with the Base64 encoding and trying something modeled
on the above.

On Thu, 2002-01-03 at 06:59, HARI,SANJAYAGANESH (HP-India,ex2) wrote:
> Hi All:
>  
> I have a question regarding the Apache SOAP 1.2. Assuming I do a RPC soap
> call and the call is returning a Base64 encoded binary file, does apache
> soap consider this as a server side response "with attachments" as per spec
> and handle it automatically. If not, does anyone have a sample code with
> Apache SOAP where a server side call returns a binary file as an attachment?
> the mime samples in the distribution are not very clear to me.
>  
> Regards
> Sanjay