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

Discussion in 'ASP .Net Web Services' started by av, Aug 23, 2003.

  1. av

    av Guest

    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
    av, Aug 23, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PvdK
    Replies:
    0
    Views:
    2,969
  2. Mike Kingscott

    Shaping data/multiple result sets - hmmm...

    Mike Kingscott, Aug 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    307
    Mike Kingscott
    Aug 27, 2003
  3. flamesrock

    Bandwith Shaping

    flamesrock, May 4, 2005, in forum: Python
    Replies:
    2
    Views:
    294
    Heiko Wundram
    May 4, 2005
  4. outune

    bandwidth shaping on urllib2

    outune, Mar 29, 2006, in forum: Python
    Replies:
    1
    Views:
    324
    Larry Bates
    Mar 30, 2006
  5. Greenhorn
    Replies:
    15
    Views:
    800
    Keith Thompson
    Mar 6, 2005
Loading...

Share This Page