How to remove 'Security' SOAP header

Asked

Viewed 110 times

0

I am trying to consume a SOAP 1.2 web service using a WCF client. The problem is, whenever I make a request an exception MessageSecurityException occurs with the following internal message:

SOAP header Security was not understood

From what I understand, WS does not understand the header of "Security", which is currently marked as Mustunderstand = "true" in the SOAP envelope.

How can I change Mustunderstand to false / remove the header "Security"?

Below is the Binding I’m using now:

<customBinding>
  <binding name="CteRecepcaoSoap12">
    <textMessageEncoding messageVersion="Soap12" />
    <security authenticationMode="CertificateOverTransport"/>
    <httpsTransport requireClientCertificate="true"/>
  </binding>
</customBinding>
  • You have created a Web Reference or Service Reference?

  • @jbueno I created a Service Reference.

  • OK. And what is the extent of the service?

  • @jbueno WS uses ASMX, if that’s what you mean.

  • Remove the security header never is a good idea because it will allow Mitm attacks. That being said, there are ways to validate if the header is valid (which I do not have easy, sorry :( ).

  • @Ericwu agree, I suppose taking this header is a bad idea, but I don’t control that WS. I can only consume. Thanks for the input :)

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.