Hello,

I've searched the archive and found a lot of information about 
getting a .NET dataset into Flex. I've put together a test app, but 
am not getting past the following error. From reading posts, I get 
the impression that this approach works in Flex 1.5 but not Flex 
2.0. 

In the test app, my other web service methods (HelloWorld and 
SendTest) work just fine. If I change the GetAuthors method so that 
it returns a string full of the dataset XML, I can see that the XML 
looks good in Flex.

Could someone point me to a working example or tutorial explaining 
how to display a .NET dataset in a Flex datagrid?

Thanks much,

-Tony

=== Error Message ===

Element http://my.test.edu/:GetAuthorsResponse not resolvable
        at 
mx.rpc.soap::WSDLParser/http://www.macromedia.com/2005/flex/mx/intern
al::parseMessage()
        at mx.rpc.soap::WSDLOperation/parseMessages()
        at 
mx.rpc.soap::Operation/http://www.macromedia.com/2005/flex/mx/interna
l::invokePendingCall()
        at mx.rpc.soap::Operation/send()
        at mx.rpc.soap.mxml::Operation/send()
        at ASPTest1/___Button3_click()

========

=== Flex 2.0 ===

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; 
xmlns="*" layout="absolute" 
creationComplete="helloThere.HelloWorld.send()">
        <mx:WebService id="helloThere" 
wsdl="http://localhost/FlexTest1/WebService1.asmx?wsdl"; 
useProxy="false" >
                <mx:operation name="HelloWorld"/>
                <mx:operation name="SendText">
                        <mx:request xmlns="">
                                <strText>
                                        {ToASP.text}
                                </strText>
                        </mx:request>   
                </mx:operation>
                <mx:operation name="GetAuthors">
                </mx:operation>
        </mx:WebService>
        <mx:Button x="20" y="30" click="helloThere.HelloWorld.send
()" label="Click Me"/>
        <mx:Label x="20" y="60" 
text="{helloThere.HelloWorld.result}"/> 
        <mx:TextInput id="ToASP" x="20" y="90" />
        <mx:Button x="20" y="120" click="helloThere.SendText.send()" 
label="Send Text to ASP"/>
        <mx:Label x="20" y="150" text="Back from ASP: 
{helloThere.SendText.result}"/>
        <mx:Button x="20" y="180" click="helloThere.GetAuthors.send
()" label="Fill the Grid"/>
        <mx:DataGrid x="20" y="210" id="dgAuthors" width="400" 
dataProvider="{helloThere.GetAuthors.result.diffgram.NewDataSet.Autho
rs}">
                <mx:columns>
                        <mx:DataGridColumn headerText="First Name" 
columnName="FName" />
                        <mx:DataGridColumn headerText="Last Name" 
columnName="LName" />
                        <mx:DataGridColumn headerText="Notes" 
columnName="Notes" />
                </mx:columns>
        </mx:DataGrid>
</mx:Application>

==============

=== ASP.NET 2.0 ===

[WebMethod]
public DataSet GetAuthors()
    {
        SqlConnection myConnection = new SqlConnection
("server=localhost; uid=FlexGuy; pwd=mypassword; database=myTest");
        SqlDataAdapter myCommand1 = new SqlDataAdapter("select 
FName, LName, Notes from Authors", myConnection);
        DataSet ds = new DataSet();
        myCommand1.Fill(ds, "Authors");
        return ds;
    }

==============






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to