<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XML Web Services</title><link>http://forums.asp.net/28.aspx</link><description>All about building XML Web Services with ASP.NET - SOAP, WSDL, WCF, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=66&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Soap Message: To specify that parameters directly follow the Body element</title><link>http://forums.asp.net/thread/3277249.aspx</link><pubDate>Mon, 06 Jul 2009 16:49:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3277249</guid><dc:creator>_kalesh_</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3277249.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=3277249</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;johnwsaunders3:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;Actually, if you look carefully, you&amp;#39;ll see that you parameters &lt;i&gt;do&lt;/i&gt; immediately follow the body. You have only one parameter, named candidate1. That parameter immediately follows the body. If it had been of type &amp;quot;int&amp;quot;, you would have seen:&lt;/p&gt;&lt;p&gt;&amp;lt;body&amp;gt;&amp;lt;candidate1&amp;gt;1234567890&amp;lt;/candidate1&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;Ok.. yes you are right... &lt;/p&gt;&lt;p&gt;I managed to implement Soap Extensions and created a new soap envelope after the serialization phase.&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Soap Message: To specify that parameters directly follow the Body element</title><link>http://forums.asp.net/thread/3274474.aspx</link><pubDate>Sat, 04 Jul 2009 08:38:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274474</guid><dc:creator>johnwsaunders3</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274474.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=3274474</wfw:commentRss><description>&lt;p&gt;Actually, if you look carefully, you&amp;#39;ll see that you parameters &lt;i&gt;do&lt;/i&gt; immediately follow the body. You have only one parameter, named candidate1. That parameter immediately follows the body. If it had been of type &amp;quot;int&amp;quot;, you would have seen:&lt;/p&gt;&lt;p&gt;&amp;lt;body&amp;gt;&amp;lt;candidate1&amp;gt;1234567890&amp;lt;/candidate1&amp;gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Soap Message: To specify that parameters directly follow the Body element</title><link>http://forums.asp.net/thread/3269654.aspx</link><pubDate>Wed, 01 Jul 2009 18:58:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3269654</guid><dc:creator>_kalesh_</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3269654.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=3269654</wfw:commentRss><description>&lt;p&gt;After some research I have found that SoapExtension can be used to access/modify soap message before serialization.&lt;/p&gt;&lt;p&gt;Any other suggestions are also welcome.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Soap Message: To specify that parameters directly follow the Body element</title><link>http://forums.asp.net/thread/3266280.aspx</link><pubDate>Tue, 30 Jun 2009 11:04:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3266280</guid><dc:creator>_kalesh_</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3266280.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=3266280</wfw:commentRss><description>&lt;p&gt;Method from Proxy class which I am calling.&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;[System.Web.Services.Protocols.SoapDocumentMethodAttribute(&amp;quot;initiate&amp;quot;, OneWay = true,
            Use = System.Web.Services.Description.SoapBindingUse.Literal,
            ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
        public void initiate([XmlElement(Namespace = &amp;quot;http://xmlns.xxxx.com/whatever&amp;quot;,
                     IsNullable=false)] XmlDocument Candidates1)
        {
            this.Invoke(&amp;quot;initiate&amp;quot;, new object[] { Candidates1 });
        }&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; SOAP message format from fiddler :&lt;/p&gt;&lt;p&gt;&amp;lt;soap:Envolope&amp;gt;&lt;br /&gt;&amp;lt;soap:Header&amp;gt;&lt;br /&gt;.....&lt;br /&gt;&amp;lt;/soap:Header&amp;gt;&lt;br /&gt;&amp;lt;soap:Body&amp;gt;&lt;br /&gt;&amp;lt;Candidates1 xmlns=&amp;quot;http://xmlns.xxxx.com/whatever&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;Candidate xmlns=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-- XML Document nodes --&lt;br /&gt;&amp;lt;/Candidate&amp;gt;&lt;br /&gt;&amp;lt;/Candidates1&amp;gt;&lt;br /&gt;&amp;lt;/soap:Body&amp;gt;&lt;br /&gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;The problem is the &amp;lt;Candidates1&amp;gt; element. .NET is just converting the input parameter name to a xml root element in the final soap message. If I rename it to candidate2 then the xml element would be &amp;lt;candidate2&amp;gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;According to this msdn article here:&lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/2b4bx2t6(VS.80,loband).aspx" href="http://msdn.microsoft.com/en-us/library/2b4bx2t6%28VS.80,loband%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/2b4bx2t6(VS.80,loband).aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;we can specify that parameters directly follow the Body element. By applying the xmlelement&lt;br /&gt;attribute&amp;nbsp; to the input parameter and setting ParameterStyle to Bare, along with setting the parameter formatting style to Literal.&lt;/p&gt;&lt;p&gt;But even after appying these changes(as above), I am unable to remove the &amp;lt;Candidates1&amp;gt; element. &lt;/p&gt;&lt;p&gt;Any suggestions are welcome on how to specify that parameters directly follow the body element. In my case the &amp;lt;Candidate&amp;gt; should follow the &amp;lt;soap:Body&amp;gt; element.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks.&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>