开发者

Referencing external xml file through DTD Entity

Is there a way of returning an xml file from a REST webservice. I want to be able to call the server, dynamically create the file and return as if I'd simply returned the xml file as stored on disk.

I've managed to get fairly close by returning an XMLElement:

 public XmlE开发者_如何学Pythonlement Airports()
    {
       //Dynamically build up and return 
}

But when I referenced the location from a DTD it doesn't seem to behave in the same way e.g.

This works: ENTITY XmlFile SYSTEM "http://localhost:59736/MyXmlFile.xml"

But this doesn't

 ENTITY XmlFile SYSTEM "http://localhost:59736/MyService.svc/MyMethod"

There must be some subtle difference in the headers or something...


I assume your are not returning a file name or anything like that but the file contents as an XML response. In that case it really is no different if you return the contents of an existing file or generate the contents on the fly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜