开发者

How to publish web service produced data file accessible via browser

I need to make available to browsers data file produced by my web service met开发者_JAVA百科hod. Indeed the web service method should return url to produced file. I'm working with axis2 on tomcat.


The MTOM standard enables you to attach files to your SOAP message response


You want to leverage the standard http header "Content-Disposition".

For example, to stream bits to the browser and force a 'save-as' dialog, add the following headers to the response.

Content-Disposition: attachment; filename=checkimage.jpg
Content-Length: 76127
Content-Type: image/JPEG

More information: http://www.hanselman.com/blog/TheContentDispositionSagaControllingTheSuggestedFileNameInTheBrowsersSaveAsDialog.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜