<?xml version="1.0" encoding="utf-8"?><DataSet xmlns="http://tempuri.org/"> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="zh-CN"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="example"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:int" minOccurs="0" /> <xs:element name="name" type="xs:string" minOccurs="0" /> <xs:element name="content" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> <NewDataSet xmlns=""> <example diffgr:id="example1" msdata:rowOrder="0"> <id>1</id> <name>lau</name> <content>hello</content> </example> <example diffgr:id="example2" msdata:rowOrder="1"> <id>2</id> <name>xiao</name> <content>it''''s good</content> </example> <example diffgr:id="example3" msdata:rowOrder="2"> <id>3</id> <name>bb</name> <content>wa~</content> </example> </NewDataSet> </diffgr:diffgram></DataSet>
返回的这个DataSet是[object Object]类型,根据wsdl得到的results的数据类型是.net DataSet,不过在flash固有的数据类型里并不包括这项。
经过大量的测试终于找到了两种解决办法:
办法一:
SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]); SqlDataAdapter da=new SqlDataAdapter("select * from BBS_灌水乐园_疯逛灌水_发贴",conn); DataSet ds=new DataSet(); conn.Open(); da.Fill(ds); XmlDataDocument xmlDoc=new XmlDataDocument(ds);
Return xmlDoc.InnerXml //这样返回的就是xml格式的dataset
在Flash中接受的办法:
my_xml=new XML();
my_xml.parse("这里是你通过webservice得到的那个结果(也就是我的代码里最后返回的xmlDoc.innerxml)");之后就把结果传到了flash里,my_xml就是xml格式的dataset,然后你在帮定到datagrid里.OK!试试吧.
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18