[英]WCF Service SOAP Object
我在WCF中有一個Web服務,我的示例方法的協定/接口如下所示:
[ServiceContract]
public interface INTERFACE
{
[OperationContract]
os_consultar oe_consultar(oe_consultar obj_consultar);
}
此方法生成和XML,如下所示:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org soap/envelope/" xmlns:wses="http://org.com/wses/"
xmlns:ean="http://schemas.datacontract.org/2004/07 Ean.PaymentGateway.Bank.BankInterfaceEntity">
<soapenv:Header/>
<soapenv:Body>
<wses:oe_consultar>
<!--Optional:-->
<wses:obj_consultar>
<cod1>?</cod1>
<cod2>?</cod2>
</wses:obj_consultar>
</wses:oe_consultar>
</soapenv:Body>
</soapenv:Envelope>
我想知道是否可以通過這種方式生成xml:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org soap/envelope/" xmlns:wses="http://org.com/wses/"
xmlns:ean="http://schemas.datacontract.org/2004/07 Ean.PaymentGateway.Bank.BankInterfaceEntity">
<soapenv:Header/>
<soapenv:Body>
<wses:oe_consultar>
<cod1>?</cod1>
<cod2>?</cod2>
</wses:oe_consultar>
</soapenv:Body>
</soapenv:Envelope>
提前致謝
那這個呢
[ServiceContract]
public interface INTERFACE
{
[OperationContract]
void oe_consultar(cod1 string, cod2 string);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.