RE: [Flashcoders] .NET and XML Web services - WORKS - thanks
Glad to hear you got it working! -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, June 01, 2006 5:32 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services - WORKS - thanks This is an old thread now from 5/19, but thanks for everyone's help here on the list with this. I was able to get back to this aspect of the project today (connecting Flash with a .NET webservice) and it's working beautifully - I can get the data I need from a wsdl the .NET developer made for me. Pretty cool. Thanks for everyone's help (if you remember who you are: Radley, Tom L., Muzak, Dave W., Jim R., j.c. - I think that is everyone) What happened: I found out that since I am a new employee here, some of my web-browsing capabilities had been temporarily blocked until I applied for allowance - I didn't realize this at the time, since I was able to browse using other employee's access on the same machine, but once that was done, I was no longer fighting with the proxy server and the examples people sent worked fine. Then I just swapped out the URL to the new wsdl, as well as the method name and results, and it worked with the wsdl we rolled here. Thanks again, I can now add something else to the old resume and brag to the new boss. Jason Merrill Bank of America Learning Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services - WORKS - thanks
This is an old thread now from 5/19, but thanks for everyone's help here on the list with this. I was able to get back to this aspect of the project today (connecting Flash with a .NET webservice) and it's working beautifully - I can get the data I need from a wsdl the .NET developer made for me. Pretty cool. Thanks for everyone's help (if you remember who you are: Radley, Tom L., Muzak, Dave W., Jim R., j.c. - I think that is everyone) What happened: I found out that since I am a new employee here, some of my web-browsing capabilities had been temporarily blocked until I applied for allowance - I didn't realize this at the time, since I was able to browse using other employee's access on the same machine, but once that was done, I was no longer fighting with the proxy server and the examples people sent worked fine. Then I just swapped out the URL to the new wsdl, as well as the method name and results, and it worked with the wsdl we rolled here. Thanks again, I can now add something else to the old resume and brag to the new boss. Jason Merrill Bank of America Learning Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Yes - but I am also working through a proxy, and using someone else's proxy logon since I haven't been granted internet access yet, so it could be a host of problems on my end. Funny thing though, I can see the XML with my browser. Jason Merrill Bank of America Learning Organization Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Friday, May 19, 2006 3:08 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi, i tried the example before mailing it to you, it worked here. Not sure why it isn't working at your place, can you access the webservice url from your browser? greetz H -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 6:03 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Anyone have an answer for this? Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 11:23 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Ok - I borrowed my coworker's proxy login again and tried that example, but I get the following message: Error opening URL http://www.flash-db.com/services/ws/companyInfo.wsdl; undefined,Could not load WSDL I have the WebserviceClass in my library too. The service: http://www.flash-db.com/services/ws/companyInfo.wsdl does seem to be there (I can browse to it with Firefox), so I'm not sure why that doesn't work. Does the code example work for you? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Radley, Muzak, Great suggestions and great information! I'll try some of this out today. Thanks! Jason Merrill Bank of America Learning Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
There are some .NET web services on http://www.xmethods.net/ What version of Flash are you using? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 10:35 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Thanks! I'll check that out from home tonight, but for now, any code or information you can post on the list would be helpful since they haven't set me up with internet access yet - I had to temporarily borrow a co-worker's internet proxy logon just to subscribe to Flashcoders and then disconnect. Hopefully, I'll get that resolved soon, but for now, I can't get to that site. What's the best/most common method to connect to an XML .NET web service with Flash? I'm using Flash 8, publishing to Flash 7 for this project. Thanks, Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 10:39 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services There are some .NET web services on http://www.xmethods.net/ What version of Flash are you using? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
If you want to use remoting, you'll need to have it on the server. Since the server code is in .NET, you may not have remoting available. But if you do have remoting available, there are some tutorials out there to get you started, such as: http://www.oreillynet.com/pub/a/javascript/2003/01/09/flash.html http://www.adobe.com/devnet/java/articles/jrun_fr_ws.html If you don't have remoting available, you could use the WebServiceConnector component. Just search the Flash documentation for the WebServiceConnector. I don't have any sample code available to post. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 10:44 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks! I'll check that out from home tonight, but for now, any code or information you can post on the list would be helpful since they haven't set me up with internet access yet - I had to temporarily borrow a co-worker's internet proxy logon just to subscribe to Flashcoders and then disconnect. Hopefully, I'll get that resolved soon, but for now, I can't get to that site. What's the best/most common method to connect to an XML .NET web service with Flash? I'm using Flash 8, publishing to Flash 7 for this project. Thanks, Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 10:39 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services There are some .NET web services on http://www.xmethods.net/ What version of Flash are you using? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Thanks a ton Hans and Jim - very useful information. I'll check this out. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 10:53 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services If you want to use remoting, you'll need to have it on the server. Since the server code is in .NET, you may not have remoting available. But if you do have remoting available, there are some tutorials out there to get you started, such as: http://www.oreillynet.com/pub/a/javascript/2003/01/09/flash.html http://www.adobe.com/devnet/java/articles/jrun_fr_ws.html If you don't have remoting available, you could use the WebServiceConnector component. Just search the Flash documentation for the WebServiceConnector. I don't have any sample code available to post. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 10:44 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks! I'll check that out from home tonight, but for now, any code or information you can post on the list would be helpful since they haven't set me up with internet access yet - I had to temporarily borrow a co-worker's internet proxy logon just to subscribe to Flashcoders and then disconnect. Hopefully, I'll get that resolved soon, but for now, I can't get to that site. What's the best/most common method to connect to an XML .NET web service with Flash? I'm using Flash 8, publishing to Flash 7 for this project. Thanks, Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 10:39 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services There are some .NET web services on http://www.xmethods.net/ What version of Flash are you using? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Ok - I borrowed my coworker's proxy login again and tried that example, but I get the following message: Error opening URL http://www.flash-db.com/services/ws/companyInfo.wsdl; undefined,Could not load WSDL I have the WebserviceClass in my library too. The service: http://www.flash-db.com/services/ws/companyInfo.wsdl does seem to be there (I can browse to it with Firefox), so I'm not sure why that doesn't work. Does the code example work for you? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?p age= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Jim, If you use the LoadVars.onData handler rather than the onLoad handler, you get the raw response before it is parsed and you can invoke your own parser. I should note that the reason I ended up doing this is because I'm dealing with huge chunks of data (greater than 1MB) and the WebService class was simply not fast enough. The WebService class uses a SoapCall object to load the data, which in turn uses an XML object. The XML object had a memory leak in Player 7 (would consume 40MB of RAM for a 1MB web service response), and would also hang the player for about 10 seconds while it parsed all that data. So, under normal circumstances, the WebService class would be just fine. I don't mean to recommend that anyone use the LoadVars object for web services unless they are targeting Player 7 and have no other alternative. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:32 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http
RE: [Flashcoders] .NET and XML Web services
Thanks Tom. I wish I knew that about the onData handler 2 years ago - it would have saved me some work. In any case, it's always good to learn new things. Thanks again. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:53 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Jim, If you use the LoadVars.onData handler rather than the onLoad handler, you get the raw response before it is parsed and you can invoke your own parser. I should note that the reason I ended up doing this is because I'm dealing with huge chunks of data (greater than 1MB) and the WebService class was simply not fast enough. The WebService class uses a SoapCall object to load the data, which in turn uses an XML object. The XML object had a memory leak in Player 7 (would consume 40MB of RAM for a 1MB web service response), and would also hang the player for about 10 seconds while it parsed all that data. So, under normal circumstances, the WebService class would be just fine. I don't mean to recommend that anyone use the LoadVars object for web services unless they are targeting Player 7 and have no other alternative. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:32 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your
RE: [Flashcoders] .NET and XML Web services
So I might need to use LoadVars instead of the Webservices Classes since I am targeting Flash player 7 correct? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:53 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Jim, If you use the LoadVars.onData handler rather than the onLoad handler, you get the raw response before it is parsed and you can invoke your own parser. I should note that the reason I ended up doing this is because I'm dealing with huge chunks of data (greater than 1MB) and the WebService class was simply not fast enough. The WebService class uses a SoapCall object to load the data, which in turn uses an XML object. The XML object had a memory leak in Player 7 (would consume 40MB of RAM for a 1MB web service response), and would also hang the player for about 10 seconds while it parsed all that data. So, under normal circumstances, the WebService class would be just fine. I don't mean to recommend that anyone use the LoadVars object for web services unless they are targeting Player 7 and have no other alternative. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:32 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?p age= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Anyone have an answer for this? Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 11:23 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Ok - I borrowed my coworker's proxy login again and tried that example, but I get the following message: Error opening URL http://www.flash-db.com/services/ws/companyInfo.wsdl; undefined,Could not load WSDL I have the WebserviceClass in my library too. The service: http://www.flash-db.com/services/ws/companyInfo.wsdl does seem to be there (I can browse to it with Firefox), so I'm not sure why that doesn't work. Does the code example work for you? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Glad to help! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:57 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Thanks Tom. I wish I knew that about the onData handler 2 years ago - it would have saved me some work. In any case, it's always good to learn new things. Thanks again. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:53 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Jim, If you use the LoadVars.onData handler rather than the onLoad handler, you get the raw response before it is parsed and you can invoke your own parser. I should note that the reason I ended up doing this is because I'm dealing with huge chunks of data (greater than 1MB) and the WebService class was simply not fast enough. The WebService class uses a SoapCall object to load the data, which in turn uses an XML object. The XML object had a memory leak in Player 7 (would consume 40MB of RAM for a 1MB web service response), and would also hang the player for about 10 seconds while it parsed all that data. So, under normal circumstances, the WebService class would be just fine. I don't mean to recommend that anyone use the LoadVars object for web services unless they are targeting Player 7 and have no other alternative. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:32 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?page= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] .NET and XML Web services
In the vast majority of cases, you should use the WebService class. If you find that performance becomes an issue (the data is taking too long to parse, or the Player is consuming large amounts of RAM after the data is loaded), using LoadVars can be a good workaround. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 12:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services So I might need to use LoadVars instead of the Webservices Classes since I am targeting Flash player 7 correct? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:53 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Jim, If you use the LoadVars.onData handler rather than the onLoad handler, you get the raw response before it is parsed and you can invoke your own parser. I should note that the reason I ended up doing this is because I'm dealing with huge chunks of data (greater than 1MB) and the WebService class was simply not fast enough. The WebService class uses a SoapCall object to load the data, which in turn uses an XML object. The XML object had a memory leak in Player 7 (would consume 40MB of RAM for a 1MB web service response), and would also hang the player for about 10 seconds while it parsed all that data. So, under normal circumstances, the WebService class would be just fine. I don't mean to recommend that anyone use the LoadVars object for web services unless they are targeting Player 7 and have no other alternative. -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Robson Sent: Thursday, May 18, 2006 11:32 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Tom: How do you use a LoadVars object for an XML web service? I thought that the LoadVars object only handled URL-encoded data. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 11:26 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services My preferred method to date is to use LoadVars and access the .Net web services over a standard HTTP request. The reason for this is that I can easily write my own WebServices class that extends LoadVars, and it ends up being lighter and faster than the one Adobe provides. I haven't tried the Remoting method, although I would like to at some point since the built-in compression would be highly desirable: XML web service responses can end up being bloated due to the size of all the tags. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of j.c.wichman Sent: Thursday, May 18, 2006 10:46 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hi Jason, u probably can, but you dont *have* to use remoting. You can create a reference to the webservice by simply using: new WebService(http://location to your webservice here.asmx?wsdl, this.logger); Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/mxwebservices.php?p age= 2 I do think you need to include the WebserviceClasses in your swf, by dropping them in your library (from window, common libraries). Drop a button on your stage, name it result_btn, and copy and paste the code from the example. greetz Hans -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 4:35 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] .NET and XML Web services I've been using XML in Flash for a while, just by loading in a physical XML file from a server. In my new job I have an ASP.NET coworker who said they wouldn't be able to create a flat .xml file on the server for me because of security restrictions, so he said he will be providing a Web service - sending XML data directly to my Flash file. I assume Flash Remoting is the way to go: call an ASP page with Remoting and get XML returned from it? Or how does that work? I have done some Remoting before. What is the best approach? Is there any sample code anyone can send? And is there any .NET XML web service someone has out there publicly that I can try and connect to to test this out? Thanks! Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Hard to say... The WSDL loads in my browser too, so it looks like it should work. Just as a test, you could try an LoadVars.load on that URL and trace out the results in the onData handler. If that is successful, then we need to figure out why the WebService class isn't working for you. If LoadVars.load fails, that would suggest a security sandbox issue or network connectivity issue (just off the top of my head). -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 12:03 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Anyone have an answer for this? Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 11:23 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Ok - I borrowed my coworker's proxy login again and tried that example, but I get the following message: Error opening URL http://www.flash-db.com/services/ws/companyInfo.wsdl; undefined,Could not load WSDL I have the WebserviceClass in my library too. The service: http://www.flash-db.com/services/ws/companyInfo.wsdl does seem to be there (I can browse to it with Firefox), so I'm not sure why that doesn't work. Does the code example work for you? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Thanks Tom. Another question: When using Webservices, does the WSDL structure (SOAP?) always require that I call SOAP(?) services defined in the WSDL xml doc or can I get a regular XML document - I'd like to drill down through an XML tree with XPATH, but if this requires me to make calls like: stockResultObj = stockservice.doCompanyInfo(any,any,macr); Myresult = result.company And it also seems like XML files with namespaces don't play nicely with Flash, or at least with xfactorstudios Xpath classes. If I have to call a function in the WDSL to get what I want, then I have a lot more to learn than I had planned on since I need to know more about the data like how many node items there are, and titles. This seems like someone else has to define those getter functions for me (I'm not a .NET developer) - I was hoping the .NET developer could push me an XML file (not a physical file, but variable representation of one) I could traverse an XML tree using Xpath like I had in the past. Is that called an XML socket? I'm still learning how all of this works obviously and am probably not using the right terminology, but does that make any sense? Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 12:26 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hard to say... The WSDL loads in my browser too, so it looks like it should work. Just as a test, you could try an LoadVars.load on that URL and trace out the results in the onData handler. If that is successful, then we need to figure out why the WebService class isn't working for you. If LoadVars.load fails, that would suggest a security sandbox issue or network connectivity issue (just off the top of my head). -tom ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Another question: When using Webservices, does the WSDL structure (SOAP?) always require that I call SOAP(?) services defined in the WSDL xml doc or can I get a regular XML document - I'd like to drill down through an XML tree with XPATH, but if this requires me to make calls like: stockResultObj = stockservice.doCompanyInfo(any,any,macr); Myresult = result.company Yes, that's how SOAP works. The WSDL document is an interface definition - it tells SOAP clients what methods are there to call, how to call them, etc. The SOAP client is responsible for building a SOAP envelope containing the appropriate method call, and the SOAP server is responsible for building a SOAP envelope containing the response of that method call. Some SOAP services do return XML documents within their SOAP envelopes (which are themselves XML documents, of course). But you'll always have to call one of the services described by the WSDL file. You can certainly use XPath expressions with the contents of the SOAP envelope you get back, although this is usually not a good idea unless the SOAP server returns an XML document as its response (document/literal vs RPC-encoded SOAP services). And it also seems like XML files with namespaces don't play nicely with Flash, or at least with xfactorstudios Xpath classes. XPath provides the name() function which can be used to find nodes without using the namespace prefix; I don't know if the specific classes in question support that, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Jason, The WebService class automatically decodes the XML response from the web service method. The decoding process converts the XML into ActionScript objects. If you want the raw XML, you can get it by turning off the decoding for a particular method. WebService.getCall() will return the SOAPCall object for the method of your choosing, and SOAPCall.doDecoding allows you to turn the decoding on or off. myWebService = new WebService(http://www.mycompany.com/myservice.wsdl;); mySoapCall = myWebService.getCall(myMethodName); mySoapCall.doDecoding = false; callback = myWebService.myMethodName(params); callback.onResult = function(result){ trace(result); } Something like that should yield raw XML, which you can parse with XPath or whatever you like. I haven't personally used xfactor's XPath implementation. You're exactly right that the people who maintain the .Net web services would be responsible for creating new methods for you. When you get XML from a web service, that's not an XML Socket. An XML Socket is a TCP/IP connection on the server that is configured to communicate in XML, and this allows the server to push data to Flash without a call from Flash. Essentially, it's a two-way connection that stays open until the client disconnects. Hope that helps! -tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 12:49 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks Tom. Another question: When using Webservices, does the WSDL structure (SOAP?) always require that I call SOAP(?) services defined in the WSDL xml doc or can I get a regular XML document - I'd like to drill down through an XML tree with XPATH, but if this requires me to make calls like: stockResultObj = stockservice.doCompanyInfo(any,any,macr); Myresult = result.company And it also seems like XML files with namespaces don't play nicely with Flash, or at least with xfactorstudios Xpath classes. If I have to call a function in the WDSL to get what I want, then I have a lot more to learn than I had planned on since I need to know more about the data like how many node items there are, and titles. This seems like someone else has to define those getter functions for me (I'm not a .NET developer) - I was hoping the .NET developer could push me an XML file (not a physical file, but variable representation of one) I could traverse an XML tree using Xpath like I had in the past. Is that called an XML socket? I'm still learning how all of this works obviously and am probably not using the right terminology, but does that make any sense? Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 12:26 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Hard to say... The WSDL loads in my browser too, so it looks like it should work. Just as a test, you could try an LoadVars.load on that URL and trace out the results in the onData handler. If that is successful, then we need to figure out why the WebService class isn't working for you. If LoadVars.load fails, that would suggest a security sandbox issue or network connectivity issue (just off the top of my head). -tom ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Thanks Dave! Thanks Tom! I'm learning a lot here. So the million dollar question for me is: What is the best way, building for Flash player 7, for me to get an XML message (which contains the entire XML doc - but a true message/variable whatever, not the literal physical XML file) into an XML object in Flash (so I can use xfactorstudios XPATH classes to traverse it)? My coworker is going to be using some .NET development techniques to create a webservice for me which draws data from a SQLServer database. So far, it seems like this approach is recommended: 1. Use the Webservices Classes to connect to a WSDL via http. 2. Call a SOAP method in the WSDL that returns an XML message (turn off decoding on the SOAP call to get the pure XML). 3. Load the XML message into a Flash XML object. 4. Do what I want with the Flash XML object at that point. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Thursday, May 18, 2006 1:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
That sounds about right to me! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks Dave! Thanks Tom! I'm learning a lot here. So the million dollar question for me is: What is the best way, building for Flash player 7, for me to get an XML message (which contains the entire XML doc - but a true message/variable whatever, not the literal physical XML file) into an XML object in Flash (so I can use xfactorstudios XPATH classes to traverse it)? My coworker is going to be using some .NET development techniques to create a webservice for me which draws data from a SQLServer database. So far, it seems like this approach is recommended: 1. Use the Webservices Classes to connect to a WSDL via http. 2. Call a SOAP method in the WSDL that returns an XML message (turn off decoding on the SOAP call to get the pure XML). 3. Load the XML message into a Flash XML object. 4. Do what I want with the Flash XML object at that point. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Thursday, May 18, 2006 1:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Actually, on re-reading your message... If you're not going to use XPath or your own custom parser to handle the XML, you might as well not turn off decoding, and instead just use the ActionScript objects returned by the WebService call. If you DO want to use XPath, do what you described, but there should be no need to load the response into an XML object (step 3). Make sense? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 2:15 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services That sounds about right to me! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks Dave! Thanks Tom! I'm learning a lot here. So the million dollar question for me is: What is the best way, building for Flash player 7, for me to get an XML message (which contains the entire XML doc - but a true message/variable whatever, not the literal physical XML file) into an XML object in Flash (so I can use xfactorstudios XPATH classes to traverse it)? My coworker is going to be using some .NET development techniques to create a webservice for me which draws data from a SQLServer database. So far, it seems like this approach is recommended: 1. Use the Webservices Classes to connect to a WSDL via http. 2. Call a SOAP method in the WSDL that returns an XML message (turn off decoding on the SOAP call to get the pure XML). 3. Load the XML message into a Flash XML object. 4. Do what I want with the Flash XML object at that point. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Thursday, May 18, 2006 1:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
I do want to use xfactorstudios Xpath classes, but you said if I do that then, no need to load the response into an XML object (step 3). xfactorstudios Xpath classes for Flash requires a Flash XML object - so they know what to parse: XPath.selectNodes(theXMLObject, the/path/string) so I'm not sure how you would do it otherwise? Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 2:30 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Actually, on re-reading your message... If you're not going to use XPath or your own custom parser to handle the XML, you might as well not turn off decoding, and instead just use the ActionScript objects returned by the WebService call. If you DO want to use XPath, do what you described, but there should be no need to load the response into an XML object (step 3). Make sense? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 2:15 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services That sounds about right to me! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks Dave! Thanks Tom! I'm learning a lot here. So the million dollar question for me is: What is the best way, building for Flash player 7, for me to get an XML message (which contains the entire XML doc - but a true message/variable whatever, not the literal physical XML file) into an XML object in Flash (so I can use xfactorstudios XPATH classes to traverse it)? My coworker is going to be using some .NET development techniques to create a webservice for me which draws data from a SQLServer database. So far, it seems like this approach is recommended: 1. Use the Webservices Classes to connect to a WSDL via http. 2. Call a SOAP method in the WSDL that returns an XML message (turn off decoding on the SOAP call to get the pure XML). 3. Load the XML message into a Flash XML object. 4. Do what I want with the Flash XML object at that point. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Thursday, May 18, 2006 1:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Sorry, didn't know that. :) I assumed it took an XML string. My bad. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:42 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services I do want to use xfactorstudios Xpath classes, but you said if I do that then, no need to load the response into an XML object (step 3). xfactorstudios Xpath classes for Flash requires a Flash XML object - so they know what to parse: XPath.selectNodes(theXMLObject, the/path/string) so I'm not sure how you would do it otherwise? Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 2:30 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services Actually, on re-reading your message... If you're not going to use XPath or your own custom parser to handle the XML, you might as well not turn off decoding, and instead just use the ActionScript objects returned by the WebService call. If you DO want to use XPath, do what you described, but there should be no need to load the response into an XML object (step 3). Make sense? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 2:15 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services That sounds about right to me! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:02 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Thanks Dave! Thanks Tom! I'm learning a lot here. So the million dollar question for me is: What is the best way, building for Flash player 7, for me to get an XML message (which contains the entire XML doc - but a true message/variable whatever, not the literal physical XML file) into an XML object in Flash (so I can use xfactorstudios XPATH classes to traverse it)? My coworker is going to be using some .NET development techniques to create a webservice for me which draws data from a SQLServer database. So far, it seems like this approach is recommended: 1. Use the Webservices Classes to connect to a WSDL via http. 2. Call a SOAP method in the WSDL that returns an XML message (turn off decoding on the SOAP call to get the pure XML). 3. Load the XML message into a Flash XML object. 4. Do what I want with the Flash XML object at that point. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Watts Sent: Thursday, May 18, 2006 1:01 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
I can't find docs for xfactor XPath, but a quick look at the XPath class seems to show that you need to pass an XML Node. Doesn't look like it accepts a string. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:51 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ...unless in your comment about Xpath maybe what you were saying is instead of loading into a Flash XML object: //this is my guess as to how it would work //after the WSDL was loaded and the call made //(myXML is the SOAP webservice pure XML return) myXML = xmlWebServiceResult; var theXMLObject:XML = new XML(); theXMLObject.load(myXML); XPath.selectNodes(theXMLObject, the/path/string) I do can just do this as a string instead: myXML = xmlWebServiceResult; XPath.selectNodes(myXML, the/path/string); Right? Or no? Maybe XPath *can* take an XML string instead of an XML object. Thanks! Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
Ah - looks like xfactorstudios didn't pay their ISP fees this month, the site is down. Thanks anyway! I can easily test this theory out when I have a second (busy day today) - if Xpath can accept XML as a string - but I'm also kind of highly doubting it as well. Thanks for all your help. Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 3:12 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services I can't find docs for xfactor XPath, but a quick look at the XPath class seems to show that you need to pass an XML Node. Doesn't look like it accepts a string. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:51 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ...unless in your comment about Xpath maybe what you were saying is instead of loading into a Flash XML object: //this is my guess as to how it would work //after the WSDL was loaded and the call made //(myXML is the SOAP webservice pure XML return) myXML = xmlWebServiceResult; var theXMLObject:XML = new XML(); theXMLObject.load(myXML); XPath.selectNodes(theXMLObject, the/path/string) I do can just do this as a string instead: myXML = xmlWebServiceResult; XPath.selectNodes(myXML, the/path/string); Right? Or no? Maybe XPath *can* take an XML string instead of an XML object. Thanks! Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] .NET and XML Web services
No problem. Another thought occurred to me: since XPath takes an XMLNode object, I wonder if you can leave decoding on, and just pass it the root node of the WebService response? Not sure if that's an XMLNode object, but it seems like it would be since the internals of the SOAPCall end up using the XML object. Hope that doesn't confuse things for you. I'd be curious to know the answer to that though. :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 3:21 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services Ah - looks like xfactorstudios didn't pay their ISP fees this month, the site is down. Thanks anyway! I can easily test this theory out when I have a second (busy day today) - if Xpath can accept XML as a string - but I'm also kind of highly doubting it as well. Thanks for all your help. Jason Merrill Bank of America Learning and Organizational Effectiveness Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Thursday, May 18, 2006 3:12 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] .NET and XML Web services I can't find docs for xfactor XPath, but a quick look at the XPath class seems to show that you need to pass an XML Node. Doesn't look like it accepts a string. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Thursday, May 18, 2006 2:51 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] .NET and XML Web services ...unless in your comment about Xpath maybe what you were saying is instead of loading into a Flash XML object: //this is my guess as to how it would work //after the WSDL was loaded and the call made //(myXML is the SOAP webservice pure XML return) myXML = xmlWebServiceResult; var theXMLObject:XML = new XML(); theXMLObject.load(myXML); XPath.selectNodes(theXMLObject, the/path/string) I do can just do this as a string instead: myXML = xmlWebServiceResult; XPath.selectNodes(myXML, the/path/string); Right? Or no? Maybe XPath *can* take an XML string instead of an XML object. Thanks! Jason ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] .NET and XML Web services
On May 18, 2006, at 7:45 AM, j.c.wichman wrote: Look at this one for example http://www.flash-db.com/services/tutorials/mxclasses/ mxwebservices.php?page= 2 The example is correct except for the very first line (drop the php at the very beginning). I've been working with services for the past few months, and the code example above is the foundation for every call I make. You DON'T need the webService component(s) because you're using this line instead: import mx.services.*; As for your ideas for jumping in and out of XML: don't. Web services are an advanced form of XML that you don't need to dumb down. They allow you to pass full objects, meaning you only need to transfer one object to get all the values. So in the example listed earlier, you would have: stockResultObj.onResult = function(result) { myObject = result; } And that's it -- all of the object's values are passed using one line of code. Then you could grab values anytime: trace(myObject.company); // displays the value for company If you're dealing with multiple objects, or an array of objects you use: // multiple objects example myFirstObject = result.MyFirstObject myNextObject= result.MyNextObject and/or // array example for (i=0; i result.length; i++) { myArray[i] = result[i]; } bonus: don't forget to add the WSDL to your Web Services panel/list in Flash. This will allow you to easily view all value names and types being passed in an easy to read format. -radley -- Radley Marx [EMAIL PROTECTED] 310.220.4088 http://www.radleymarx.com -- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com