こんにちは、私はまだ一般的に春にかなり新しいです。 Webサービスを公開するためにWebServiceExporterを使用しています。私は次のエラーを取得する私のweb.xmlに別のWebサービスを追加しようとしたときただし、:複数のサービスを公開できません - Spring WebServiceExporter
[ArgumentException: Duplicate type name within an assembly.]
System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType) +14200621
System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType) +91
System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) +161
System.Reflection.Emit.ModuleBuilder.DefineTypeNoLock(String name, TypeAttributes attr, Type parent, Type[] interfaces, PackingSize packingSize, Int32 typesize) +103
System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent) +289
Spring.Proxy.DynamicProxyManager.CreateTypeBuilder(String typeName, Type baseType) +145
[ArgumentException: Proxy already registered for "UserWebService" as Type "UserWebService".]
Spring.Proxy.DynamicProxyManager.CreateTypeBuilder(String typeName, Type baseType) +353
Spring.Proxy.CompositionProxyTypeBuilder.BuildProxyType() +149
Spring.Web.Services.WebServiceExporter.GenerateProxy() +333
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) +269
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) +660
Spring.Objects.Factory.Support.WebObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) +135
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) +933
[ObjectCreationException: Error creating object with name 'UserWebService' defined in 'file [C:\CODE\Kupla\Kupla\Web.xml] line 13' : Initialization of object failed : Proxy already registered for "UserWebService" as Type "UserWebService".]
Spring.Objects.Factory.Support.AbstractAutowireCapableObjectFactory.InstantiateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching, Boolean suppressConfigure) +1419
Spring.Objects.Factory.Support.AbstractObjectFactory.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +389
Spring.Objects.Factory.Support.AbstractObjectFactory.GetObjectInternal(String name, Type requiredType, Object[] arguments, Boolean suppressConfigure) +2103
Spring.Objects.Factory.Support.DefaultListableObjectFactory.PreInstantiateSingletons() +875
Spring.Context.Support.AbstractApplicationContext.Refresh() +1225
Spring.Context.Support.WebApplicationContext..ctor(WebApplicationContextArgs args) +179
_dynamic_Spring.Context.Support.WebApplicationContext..ctor(Object[]) +252
Spring.Context.Support.RootContextInstantiator.InvokeContextConstructor(ConstructorInfo ctor) +168
Spring.Context.Support.ContextHandler.InstantiateContext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +192
Spring.Context.Support.WebContextHandler.InstantiateContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +413
Spring.Context.Support.ContextHandler.Create(Object parent, Object configContext, XmlNode section) +520
[ConfigurationErrorsException: Error creating context 'spring.root': Duplicate type name within an assembly.]
System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +347
System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +2277
System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1849
System.Configuration.BaseConfigurationRecord.GetSection(String configKey) +69
Spring.Util.ConfigurationUtils.GetSection(String sectionName) +270
Spring.Context.Support.WebApplicationContext.GetContextInternal(String virtualPath) +1663
Spring.Context.Support.WebSupportModule.Init(HttpApplication app) +665
System.Web.HttpApplication.InitModulesCommon() +192
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1678
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +390
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +194
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +293
は、他の誰の前に春でこれを経験している、私は本当に間違っているものを見るのに苦労しています。私のweb.xmlには以下が含まれています:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<object type="default.aspx">
<property name="SessionObjectHolder" ref="SessionObjectHolder"/>
</object>
<object type="home.aspx">
<property name="UserBLL" ref="UserBLL"/>
<property name="SessionObjectHolder" ref="SessionObjectHolder"/>
</object>
<object id="UserWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="TargetName" value="UserWebServiceDTO"/>
<property name="Namespace" value="http://test.co.uk"/>
<property name="Description" value="This is User Web Service"/>
<property name="TypeAttributes">
<list>
<object type="System.Web.Script.Services.ScriptServiceAttribute, System.Web.Extensions"/>
</list>
</property>
</object>
<object id="UserWebServiceDTO" type="Kupla.ServiceLayer.UserWebService, Kupla.ServiceLayer">
<property name="UserBLL" ref="UserBLL" />
</object>
<object id="SessionObjectHolderWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="TargetName" value="SessionObjectHolderWebServiceDTO"/>
<property name="Namespace" value="http://test.co.uk"/>
<property name="Description" value="This is the session object holder web service"/>
<property name="TypeAttributes">
<list>
<object type="System.Web.Script.Services.ScriptServiceAttribute, System.Web.Extensions"/>
</list>
</property>
</object>
<object id="SessionObjectHolderWebServiceDTO" type="Kupla.ServiceLayer.SessionObjectHolderWebService, Kupla.ServiceLayer">
<property name="UserBLL" ref="UserBLL" />
</object>
</objects>
こんにちは、私は私のサービス層に2つのクラスがあります。 SessionObjectHolderWebService.csおよびUserWebService.cs。それはWebサービスがweb.xmlで宣言されている順序を変更するときに変わってくるので、私は変わっています。このエラーは、SessionObjectHolderWebserviceが複製されていることを示します。 – user1475128