none
Error on WCF Itinerary Service Config RRS feed

  • Question

  • I have installed and configured the ESB Toolkit several times and I have never run into this problem. I have searched and cannot find any similar problems. After a standard install, I went to all of the endpoints to check the debug and wsdl metadata. All of the configured ports seem to work fine except the ESB.ItineraryServices.WCF and ESB.ItineraryServices.Response.WCF on-ramps. Unfortunately, these are the two most important endpoints for my application.

    When I navigate to http://localhost/ESB.ItineraryServices.Response.WCF/ProcessItinerary.svc I get the following error:

    An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.ArgumentException: The value could not be added to the collection, as the collection already contains an item of the same type: 'Microsoft.Practices.ESB.ServiceModel.Helpers.SoapHeaderMetadataBehavior'. This collection only supports one instance of each type. Parameter name: item at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata() at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized() at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension) at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData() at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleDocumentationRequest(Message httpGetRequest, String[] queries, Message& replyMessage) at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest) at SyncInvokeGet(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

    I messed around with the config file and if I disable the <soapHeaderMetadata> section, the error goes away, but I assume that the itinerary header would not be accepted.

    Any help would be appreciated.

    Monday, March 11, 2013 3:49 AM

Answers

All replies

  • Hi, 

    You can refer to this thread to fix the Endpoint problem on WCF. 

    http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/6e6bdf93-a26d-4e21-b0a3-85e569b960a7/


    Molly,
    Please Mark as the Answer, if this answers your question. Please vote as helpful, if this post is helpful.

    Tuesday, March 12, 2013 9:49 AM
  • I wish the moderator had not marked the other response as answering the problem, because it does not help me and my problem. It wasn't even helpful since the error in the related link involves an item of type 'System.ServiceModel.Description.ClientCredentials', whereas my error (above) is related to 'Microsoft.Practices.ESB.ServiceModel.Helpers.SoapHeaderMetadataBehavior'. Furthermore, I don't even have access to the source code to the ESB Itinerary Services endpoint to know why there would be multiple behaviors being added.

    I do know when I disable the following code in the Web.config, the error goes away, but I assume that this will also break the Itinerary processing:

         <soapHeaderMetadata enabled="true">
          <soapHeaders>
           <!--add headerTypeName="Itinerary" operation="SubmitRequestResponse" message="Itinerary" operationType="Input" targetNamespace="http://schemas.microsoft.biztalk.practices.esb.com/itinerary" xsdFileName="Itinerary.xsd"/-->
           <add headerTypeName="ItineraryDescription" operation="SubmitRequestResponse" message="ItineraryDescription" operationType="Input" targetNamespace="http://schemas.microsoft.biztalk.practices.esb.com/itinerary" xsdFileName="ItineraryDescription.xsd"/>
          </soapHeaders>
         </soapHeaderMetadata>

    Thursday, March 21, 2013 7:28 PM
  • Did you get a fix of this issue, I am also getting the same issue on BizTalk 2013 RTM on Windows 8 environment.
    Tuesday, April 16, 2013 2:13 AM
  • Hi,

    Follow the below steps to fix the above issue: Please provide your email address to me so that I can send you the updated  Microsoft.Practices.ESB.ServiceModel.Helpers.dll from Microsoft. My email address is sachinsandeep@gmail.com

    Install steps are as follows:  

    1.       Go to Bin folder in ESB install location (default is C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\Bin) and rename Microsoft.Practices.ESB.ServiceModel.Helpers.dll to Microsoft.Practices.ESB.ServiceModel.Helpers.ORIGINAL

    2.       Copy Microsoft.Practices.ESB.ServiceModel.Helpers.dll from the above workspace into the Bin folder

    3.       GAC the new Microsoft.Practices.ESB.ServiceModel.Helpers.dll

    4.       Copy ItineraryDescription.xsd file from “C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\Web\ESB.ItineraryServices.WCF\App_Data” to “C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit\Web\ESB.ItineraryServices.Generic.Response.WCF\App_Data”

    5.       Restart BizTalk Services and do an IISReset

    Thanks
    Sachin

    • Proposed as answer by Chandra Kumar Monday, September 23, 2013 6:11 PM
    Friday, September 20, 2013 4:03 PM
  • How can I get this DLL directly from Microsoft? Is there an updated installation package? I am not in the practice of accepting random DLLs from gmail addresses.

    Wednesday, September 25, 2013 9:45 PM
  • The dll cannot be gac'ed due to strong naming error. Is this actually a Microsoft dll? I am also facing same error on BTS 2010 on windows server 2008 R2. Does anyone know how to resolve this. Also, there is a warning in event log- The adapter "WCF-WSHttp" raised an error message. Details "System.ArgumentException: The value could not be added to the collection, as the collection already contains an item of the same type: 'Microsoft.Practices.ESB.ServiceModel.Helpers.SoapHeaderMetadataBehavior'. This collection only supports one instance of each type. Parameter name: item at System.Collections.Generic.KeyedByTypeCollection`1.InsertItem(Int32 index, TItem item) at Microsoft.Practices.ESB.ServiceModel.Helpers.SoapHeaderMetadataBehavior.System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection`1 endpoints, BindingParameterCollection bindingParameters) at System.ServiceModel.Description.DispatcherBuilder.GetBindingParameters(ServiceHostBase serviceHost, Collection`1 endpoints) at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata() at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized() at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension) at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData() at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleDocumentationRequest(Message httpGetRequest, String[] queries, Message& replyMessage) at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest) at SyncInvokeGet(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)". Thanks, Ratnakar.

    Regards, Ratnakar.

    Friday, November 8, 2013 11:14 AM
  • Hi,

    I experienced the same error message using Windows Server 2012, I installed the following hotfix and I am now able to view the wsdl for the service:

    http://support.microsoft.com/kb/2849475
    Wednesday, December 18, 2013 5:59 PM