Z
Zean Smith
I was given an XML (see below) already in string format, is it possible to
map the data to an Array of a .NET class? I read some article about
XMLDataDocument and XMLReader, but never talk about mapping... help.
It would be cool if I can get data fill out like this from XML..
((myclass)array[0]).title; // returns "Microsoft"
((myclass)array[0]).revenue; // returns "18621.85"
I know write my own .NET ASMX web services, of course I will return a
DataSet. but I don't know how to deal with Apache SOAP, any help or tips is
appreciated.
Thanks
Zean
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:namesp2="http://xml.apache.org/xml-soap"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:getSalesGrossesResponse
xmlns:namesp1="urn:Company/SOAP/Dispatcher">
<SOAP-ENC:Array SOAP-ENC:arrayType="namesp2:SOAPStruct[2]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="namesp2:SOAPStruct">
<TITLE_NAME xsi:type="xsd:string">Microsoft</TITLE_NAME>
<REVENUE xsi:type="xsd:float">18621.85</WEEKEND_REV>
</item>
<item xsi:type="namesp2:SOAPStruct">
<TITLE_NAME xsi:type="xsd:string">Oracle</TITLE_NAME>
<REVENUE xsi:type="xsd:float">16326.86</WEEKEND_REV>
</item>
</SOAP-ENC:Array>
</namesp1:getSalesGrosses>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
map the data to an Array of a .NET class? I read some article about
XMLDataDocument and XMLReader, but never talk about mapping... help.
It would be cool if I can get data fill out like this from XML..
((myclass)array[0]).title; // returns "Microsoft"
((myclass)array[0]).revenue; // returns "18621.85"
I know write my own .NET ASMX web services, of course I will return a
DataSet. but I don't know how to deal with Apache SOAP, any help or tips is
appreciated.
Thanks
Zean
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:namesp2="http://xml.apache.org/xml-soap"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:getSalesGrossesResponse
xmlns:namesp1="urn:Company/SOAP/Dispatcher">
<SOAP-ENC:Array SOAP-ENC:arrayType="namesp2:SOAPStruct[2]"
xsi:type="SOAP-ENC:Array">
<item xsi:type="namesp2:SOAPStruct">
<TITLE_NAME xsi:type="xsd:string">Microsoft</TITLE_NAME>
<REVENUE xsi:type="xsd:float">18621.85</WEEKEND_REV>
</item>
<item xsi:type="namesp2:SOAPStruct">
<TITLE_NAME xsi:type="xsd:string">Oracle</TITLE_NAME>
<REVENUE xsi:type="xsd:float">16326.86</WEEKEND_REV>
</item>
</SOAP-ENC:Array>
</namesp1:getSalesGrosses>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>