如何在C#webservice中隐藏soap中的参数对象 [英] how to hide parameter object in soap in C# webservice

查看:729
本文介绍了如何在C#webservice中隐藏soap中的参数对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好Guyz,



这里需要一些帮助:



我怎么能隐藏这个母对象在soap中:< parameter>



样品肥皂请求:



 <   soapenv:Envelope     xmlns:soapenv   =  http://schemas.xmlsoap.org/soap/envelope/    xmlns:even   =  http:// mystic >  
< soap:标题/ >
< soap:Body >
< 方法 >
< ID > < / ID >
< ParameterMother >
<! - 零次或多次重复: < span class =code-comment> - >
< 参数 >
<! - 可选: - >
< 类型 > < / Type >
<! - 可选: - >
< > < / Value >
< /参数 >
< / ParameterMother >
< / Method >
< / soapenv:Body >

< / soapenv:Envelope >







我需要的是摆脱/隐藏< ParameterMother> < / ParameterMother>



应该是这样的:





 <   soapenv:Envelope     xmlns:soapenv   =  http: //schemas.xmlsoap.org/soap/envelope/\"   xmlns:even   =  http:// mystic >  
< soap:标头/ >
< soap:Body >
< 方法 >
< ID > < / ID >
<! - 零或更多重复: - >
< ; 参数 >
<! - 可选: - >
< 类型 > < / Type >
<! - 可选: - >
< > < / Value >
< /参数 >
< / Method >
< / soapenv:正文 >
< / soapenv:Envelope >





感谢!!

解决方案

Hi Guyz,

Need some help here:

how can i hide this mother object in soap : <parameter>

sample soap request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:even="http://mystic">
   <soap:Header/>
   <soap:Body>
      <Method>
         <ID>?</ID>
         <ParameterMother>
            <!--Zero or more repitition:-->
         <Parameter>
            <!--Optional:-->
            <Type>?</Type>
            <!--Optional:-->
            <Value>?</Value>
         </Parameter>
         </ParameterMother>
      </Method>
   </soapenv:Body>

</soapenv:Envelope>




what i need is to get rid/hide of <ParameterMother> </ParameterMother>

should be like this:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:even="http://mystic">
   <soap:Header/>
   <soap:Body>
      <Method>
         <ID>?</ID>
            <!--Zero or more repitition:-->
         <Parameter>
            <!--Optional:-->
            <Type>?</Type>
            <!--Optional:-->
            <Value>?</Value>
         </Parameter>
      </Method>
   </soapenv:Body>
</soapenv:Envelope>



Thankss!!

解决方案

这篇关于如何在C#webservice中隐藏soap中的参数对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆