Connecting Tech Pros Worldwide Forums | Help | Site Map

how to return .xml file from web service?

Newbie
 
Join Date: Sep 2006
Posts: 1
#1: Sep 6 '06
Can anyone tell me, how to return .xml file from web service?

if I specify the return type of the method as File then it gives me error that

JAXRPC does not support this

Thanks
Bharat

Newbie
 
Join Date: Sep 2006
Location: Worlds most beautiful place
Posts: 5
#2: Sep 11 '06

re: how to return .xml file from web service?


you will have to return it as a Object or a XmlObject. When you retrieve it at the client, you will have to typecast it back to a file. You cant return a File object directly from a Web Service. Use the SAAJ (SOAP API with Attachments for JAVA) API for your web service client to read data from the Web Service.
Reply