<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://bloggingabout.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>Search results matching tag 'Encoded'</title><link>http://bloggingabout.net/search/SearchResults.aspx?a=1&amp;o=DateDescending&amp;tag=Encoded&amp;orTags=0</link><description>Search results matching tag 'Encoded'</description><dc:language>en-US</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Exposing BizTalk Schemas as a SOAP-RPC/Encoded webservice</title><link>http://bloggingabout.net/blogs/vincent/archive/2010/01/12/exposing-biztalk-schemas-as-a-soap-rpc-encoded-webservice.aspx</link><pubDate>Tue, 12 Jan 2010 08:38:00 GMT</pubDate><guid isPermaLink="false">813b6dfd-644e-4573-a816-eebab56ba0d0:482677</guid><dc:creator>vincentscheel</dc:creator><description>&lt;p&gt;Yesterday I had to connect a Delphi back-end system to the BizTalk 2006 R2 environment&amp;nbsp;of my customer.&amp;nbsp;Since this Delphi system could only call webservices exposed as SOAP-RPC/Encoded, I had to expose the needed schemas as such.&lt;/p&gt;
&lt;p&gt;While searching on this subject I found a good post of &lt;em&gt;Tomas Restrepo&lt;/em&gt; on consuming SOAP-RPC/Encoded webservices: &lt;a href="http://winterdom.com/2005/07/consumingrpcencodedwebservicesfrombiztalk"&gt;http://winterdom.com/2005/07/consumingrpcencodedwebservicesfrombiztalk&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This explains how you have to work with multipart messagetypes to &lt;span style="text-decoration:underline;"&gt;call&lt;/span&gt; a SOAP-RPC/Encoded webservice. At first I figured I would have to do something alike to expose my schemas as a SOAP-RPC/Encoded webservice. However, this is actually very easy.&lt;/p&gt;
&lt;p&gt;With the .Net framework you can easily expose a webservice as SOAP-RPC/Encoded by setting the correct attribute on the webmethod. To achieve this you should do the following to the generated webservice code&amp;nbsp;&lt;span style="text-decoration:underline;"&gt;after&lt;/span&gt; exposing your schemas as a webservice using the default &lt;em&gt;BizTalk Web Services Publishing Wizard&lt;/em&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Comment out (or delete) the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapDocumentMethodAttribute&lt;/span&gt; on the WebMethod and the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapDocumentServiceAttribute&lt;/span&gt; on the class that are set by default by the wizard.&lt;/li&gt;
&lt;li&gt;Set the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapRpcMethod&lt;/span&gt; attribute on the WebMethod and the &lt;span style="font-size:x-small;color:#008080;"&gt;SoapRpcService&lt;/span&gt; attribute on the class.&lt;/li&gt;
&lt;li&gt;You can set parameters on both new attributes to change the behaviour and settings of the SOAP-RPC/Encoded service&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&amp;#39;s it. Since the .Net Framework creates an object based on your schema of the webrequest and uses this to call BizTalk, you don&amp;#39;t have to change anything on the BizTalk side to expose your schema&amp;#39;s as a SOAP-RPC/Encoded webservice. Now that is easy!&lt;/p&gt;
&lt;p&gt;While on the subject of exposing schemas as a webservice: the generated webservice has &amp;#39;&lt;span style="font-size:x-small;"&gt;ParameterStyle=System.Web.Services.Protocols.&lt;/span&gt;&lt;span style="font-size:x-small;color:#008080;"&gt;SoapParameterStyle&lt;/span&gt;&lt;span style="font-size:x-small;"&gt;.Default&lt;/span&gt;&amp;#39; set on the SoapDocumentMethodAttribute by default. This causes an extra node in the envelope body named like the WebMethod&amp;#39;s name. If you don&amp;#39;t want this extra node, you can set the &amp;#39;ParameterStyle&amp;#39; to &amp;#39;System.Web.Services.Protocols.&lt;span style="font-size:x-small;color:#008080;"&gt;SoapParameterStyle&lt;/span&gt;&lt;span style="font-size:x-small;"&gt;.Bare&lt;/span&gt;&amp;#39; and the extra node is not used anymore.&lt;/p&gt;</description></item></channel></rss>