How can I implement Message Inspectors?

I want to create a soap Client.NET to communicate with a Java web service. The problem is in the answer because there is no Java and .NET compatibility for signature. So I want to disable the .NET validation response, for that I found these articles on MSDN

https://msdn.microsoft.com/en-us/library/aa717047.aspx

I can read that it is possible to insert a method that intercepts the response and I can bypass the validation. But I cannot do this. I have an import in my project of this class:

SchemaValidationBehavior
SchemaValidationBehaviorExtensionElement
SchemaValidationMessageInspector

      

This is my app.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>

    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
    </startup>
    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="MyNewService">
                  <security defaultAlgorithmSuite="Basic128" authenticationMode="MutualCertificate" requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true" messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" requireSignatureConfirmation="false">
                    <localClientSettings detectReplays="true"/>
                    <localServiceSettings detectReplays="true"/>
                  </security>
                    <textMessageEncoding messageVersion="Soap11WSAddressing10"/>
                    <httpsTransport/>

                </binding>
            </customBinding>
        </bindings>
        <client>
          <endpoint address="https://edottotest.sanita.regione.rsr.rupar.puglia.it/nsisr/PianoAssistenzialeResidenzialeService" binding="customBinding" bindingConfiguration="MyNewService" contract="PianoAssistenzialeResidenzialeService.PianoAssistenzialeResidenziale" name="PianoAssistenzialeResidenzialePort" >
            <identity>
              <dns value="HEALTHNETBR"/>

            </identity>

          </endpoint>

        </client>


    </system.serviceModel>
</configuration>

      

I think the problem is with this file.

+3


source to share





All Articles