You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by thomas2004 <th...@yahoo.de> on 2008/08/26 21:11:47 UTC

Can I transfer/response an JPG or PDF file from server to client via AXIS 1.x?

What I am going to do is:

I get some datas from client and will return/transfer/response an JPG or PDF
file to the client. Is it possible?

So far I understand, the Web Service can only transfer XML-file. Is that
right? Any example or infos?

Regards

Thomas
-- 
View this message in context: http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19168366.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Can I transfer/response an JPG or PDF file from server to client via AXIS 1.x?

Posted by José Ferreiro <jo...@gmail.com>.
Hi Thomas,

Yes you may send a PDF file as it is a binary file as well.
For that you need to adapt the MIME in the SOAP message ( Multipurpose
Internet Mail Extensions) type.

e.g.

   <mime:multipartRelated>
      <mime:part>
         <soap:body parts="body" use="literal"/>
      </mime:part>
      <mime:part>
         <mime:content part="pdf" type="application/pdf"/>
      </mime:part>
   </mime:multipartRelated>

For more info about the MIME types pleaser refer [1] [2].

Hope this helps.

Jose

[1] - Format of Internet Message Bodies (
ftp://ftp.isi.edu/in-notes/rfc2045.txt)
[2] - Media Types (ftp://ftp.isi.edu/in-notes/rfc2046.txt).

On Wed, Aug 27, 2008 at 1:27 PM, thomas2004 <th...@yahoo.de> wrote:

>
> Hi Jose,
>
> Thanks for the reply.
>
> Do you think I can transfer the PDF file in the same way?
>
> Regards
>
> Thomas
>
>
>
>
> José Ferreiro wrote:
> >
> > Hello Thomas,
> >
> > It is possible to transfer other data from the server to the client than
> > XML.
> > This can be done by sending binary data within the SOAP message.
> >
> > See an example for Axis 1.x here:
> > http://www.agileskills2.org/DWSAA/v10pub/source.zip
> >
> > Unzip the folder and refer to the folder *image service* : which shows
> the
> > example of uploading a JPG image from the client to the web service in
> the
> > server. For your example you only need to switch the request and the
> > response in the wsdl file.
> >
> > Hope this helps.
> >
> > Jose Ferreiro
> >
> > On Tue, Aug 26, 2008 at 9:11 PM, thomas2004 <th...@yahoo.de>
> wrote:
> >
> >>
> >> What I am going to do is:
> >>
> >> I get some datas from client and will return/transfer/response an JPG or
> >> PDF
> >> file to the client. Is it possible?
> >>
> >> So far I understand, the Web Service can only transfer XML-file. Is that
> >> right? Any example or infos?
> >>
> >> Regards
> >>
> >> Thomas
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19168366.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
> >
> > --
> > José Ferreiro
> > EPFL Communication Systems engineer
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19179073.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
José Ferreiro
EPFL Communication Systems engineer
ing.sys.com.dipl.EPFL

Re: Can I transfer/response an JPG or PDF file from server to client via AXIS 1.x?

Posted by thomas2004 <th...@yahoo.de>.
Hi Jose,

Thanks for the reply.

Do you think I can transfer the PDF file in the same way?

Regards

Thomas




José Ferreiro wrote:
> 
> Hello Thomas,
> 
> It is possible to transfer other data from the server to the client than
> XML.
> This can be done by sending binary data within the SOAP message.
> 
> See an example for Axis 1.x here:
> http://www.agileskills2.org/DWSAA/v10pub/source.zip
> 
> Unzip the folder and refer to the folder *image service* : which shows the
> example of uploading a JPG image from the client to the web service in the
> server. For your example you only need to switch the request and the
> response in the wsdl file.
> 
> Hope this helps.
> 
> Jose Ferreiro
> 
> On Tue, Aug 26, 2008 at 9:11 PM, thomas2004 <th...@yahoo.de> wrote:
> 
>>
>> What I am going to do is:
>>
>> I get some datas from client and will return/transfer/response an JPG or
>> PDF
>> file to the client. Is it possible?
>>
>> So far I understand, the Web Service can only transfer XML-file. Is that
>> right? Any example or infos?
>>
>> Regards
>>
>> Thomas
>> --
>> View this message in context:
>> http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19168366.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 
> 
> -- 
> José Ferreiro
> EPFL Communication Systems engineer
> 
> 

-- 
View this message in context: http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19179073.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Can I transfer/response an JPG or PDF file from server to client via AXIS 1.x?

Posted by José Ferreiro <jo...@gmail.com>.
Hello Thomas,

It is possible to transfer other data from the server to the client than
XML.
This can be done by sending binary data within the SOAP message.

See an example for Axis 1.x here:
http://www.agileskills2.org/DWSAA/v10pub/source.zip

Unzip the folder and refer to the folder *image service* : which shows the
example of uploading a JPG image from the client to the web service in the
server. For your example you only need to switch the request and the
response in the wsdl file.

Hope this helps.

Jose Ferreiro

On Tue, Aug 26, 2008 at 9:11 PM, thomas2004 <th...@yahoo.de> wrote:

>
> What I am going to do is:
>
> I get some datas from client and will return/transfer/response an JPG or
> PDF
> file to the client. Is it possible?
>
> So far I understand, the Web Service can only transfer XML-file. Is that
> right? Any example or infos?
>
> Regards
>
> Thomas
> --
> View this message in context:
> http://www.nabble.com/Can-I-transfer-response-an-JPG-or-PDF-file-from-server-to-client-via-AXIS-1.x--tp19168366p19168366.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
José Ferreiro
EPFL Communication Systems engineer