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

_______________________________________________
[email protected]
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


_______________________________________________
[email protected]
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

Reply via email to