2015-09-08 23 views
0

我有一个视觉工作室web服务和的[的WebMethod]一个返回一个这样的数组对象:编辑皂响应C#

 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> 

我怎样才能做到这一点?

回答

0
ParameterStyle = SoapParameterStyle.Bare