How do I remove operation element from soap body in WCF?

醉酒当歌 提交于 2019-12-25 07:13:02

问题


I have wcf services using .net framework 4.0, all setting is default of visual studio WCF project

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

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

this is what my service result (based on 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>

I want to remove <api:process> xml tag.

来源:https://stackoverflow.com/questions/32647221/how-do-i-remove-operation-element-from-soap-body-in-wcf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!