具有XML的Web应用程序 [英] web application with XML

查看:142
本文介绍了具有XML的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个包含XML文件的Web应用程序(应用程序A).
此Web应用程序将从一个HTTP请求(另一个应用程序-应用程序B)中调用.将XML文件发送到应用程序B,并将返回的数据返回给应用程序A.

我的首要任务是如何创建XML-但是我不确定如何使用XML.

使用ASP.net?

I want to write a web application (application A) containing XML file .
This web application will be invoked from an HTTP request (from another application - application B) .

Application A should then send the XML file to Application B and return back to Application A with returned data .

My first task is how do I create the XML - But I''m not sure how I go about doing it ???

using ASP.net???

推荐答案

我不清楚.您在询问有关创建XML的问题,但您没有告诉您XML文件实际上将包含哪种数据.我的意思是,这个文件将是用于消息传递的对象的某种序列化形式,或者它可能包含您要上传的任何数据.如果您确实拥有XML文件并想要将其发布到Web应用程序,则将需要使用HttpWebRequest和HttpWebResponse.首先在您的Web应用程序中创建一些通用处理程序,然后通过HttpWebRequest创建和发布XML文件内容.在处理程序中处理内容,并返回一些合适的所需响应.例如,代码尝试使用谷歌搜索或将代码项目搜索用于通过HttpWebRequest发布数据"关键字.

I am not clear. You are asking about creating XML but you didn''t told what sort of data actually XML file will contain. I mean this is this file will be some serialized form of an object used for message passing or it could contain any data that you want to upload. Any how if you do have the XML file and want to post it webapplication you will need to make use of HttpWebRequest and HttpWebResponse. First create some generic handler in you web app and then create and post XML file contents via HttpWebRequest. Process contents in handler and return some suitable desired response. For example codes try googling or use code project search for "Posting Data via HttpWebRequest" keyword.


这篇关于具有XML的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆