Last post Mar 24, 2015 01:41 AM by Shawn - MSFT
Mar 23, 2015 08:27 AM|KeeEdwins|LINK
please I have a webservice that takes an ID and return the Customer Name and Details from a database.
How can i return the output in an xml format as below.
<?xml version="1.0" encoding="utf-8"?>
<Address>No 1 Orgle Road</Address>
Thanks in advance
Mar 23, 2015 09:22 AM|mgebhard|LINK
Service output is sent in XML if you are using SOAP. The client converts the XML response into an object represented by the web method's return type.
Therefore, if you want XML, return an XMl type from the service method. Otherwise return an object collection and serialize the response to XML.
Mar 24, 2015 01:41 AM|Shawn - MSFT|LINK
For this scenario, you could refer to the following way to return XML format output in web service: