From c7563364273933ab7cbee125bda8b6230d908feb Mon Sep 17 00:00:00 2001 From: markpollack Date: Tue, 3 Aug 2010 18:28:15 +0000 Subject: [PATCH] SPRNET-1324 - Add namespace parser for WCF integration --- doc/reference/src/objects.xml | 22 +++--- doc/reference/src/wcf.xml | 29 +++---- doc/reference/src/xsd-configuration.xml | 100 ++++++++++++++++++------ 3 files changed, 99 insertions(+), 52 deletions(-) diff --git a/doc/reference/src/objects.xml b/doc/reference/src/objects.xml index 9f69c68c..c44dd277 100644 --- a/doc/reference/src/objects.xml +++ b/doc/reference/src/objects.xml @@ -1,4 +1,4 @@ - + - + XML Schema-based configuration
@@ -82,11 +87,10 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. -
@@ -142,9 +146,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -194,9 +198,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -242,9 +246,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -262,6 +266,54 @@ </parsers> </spring> +</configuration> +
+ +
+ The <literal>wcf</literal> schema + + The wcf schema is used when you would like to + create a client channel to invoke a WCF service as compared to + generating a proxy using svcutil.exe. The channel factory approach + requires that you have a known interface which describes the service. + This approach is quite common to use when you are controlling both the + client and the server code, but is not exclusive to that case. The + advantage of coding to the interface is that it can be easily replaced + with another implementation, perhaps for testing purposes to facilitate + unit testing. + + For example, the following code can be used to create an instance + of the ICaclulator interface that invokes the remote service. + + ICalculator calculator = ChannelFactory<ICalculator>("calculatorEndpoint").CreateChannel(); + +int result = calculator.Add(1,2); + + You need to configure the remoting namespace parser in the main + .NET application configuration file as shown below + + + As of Spring.NET 1.2.0 it is no longer necessary to explicitly + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. + + + <configuration> + + <configSections> + <sectionGroup name="spring"> + <!-- other Spring config sections handler like context, typeAliases, etc not shown for brevity --> + <section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core"/> + </sectionGroup> + </configSections> + + <spring> + <parsers> + <parser type="Spring.ServiceModel.Config.WcfNamespaceParser, Spring.Services" /> + </parsers> + </spring> + </configuration>
@@ -288,9 +340,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -333,9 +385,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -379,9 +431,9 @@ As of Spring.NET 1.2.0 it is no longer necessary to explicitly - configure the namespace parsers that come with Spring - via a custom section in App.config. You will still need to register custom namespace - parsers if you are writing your own. + configure the namespace parsers that come with Spring via a custom + section in App.config. You will still need to register custom + namespace parsers if you are writing your own. <configuration> @@ -437,4 +489,4 @@ url="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTourEditingXml.aspx">Editing XML" product documentation. -
\ No newline at end of file +