【发布时间】:2019-01-08 01:28:14
【问题描述】:
我有一个客户向我发送肥皂请求
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://com.test">
<SOAP-ENV:Body>
<ns1:Transfer>
<TransferRequest>
<transferDescription></transferDescription>
<ccy>XOF</ccy>
</TransferRequest>
</ns1:Transfer>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
下面是我的网络方法
[return: XmlElement(ElementName = "return")]
[SoapDocumentMethod(Use = SoapBindingUse.Default)]
public TransferResponse Transfer(TransferRequest TransferRequest)
{
}
public class TransferResponse{
public string Name {get;set;}
public string Title {get;set;}
}
public class TransferRequest
{
[XmlElement(Namespace = "http://com.test")]
public string transferDescription {get;set;}
[XmlElement(Namespace = "http://com.test")]
public string ccy{get;set;}
}
当我将 <ns1:Transfer> 中的 ns1 删除为 <Transfer> 时,我得到了请求值,但是当我像 <ns1:Transfer> 一样将其添加回来时,对象为空。我如何处理带有前缀的请求,n1
【问题讨论】:
标签: c# asp.net web-services soap