我有一个visual studio Web服务,其中一个[WebMethod]返回一个这样的数组对象:
public createSerial[] Create(string inputSerial)
{
Bus bus = new Bus();
return bus.CreateOperation()
}
当我调用它时会产生以下响应:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateSerial xmlns="http://london.com/v1/">
<CreateSerialRequestResult>
<CreateSerialResponse>
<serial xmlns="urn:microsoft-dynamics-schemas/ve">57</serial>
</CreateSerialResponse>
</CreateSerialRequestResult>
</CreateSerial>
</soap:Body>
</soap:Envelope>
但我只想要这个:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateSerial xmlns="http://london.com/v1/">
<serial>57</serial>
</CreateSerial>
</soap:Body>
</soap:Envelope>
我该怎么做?