A
av
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/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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
[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/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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