服务商向我post 一段 xml 数据,要求我们的aspx页面有接收处理能力,post 内容如下:
<?xml version="1.0" encoding="gb2312" ?>
<cuelist xmlns="urn:CueListSchema.xml" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:s="urn:schemas-rcsworks-com:SongSchema" xmlns:n="urn:schemas-rcsworks-com:NoteSchema" xmlns:l="urn:schemas-rcsworks-com:LinkSchema" xmlns:t="urn:schemas-rcsworks-com:TrafficSchema" xmlns:p="urn:schemas-rcsworks-com:ProductSchema" xmlns:m="urn:schemas-rcsworks-com:MediaSchema" xmlns:w="urn:schemas-rcsworks-com:WebPageSchema" sequencermode="automation" sequenceroverunder="29.62" sequencernextetm="15:00:00" sequencermachine="NJ-AIRM" time="2014-07-29T14:30:27">
<Event eventID="6" eventType="song" elementSpecificData="0" status="happening" timing="none" startOffset="0.00" scheduledTime="14:30:27" scheduledDuration="229.00" segue="xfade" failureCode="0" editCode="0" outputChannel="B">
<s:Song title="破吉他" ID="HQ04954" internalID="007700008011C9F80000" category="P" level="1" packet="0" percentBack="100" dateAdded="2013-07-04" opening="" ending="" alternatePacket="0" alternatePercentBack="100" isCompleteWork="0" lastPlayDate="2014-07-29" lastPlayTime="14:30:26" lastEditedDate="2014-07-28" enteredCategory="2013-12-30" playsInCategory="130" totalPlays="760" maintenanceFlag="0" comment="">
<s:SongAdditional additionalArtists="" composers="" publisher="" lyricist="" isrc="" arranger="" license="" label="" recordNumber="" promoter="" country="" content="NO" address="" radioText="" barcode=""/>
<s:Artist name="张震岳" country="" sequenceNumber="1" internalID="00670001800006520000" sortName="张震岳"/>
012-1A59-4EC8-9D6A-237C54A20329}" runTime="229.41" intro1="" intro2="" intro3="20.86" fileName="{07681012-1A59-4EC8-9D6A-237C54A20329}.wav" hookStart="73.35" hookEnd="116.56" trimStart="0.00" trimEnd="230.98" totalTime="230.98" linkOverLapNTP=""/></s:Song>
</Event></cuelist>
对方只告诉我已经将数据post 到我提供的一个url上了( http://www.abc.com/Receive.aspx),我的接收文件Receive.aspx 该如何写才能获得这一段xml数据
Request.Form[null],这样就能获取到了~
长知识了~
@刘宏玺: :)
取不到的
@Sunaz: 你可以在请求处理里面断点,然后看看这个值对应的key。
StreamReader stream = new System.IO.StreamReader(Request.InputStream);
string xml = stream.ReadToEnd();
很好,这个才是正确的想法~~~非常感谢!!!