I have an object which I serialize nicely into this:
<?xml version="1.0" encoding="utf-8" ?>
<people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" userID="AX12345">
<group groupID="1234_ABCD">
<person name="Name 0" id="0" />
<person name="Name 1" id="1" />
<person name="Name 2" id="2" />
<person name="Name 3" id="3" />
</group>
</people>
Which is returned as a string to this:
[OperationContract]
[WebGet(UriTemplate = "format/{format}/userid/{userid}/sessionkey/{sessionkey}")]
string Get(string format,string userid,string sessionkey);
When I view the returned data this service, I get this.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header />
<s:Body>
<GetResponse xmlns="http://tempuri.org/">
<GetResult>**<?xml version="1.0" encoding="utf-8"?><people xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" userID="123BOBBY"><group groupID="1234_ABCD"><person name="Name 0" id="0" /><person name="Name 1" id="1" /><person name="Name 2" id="2" /><person name="Name 3" id="3" /></group></people></**GetResult>
</GetResponse>
</s:Body>
</s:Envelope>
And what I would like is this:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header />
<s:Body>
<GetResponse xmlns="http://tempuri.org/">
<GetResult>
<people userID="AX12345">
<group groupID="1234_ABCD">
<person name="Name 0" id="0" />
<person name="Name 1" id="1" />
<person name="Name 2" id="2" />
<person name="Name 3" id="3" />
</group>
</people>
</GetResult>
</GetResponse>
</s:Body>
</s:Envelope>
I am kind of a noob with all this, and I know I am missing something simple. Can anybody help me please?
Thanks P