I am working on integrating the A2A channel for the IRS through their WSDL and currently stuck on an issue in my App.config. Currently there is a warning for the <gzipMessageEncoding/>
node of my App.config:
The element 'binding' has invalid child element 'gzipMessageEncoding'. List of possible elements expected: (...).
I've looked over solutions provided by fatherOfWine, Russ, and jstill primarily here and I've gotten stuck now on this config hiccup. From what I've researched people seem to say you can just ignore this as a warning and continue but attempting to send to the IRS leads to the following error.
Invalid element in configuration. The extension 'gzipMessageEncoding' does not derive from correct extension base type 'System.ServiceModel.Configuration.BindingElementExtensionElement'.
Below is the snippet of my service model config. I have the encoder in a different place than fatherOfWine had suggested but I believe I have the correct types setup.
<system.serviceModel>
<client>
<endpoint address="[Endpoint Address]"
binding="customBinding" bindingConfiguration="BulkRequestTransmitterBinding"
contract="ACABulkRequestTransmitterService.BulkRequestTransmitterPortType"
name="BulkRequestTransmitterPort" />
<metadata>
<policyImporters>
<extension type="GZipEncoder.GZipMessageEncodingBindingElementImporter, GZipEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</policyImporters>
</metadata>
</client>
<extensions>
<bindingElementExtensions>
<add name="gzipMessageEncoding" type="GZipEncoder.GZipMessageEncodingElement, GZipEncoder, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bindingElementExtensions>
</extensions>
<bindings>
<customBinding>
<binding name="BulkRequestTransmitterBinding">
<gzipMessageEncoding innerMessageEncoding="textMessageEncoding" />
<httpsTransport />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
UPDATE 1: Changing the second variable in the type field to GZipMessageEncoder
throws a new exception at the same place.
'The type 'Utilities.Gzip.GZipMessageEncodingBindingElement, GZipMessageEncoder, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' registered for extension 'gzipMessageEncoding' could not be loaded.'
Still going to try and move the gzip code into its own project like shown in the link above.
UPDATE 2: Moving the Gzip library into its own project seems to have helped resolve the exception thrown during runtime. I've gone ahead and updated my App.config file above with what has changed. I'm now at the same point/issue in both my current working methods! lol but it's probably best in a different question if it comes to that.