如何从WCF中的soap body中删除操作元素?

时间:2015-09-18 08:22:44

标签: c# web-services wcf

我有使用.net framework 4.0的wcf服务,所有设置都是visual studio WCF项目的默认设置

namespace ApiFrame{
[ServiceContract(Namespace="http://abc.com.vn/")]public interface IApiframe
{

    [OperationContract(Name = "process", Action="")]
    string testprocess(string request);

这就是我的服务结果(基于SOAPUI):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://abc.com.vn/">
   <soapenv:Header/>
   <soapenv:Body>
      <api:testprocess><!-- I want to remove this! -->
         <!--Optional:-->
         <api:request></api:request>
      </api:testprocess><!-- I want to remove this! -->
   </soapenv:Body>
</soapenv:Envelope>

我想删除<api:process> xml标记。

0 个答案:

没有答案