This content has been marked as final. Show 3 replies
Apologies...first post and it went out half-cocked
Here is the full post
I have a .NET webservice that returns an XMLDocument
public XmlDocument PriceGet()
string sDoc = "<testXML><User FName='Bingo' SName='Little' /></testXML>";
XmlDocument oDoc = new XmlDocument();
I have created the following WebService in Flex Builder
I have checked the message that is coming back
body = "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema"><soap:Body><PriceGetResponse><PriceGetResult><testXML xmlns=""><User FName="Bingo" SName="Little" /></testXML></PriceGetResult></PriceGetResponse></soap:Body></soap:Envelope>"
clientId = "DirectHTTPChannel0"
correlationId = "56648983-5FBD-C1C2-37CF-75F0BB1D927A"
destination = ""
headers = (Object)#1
messageId = "F5D83181-12DD-67E4-7E41-75F0BC07890C"
timestamp = 0
timeToLive = 0
but for the life of me I can't get to the data that the message contains.
Referencing Dashboardws.PriceGet.lastResult give me a null as do all other combinations I can think of
Has anybody got any thoughts? My remaining hair is in some danger here
Hi. What does your code look like where you handle the result from the web service? Do you have a result handler, ie. PriceGetHandler(event), or are you trying to databind to the result?
Thanks for the response
I do have an event handler. Since the original post I have made the following progress.
If I alter the return type to e4x and create a local namespace like this
private namespace utx = " http://www.xxxxxx.net/";
use namespace utx;
I can access the data as an XMLListCollection in the event handler
colPriceXML = new XMLListCollection(event.result.PriceGetResult.root.children());
Whilst this works I am still interested as to how I can access this data in other ways (e.g. as an ArrayCollection which is what I have been doing with HTTPServices.) I have seen plenty of example code where returning a XMLDocument from a C# webservice seems routine but not many of these seem to work in practice