[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Shaping XML......renaming return array value

avpethia

8/23/2003 7:07:00 AM

This is my web method :

[WebMethod()]
[return:XmlArray("Employees")]
[return:XmlArrayItem("Employee")]
public CEmployee[] GetEmployees()
{
CEmployeeDA objEmployeeDA = new CEmployeeDA();
return objEmployeeDA.GetEmployees();
............
}

Please note, in the above code I have referenced the appropriate
namespace that has CEmployee.


This is the output I am getting :

<?xml version="1.0" encoding="utf-8" ?>
- <ArrayOfCEmployee xmlns:xsd="http://www.w3.org/2001/XMLSc...
xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst...
xmlns="http://localhost/PAA1WS/Services">
- <CEmployee>
<FirstName>THOMAS</FirstName>
<LastName>KMICK</LastName>
<BirtDate>1/1/0001</BirtDate>
<EmployeeID>1434</EmployeeID>


What can I do to get the "Employees" instead of "ArrayOfCLASSNAME" and
"Employee" in place of "<CLASSNAME>" in the generated XML.

Hope to hear back from you.
Thanks