title: MTOM messages must have type 'application/xop+xml'
body: <p>I'm using C# to call a Java Webservice.  Fiddler gives me a status of 200. So my call to the service is good.  But something in the .NET does not like my MTOM message.  Any ideas?  Here are all the details.  </p>
  
  <p>I'm getting this error:</p>
  
  <pre><code>MTOM messages must have type 'application/xop+xml'.
  </code></pre>
  
  <p>The stack trace says:</p>
  
  <pre><code>   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
     at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
     at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
     at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
     at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
     at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
     at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception&amp; requestException)
     at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
  
  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp; msgData, Int32 type)
     at ESARWS.ESAR.CORETransaction.COREEnvelopeBatchSubmission(COREEnvelopeBatchSubmissionRequest request)
     at ESARWS.ESAR.CORETransactionClient.ESARWS.ESAR.CORETransaction.COREEnvelopeBatchSubmission(COREEnvelopeBatchSubmissionRequest request) in C:\Project\xxxWS\Service References\ESAR\Reference.cs:line 665
     at ESARWS.ESAR.CORETransactionClient.COREEnvelopeBatchSubmission(String&amp; PayloadType, String&amp; ProcessingMode, String&amp; PayloadID, String PayloadLength, String&amp; TimeStamp, String&amp; SenderID, String&amp; ReceiverID, String&amp; CORERuleVersion, String&amp; CheckSum, String Payload, Byte[]&amp; Payload1, String&amp; ErrorCode, String&amp; ErrorMessage) in  C:\Project\xxxWS\Service References\ESAR\Reference.cs:line 681
     at ESARWS.ESAR278Operations.BatchSubmission() in C:\Project\xxxxOperations.cs:line 102
  </code></pre>
  
  <p>The text response from fiddler says this:</p>
  
  <pre><code>--MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/soap+xml; charset=utf-8
  Content-Transfer-Encoding: binary
  Content-ID: &lt;0.69a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd@apache.org&gt;
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;&lt;s:Header&gt;&lt;VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"&gt;uIDPoxsRrdQam4pCh9xnvaklXQ8AAAAAOsbNCp3TVE2fafQwhTHlfYnD2y/Y1ylFtm6h6if1ZaUACQAA&lt;/VsDebuggerCausalityData&gt;&lt;o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"&gt;&lt;o:BinarySecurityToken u:Id="x509bst_24" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-bc"&gt;&lt;/enc:EncryptionMethod&gt;&lt;enc:CipherData&gt;&lt;enc:CipherValue&gt;2VTxiub+ACsIUXe9zfgKBCfSeWB4/nfWYJ1nGo1rbKsHk2hVyYpL++V6ZmhzSKKvBuE55PmKipFTTheXUsYsnRRL/eTfwKK1tZsOxHPMQYdROChHnLfd7/TkymKxlVHtqs+OYp/d5JFjCSR&lt;enc:CipherValue&gt;ZuXZnEjQ+zcAjUQfobfk5s1CscqJ5CEu8Bpjxa/iaF/GLf44E+xRR++Jp96A0Oktp/iJC88cvjfPejj8/6oaOWQxwHBPKPvzjG3QlnuO5jqxhU4P7SlD1MlxB+b2gYCGCD0tDaNG0/Xji7IhEsJUXsbKBTHYyK1KsprVZodo+jJlWJ/WGby7JLsrp2dqf4henH5SS4LjPzHww5SDzZB59KoHRny1mjzuBaIhlXZi8EBCMxRlH1FaRNJ+ekQVDrore8MfJVlKGwGjlF8miUwxsIr3SMKekd1Xh3gMQ2BZ6h9sNRejTDuPTzZqbL4In0e6Dtfh9+7r8d2WbARtRAR/7j3ZiR+awgan6CdWXU73TUQ2mK10IS+WXDKs96VIIahhRqCS1fMZZdqthyYfJ6xQLWFECxorlXhZA+/MQgg25w2umraiR4lcQ1M/VXCTmnl1UDvP2ygD+Kvq2g/8mL+ZPJ6Wi/OCPEoe6olm0kRjkjComfeByypKVRfI6ht3gdf5rDyNJuXZ3UTjS8VNpJmN0V04gn9ZAQZThNnx3Oe+Xd+0F30EombtHkRLxPgxv+zn3NwDiUv175bvJ5HSeTtcFcoJ2slVnf7tO8im4Hd0eRd61suJr9qtxHJ/Wc/VCr6xEfEGuTHCgUGRwfqyo5ZjGICoSKmUWt+cDJFRDBLlqj5BacbTm1fJlr36mFsrVWvHh3ufRrguSDrCBirtfUBU3Gv/TsL+tc9so0tTbCYoXQB2JrEDFIcvX0fr9Vpqe3duwEsryVgKeUGGPflMFDEdY9TPXJjgGKcssG0D2RsJ7DCi3flSVGyCOkgfXfBgJcgIOHfuHCeg4eYe72hSLhZ6RXC8MxCS3SFay8ILY8kw/ampgwbLL2R8sjul/woCsTLH4q/rTLnXqCa0efoXxizcfsWr2RJnC9W85oAnwPwNS9g8qxiCZj6iEqxcCod/ZdA0&lt;/enc:CipherValue&gt;&lt;/enc:CipherData&gt;&lt;/enc:EncryptedData&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
  Content-Transfer-Encoding: binary
  Content-ID: &lt;http://tempuri.org/0&gt;
  
  &lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;&lt;s:Header&gt;&lt;VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"&gt;uIDPoxsRrdQam4pCh9xnvaklXQ8AAAAAOsbNCp3TVE2fafQwhTHlfYnD2y/Y1ylFtm6h6if1ZaUACQAA&lt;/VsDebuggerCausalityData&gt;&lt;o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;&lt;u:Timestamp u:Id="uuid-dd547292-aaba-4d74-979c-c9a3359907d9-1"&gt;&lt;u:Created&gt;2018-03-29T17:29:04.685Z&lt;/u:Created&gt;&lt;u:Expires&gt;2018-03-29T17:34:04.685Z&lt;/u:Expires&gt;&lt;/u:Timestamp&gt;&lt;o:BinarySecurityToken u:Id="uuid-5e4e7a78-9a34-4162-a428-e004ecf40ab2-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;&lt;xop:Include href="cid:http://tempuri.org/1/636579161448284066" xmlns:xop="http://www.w3.org/2004/08/xop/include"/&gt;&lt;/o:BinarySecurityToken&gt;&lt;e:EncryptedKey Id="_0" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"&gt;&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns="http://www.w3.org/2000/09/xmldsig#"/&gt;&lt;/e:EncryptionMethod&gt;&lt;KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;o:SecurityTokenReference&gt;&lt;o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;j0ZKFBmTz3Kj0cQ82rq63MYAR+0=&lt;/o:KeyIdentifier&gt;&lt;/o:SecurityTokenReference&gt;&lt;/KeyInfo&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;cnuxTT+iDwO1QEVeJzGexQ9oD5FDA89Q3vYQh6t9riAZa3yqKQFge2MqwWqpMWhEcVlzVuyGZPubCc1dRC1hihN1bVuteSL/PA691j43y9DAGqkEd0azMvbV6dPXTt9JqzNAjwCIEyJWUk4ROolRsODJpPGtLP+e0xiKozzxzEcK+7V8V5/oPB9l32SNR3guFuB2aaiS3WYno7vO3O7Caz7zixwaJAkt+ID7R9TNkUWS0zzASZlkSrA8KJlxXPIQgg9OPlMXARBC6FAYww/451lVGzfOf5YDgUNun+K63njHdavjv+SVMit4PLKncpAz+sEQNOY7CjhE3rqQwr4GCA==&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;e:ReferenceList&gt;&lt;e:DataReference URI="#_2"/&gt;&lt;e:DataReference URI="#_3"/&gt;&lt;/e:ReferenceList&gt;&lt;/e:EncryptedKey&gt;&lt;e:EncryptedData Id="_3" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;&lt;xop:Include href="cid:http://tempuri.org/2/636579161448324212" xmlns:xop="http://www.w3.org/2004/08/xop/include"/&gt;&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;/e:EncryptedData&gt;&lt;/o:Security&gt;&lt;/s:Header&gt;&lt;s:Body u:Id="_1"&gt;&lt;e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;x1yVM5WcwMDDsGk1qgJcdb7It8d1saFhE4Nr80LV1Hh6I2mUKev0IUzciTR/RtYjjqhfhun7ai/qjh9WfKpnLMxRi638fC9tWLl3aydrdIVqQN9/xdpwL0ky5xnLWQXWPPz9LipgvQ0nlmaTf2NPZW4KNH3N8BRJJj1XQFW2MDnfMPX5XhbQipDTaToJfkAgtHlCFCKBaVa/ZfEpI08JEH5SW2jFVgPT5DYvmh2ZETbHg9OWVzH5wJ7hEtbXvneNg6ycS6FvOv0q6F+8VVm7veY372s4UnKg3xJ3K/X75ufEQKggyL7GJVbTyGr0T97MMdwmMrGHQh6x+cW2l//ePUmnAiCXo8UabbqTxyUjioCnFXilQh8TruJBb0GMyT+3Gq6A+0Y36CxsF9An2OMgdE4utz/BD7rKPEaw/aK3YUmkYAGb0nJ3UAZXpRg3i1JGs8OPwGbk4xR5rIod7obBjaPPafx+RKazZUmpAhT/SjS2vtsnaZbazxJAwdTmXxnNrhxgUVt+jv5zpyvq7I8pUkiKY/fCf+POuXlqmyMUbvzhW2WoyMkc1goMpJTehnYi7IdBIM3MEOsBGtmR1HOdE5aEyApFsopavGpjZ7/sw4n+B+alwJTFyNVU/0LYvA+5KAROf4n+Ma+0rO0bJZQZB5W+nECansFqrJWhDmzx0MNKyQUdNn+NmTXCeBj5SfpATcBU9p3Ha7copmzZlRViH8Apb3kgTZllb7ZG0YWIyPu9s86c0eQqD45v/h95QfvUA+OHIgLGn1HQyrTGDoWkYFwXTWGCBSkLblv78QAxkcwS8WjZNhvL2BL6bh9gNfSGETvwRXFePHMkkqSH0dn7YNWjG0W7uF7/QweCOy1Y5+MkcXhHWFwZEF6+8Xa6Bw2iPQPmcNKNQco5Rzv/xNjQVk6q5PzSgvzn4pfGiXJsawMfEy3+t9312b3b9VWWgWa2&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;/e:EncryptedData&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/octet-stream
  Content-Transfer-Encoding: binary
  Content-ID: &lt;http://tempuri.org/1/636579161448284066&gt;
  
  0  0  !k 9 &lt; ? U ~0
      * H  
  </code></pre>
  
  <p>The raw response from fiddler says this:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Date: Thu, 29 Mar 2018 17:29:05 GMT
  X-Frame-Options: SAMEORIGIN
  X-Powered-By: Servlet/3.0
  $WSSP: 443
  $WSCS: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  MIME-Version: 1.0
  Host: cmsprovider.cahwnet.gov
  $WSXCTCONTEXTID: ddnLe4a6yksA2wDmR7cAAABx
  $WSSN: cmsprovider.cahwnet.gov
  $WSSI: mqZpzAd48yfwCOnOLIRvFsOJcGVwpTEBbE9DdjdIZDU=
  $WSRH: 10.186.112.31
  $WSSC: https
  $WSIS: true
  Surrogate-Capability: WS-ESI="ESI/1.0+"
  $WSRA: 10.186.112.31
  Expect: 100-continue
  _WS_HAPRT_WLMVERSION: -1
  Accept-Encoding: gzip, deflate
  X-Forwarded-For: 107.140.0.90
  $WSPR: HTTP/1.1
  Content-Length: 24061
  Keep-Alive: timeout=10, max=100
  Connection: Keep-Alive
  Content-Type: multipart/related; boundary="MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd"; type="application/soap+xml"; start="&lt;0.69a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd@apache.org&gt;"; action="http://interfaces.services.dhcs.ca.gov/CORETransaction/COREEnvelopeBatchSubmissionResponse"
  Content-Encoding: 
  Content-Language: en-US
  Strict-Transport-Security: max-age= 31536000
  X-FRAME-OPTIONS: SAMEORIGIN
  
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/soap+xml; charset=utf-8
  Content-Transfer-Encoding: binary
  Content-ID: &lt;0.69a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd@apache.org&gt;
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;&lt;s:Header&gt;&lt;VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"&gt;uIDPoxsRrdQam4pCh9xnvaklXQ8AAAAAOsbNCp3TVE2fafQwhTHlfYnD2y/Y1ylFtm6h6if1ZaUACQAA&lt;/VsDebuggerCausalityData&gt;&lt;o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1"&gt;&lt;o:BinarySecurityToken u:Id="x509bst_24" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/ds:DigestMethod&gt;&lt;/enc:EncryptionMethod&gt;&lt;ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;o:SecurityTokenReference&gt;&lt;o:Reference URI="#x509bst_24" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"&gt;&lt;/o:Reference&gt;&lt;/o:SecurityTokenReference&gt;&lt;/ds:KeyInfo&gt;&lt;enc:CipherData&gt;&lt;enc:CipherValue&gt;IHbdP4qSEJddE+oPn4MD0hlmhgOzm+4napoWcXpXzESMNwZkNUd2CyH+r0PXayvfUvU9fYj0vBnG5oJGzyJxyyF7Dkqy/bqUVo4myjBj2CudUigjJnOT1urz/0F9Kr9+v6U+oV3MfYKrKzb2COuco0qMBT70Y83s5BXV3l6JTi6IABDDzJpK7bMq2XW9+VGQ+xb1kv+id3iqWr2G2Oa/qGbXIDZQucJKj5pZPVGKui6oo+n7CkOC9MWtRxKcKxsvEaFTIXHqQAh14imsB+kcYmyg6y7qWbTuiiBmbjWkW5CnjQNPRYRz1fjmf63LCfvu0lZu+WUPQm/2NZrfs/6VMg==&lt;/enc:CipherValue&gt;&lt;/enc:CipherData&gt;&lt;enc:ReferenceList&gt;&lt;enc:DataReference URI="#wssecurity_encryption_id_22"&gt;&lt;/enc:DataReference&gt;&lt;enc:DataReference URI="#wssecurity_encryption_id_23"&gt;&lt;/enc:DataReference&gt;&lt;/enc:ReferenceList&gt;&lt;/enc:EncryptedKey&gt;&lt;enc:EncryptedData xmlns:enc="http://www.w3.org/2001/04/xmlenc#" Id="wssecurity_encryption_id_23" Type="http://www.w3.org/2001/04/xmlenc#Element"&gt;&lt;enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"&gt;&lt;/enc:EncryptionMethod&gt;&lt;enc:CipherData&gt;&lt;enc:CipherValue&gt;2VTxiub+ACsIUXe9zfgKBCfSeWB4/nfWYJ1nGo1rbKsHk2hVyYpL++V6ZmhzSKKvBuE55PmKipFTTheXUsYsnRRL/eTfwKK1tZsOxHPMQYdROChHnLfd7/TkymKxlVHtqs+OYp/d5JFjCSR29aBJpccPJVECv7EkNWcj4nDVFkq7y4PCvEZIY94nTYGWg8whTj31onZJ4wI2Kn5AQQKvA3YjpE8gA6401VWE6ea8xgD5hP0jF6hDzu018NOGhcpnHUqsRCcbV9n9+7xu1jHDqrAoAhYaGqKESZ9+ZJGCKwlQ/+Cq8X8xb0Http1ZQqNcBHpNqgDIJaMMHgMhaSMC9sexTet3Futfd38AVMu5OFEmN9Z3EByHlBHErVkX1MVhnVWNMZwy+BAzAZU8joNBkOA1VyuHc5NY08/5x4lZwBfQOGWSfnITEw2FX1orY8P7+5ORJM0EMS60rpxUztIw2Uozz19kp3adXBu5DNCYISferOmUMVuUX//oiUULYUKPMVnycUxiCHJpsVCylRuu6ZAA22Ro6nexSXQD1xEb/Aku3ne0QqJaQIRDosW/iBGUPLBe4g/G+lRCZ3g/9isJDD4pyhtc09bdc0648kcmMXA512C/nIbh+jhRaw9e4N3lKwNjXLBdEhZckT4BNXsA/LUgfWZQ6HJDtewoKjMnAiJg1rgoizXjbTQidg89cwqo3GINcdHNAaxdP+65/Y86zJ34rWOJlE3DyTgRWnFtwPkUdSkJxkRLqhzUyNpFP67VWifrzq7kz2GSSO0aZtJCVxWkWtOKZxur65A6ONNP83fNRA62645gwPgB9JoGJTHaNNc3s4TxhCCBoeyLbiEEmml6ezJ/Y55/rYRvrJmRDMM=&lt;/enc:CipherValue&gt;&lt;/enc:CipherData&gt;&lt;/enc:EncryptedData&gt;&lt;u:Timestamp u:Id="uuid-dd547292-aaba-4d74-979c-c9a3359907d9-1"&gt;&lt;u:Created&gt;2018-03-29T17:29:04.685Z&lt;/u:Created&gt;&lt;u:Expires&gt;2018-03-29T17:34:04.685Z&lt;/u:Expires&gt;&lt;/u:Timestamp&gt;&lt;o:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" u:Id="uuid-5e4e7a78-9a34-4162-a428-e004ecf40ab2-2"&gt;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&lt;/o:BinarySecurityToken&gt;&lt;ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;ds:SignedInfo&gt;&lt;ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="u s o ds "&gt;&lt;/ec:InclusiveNamespaces&gt;&lt;/ds:CanonicalizationMethod&gt;&lt;ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"&gt;&lt;/ds:SignatureMethod&gt;&lt;ds:Reference URI="#wssecurity_sigconf_id_20"&gt;&lt;ds:Transforms&gt;&lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="u s o wsse11 wsu "&gt;&lt;/ec:InclusiveNamespaces&gt;&lt;/ds:Transform&gt;&lt;/ds:Transforms&gt;&lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/ds:DigestMethod&gt;&lt;ds:DigestValue&gt;bl7AQkFZ5cTPILAHFp+GF0UYyYg=&lt;/ds:DigestValue&gt;&lt;/ds:Reference&gt;&lt;ds:Reference URI="#_1"&gt;&lt;ds:Transforms&gt;&lt;ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="u s i #default "&gt;&lt;/ec:InclusiveNamespaces&gt;&lt;/ds:Transform&gt;&lt;/ds:Transforms&gt;&lt;ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/ds:DigestMethod&gt;&lt;ds:DigestValue&gt;WrjOtxXRuZnQVkNtcE/Ol3Zlby8=&lt;/ds:DigestValue&gt;&lt;/ds:Reference&gt;&lt;/ds:SignedInfo&gt;&lt;ds:SignatureValue&gt;Koma0Xhfp0EdKXKjk4IXKpQF81IpwQemGkb9KOCV9XZsJDZ3Sx/LeUGEG4R3detuopridaCHBl2fzKkPgJtqfTk3CwVP53gWbj4f3YmNlT8iWzLCskQRpBsl8Y/0vla8FZv28QQERg1t32Hs2LgEm6rBTnvRu2Q1R8ZgEEqmZkFVMj7H38BH8G/krqyIku0wjXenpIL3u2F3Ko2iZRc7D7qr3x6AAjEUMClOWOBsR0ey7XQHQcp3nsspkly65HGcCeEkD2r9MEIVEvDpg0nvNtQavsRtzww5MMdLkzQPfVyanxEEHn+1va477qxQwxJrumC2Gq+24Ip0sR4/ciIRNw==&lt;/ds:SignatureValue&gt;&lt;ds:KeyInfo&gt;&lt;o:SecurityTokenReference&gt;&lt;o:Reference URI="#x509bst_21" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"&gt;&lt;/o:Reference&gt;&lt;/o:SecurityTokenReference&gt;&lt;/ds:KeyInfo&gt;&lt;/ds:Signature&gt;&lt;e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#" Id="_0"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"&gt;&lt;DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/DigestMethod&gt;&lt;/e:EncryptionMethod&gt;&lt;KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;o:SecurityTokenReference&gt;&lt;o:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"&gt;j0ZKFBmTz3Kj0cQ82rq63MYAR+0=&lt;/o:KeyIdentifier&gt;&lt;/o:SecurityTokenReference&gt;&lt;/KeyInfo&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;cnuxTT+iDwO1QEVeJzGexQ9oD5FDA89Q3vYQh6t9riAZa3yqKQFge2MqwWqpMWhEcVlzVuyGZPubCc1dRC1hihN1bVuteSL/PA691j43y9DAGqkEd0azMvbV6dPXTt9JqzNAjwCIEyJWUk4ROolRsODJpPGtLP+e0xiKozzxzEcK+7V8V5/oPB9l32SNR3guFuB2aaiS3WYno7vO3O7Caz7zixwaJAkt+ID7R9TNkUWS0zzASZlkSrA8KJlxXPIQgg9OPlMXARBC6FAYww/451lVGzfOf5YDgUNun+K63njHdavjv+SVMit4PLKncpAz+sEQNOY7CjhE3rqQwr4GCA==&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;e:ReferenceList&gt;&lt;e:DataReference URI="#_2"&gt;&lt;/e:DataReference&gt;&lt;e:DataReference URI="#_3"&gt;&lt;/e:DataReference&gt;&lt;/e:ReferenceList&gt;&lt;/e:EncryptedKey&gt;&lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;SignedInfo&gt;&lt;CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/CanonicalizationMethod&gt;&lt;SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"&gt;&lt;/SignatureMethod&gt;&lt;Reference URI="#_1"&gt;&lt;Transforms&gt;&lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/Transform&gt;&lt;/Transforms&gt;&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/DigestMethod&gt;&lt;DigestValue&gt;AwssDd3r2f/yalXQqjuVNtobYEE=&lt;/DigestValue&gt;&lt;/Reference&gt;&lt;Reference URI="#uuid-dd547292-aaba-4d74-979c-c9a3359907d9-1"&gt;&lt;Transforms&gt;&lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;&lt;/Transform&gt;&lt;/Transforms&gt;&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"&gt;&lt;/DigestMethod&gt;&lt;DigestValue&gt;DnRZFvMeGWbXIFZC9eazceOKQNY=&lt;/DigestValue&gt;&lt;/Reference&gt;&lt;/SignedInfo&gt;&lt;SignatureValue&gt;XKc+NAH/icmpLv3aLua6eP73P0gn40okPbVDivaR0RPVjKpOfEk798U+VYK/oKDesZ4JSknrfegqXn+U8gh0ci9cXngQ+8OghsoGQ2ve0gZIIWEWwBL4N9RdNYp6uaQoDYr3356rJ16teyIgxsmQNv7NkdqPVdCgtJcAXFguyte89cnAvfxWQxh3R2/D9uEBw6rLbRPMBcaVh+y1yj2V+GMnnhKiLPoU7qm6H1kJIdYfiWBvorSsGPGiPpFINliWVSg1KwpzJHNRa7eg8pqAqxSdKyF5ytCZBH/R08+/qIbC+zvXDnDPTLds8cOBwHZJ8oXhFDqTAuaDattaX6dwkA==&lt;/SignatureValue&gt;&lt;KeyInfo&gt;&lt;o:SecurityTokenReference&gt;&lt;o:Reference URI="#uuid-5e4e7a78-9a34-4162-a428-e004ecf40ab2-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"&gt;&lt;/o:Reference&gt;&lt;/o:SecurityTokenReference&gt;&lt;/KeyInfo&gt;&lt;/Signature&gt;&lt;/o:Security&gt;&lt;/s:Header&gt;&lt;s:Body u:Id="_1"&gt;&lt;enc:EncryptedData xmlns:enc="http://www.w3.org/2001/04/xmlenc#" Id="wssecurity_encryption_id_22" Type="http://www.w3.org/2001/04/xmlenc#Content"&gt;&lt;enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"&gt;&lt;/enc:EncryptionMethod&gt;&lt;enc:CipherData&gt;&lt;enc:CipherValue&gt;ZuXZnEjQ+zcAjUQfobfk5s1CscqJ5CEu8Bpjxa/iaF/GLf44E+xRR++Jp96A0Oknf7tO8im4Hd0eRd61suJr9qtxHJ/Wc/VCr6xEfEGuTHCgUGRwfqyo5ZjGICoSKmUWt+cDJFRDBLlqj5BacbTm1fJlr36mFsrVWvHh3ufRrguSDrCBirtfUBU3Gv/TsL+tc9so0tTbCYoXQB2JrEDFIcvX0fr9Vpqe3duwEsryVgKeUGGPflMFDEdY9TPXJjgGKcssG0D2RsJ7DCi3flSVGyCOkgfXfBgJcgIOHfuHCeg4eYe72hSLhZ6RXC8MxCS3SFay8ILY8kw/ampgwbLL2R8sjul/woCsTLH4q/rTLnXqCa0efoXxizcfsWr2RJnC9W85oAnwPwNS9g8qxiCZj6iEqxcCod/ZdA0&lt;/enc:CipherValue&gt;&lt;/enc:CipherData&gt;&lt;/enc:EncryptedData&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
  Content-Transfer-Encoding: binary
  Content-ID: &lt;http://tempuri.org/0&gt;
  
  &lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;&lt;s:Header&gt;&lt;VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"&gt;uIDPoxsRrdQam4pCh9xnvaklXQ8AAAAAOsbNCp3TVE2fafQwhTHlfYnD2y/Y1ylFtm6h6if1ZaUACQAA&lt;/VsDebuggerCausalityData&gt;&lt;o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt;&lt;u:Timestamp u:Id="uuid-dd547292-aaba-4d74-979c-c9a3359907d9-1"&gt;&lt;u:Created&gt;2018-03-29T17:29:04.685Z&lt;/u:Created&gt;&lt;u:Expires&gt;2018-03-29T17:34:04.685Z&lt;/u:Expires&gt;&lt;/u:Timestamp&gt;&lt;o:BinarySecurityToken u:Id="uuid-5e4e7a78-9a34-4162-a428-e004ecf40ab2-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;&lt;xop:Include href="cid:http://tempuri.org/1/636579161448284066" xmlns:xop="http://www.w3.org/2004/08/xop/include"/&gt;&lt;/o:BinarySecurityToken&gt;&lt;e:EncryptedKey Id="_0" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"&gt;&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns="http://www.w3.org/2000/09/xmldsig#"/&gt;&lt;/e:EncryptionMethod&gt;&lt;KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;o:SecurityTokenReference&gt;&lt;o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"&gt;j0ZKFBmTz3Kj0cQ82rq63MYAR+0=&lt;/o:KeyIdentifier&gt;&lt;/o:SecurityTokenReference&gt;&lt;/KeyInfo&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;cnuxTT+iDwO1QEVeJzGexQ9oD5FDA89Q3vYQh6t9riAZa3yqKQFge2MqwWqpMWhEcVlzVuyGZPubCc1dRC1hihN1bVuteSL/PA691j43y9DAGqkEd0azMvbV6dPXTt9JqzNAjwCIEyJWUk4ROolRsODJpPGtLP+e0xiKozzxzEcK+7V8V5/oPB9l32SNR3guFuB2aaiS3WYno7vO3O7Caz7zixwaJAkt+ID7R9TNkUWS0zzASZlkSrA8KJlxXPIQgg9OPlMXARBC6FAYww/451lVGzfOf5YDgUNun+K63njHdavjv+SVMit4PLKncpAz+sEQNOY7CjhE3rqQwr4GCA==&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;e:ReferenceList&gt;&lt;e:DataReference URI="#_2"/&gt;&lt;e:DataReference URI="#_3"/&gt;&lt;/e:ReferenceList&gt;&lt;/e:EncryptedKey&gt;&lt;e:EncryptedData Id="_3" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;&lt;xop:Include href="cid:http://tempuri.org/2/636579161448324212" xmlns:xop="http://www.w3.org/2004/08/xop/include"/&gt;&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;/e:EncryptedData&gt;&lt;/o:Security&gt;&lt;/s:Header&gt;&lt;s:Body u:Id="_1"&gt;&lt;e:EncryptedData Id="_2" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;&lt;e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/&gt;&lt;e:CipherData&gt;&lt;e:CipherValue&gt;x7uF7/QweCOy1Y5+MkcXhHWFwZEF6+8Xa6Bw2iPQPmcNKNQco5Rzv/xNjQVk6q5PzSgvzn4pfGiXJsawMfEy3+t9312b3b9VWWgWa2&lt;/e:CipherValue&gt;&lt;/e:CipherData&gt;&lt;/e:EncryptedData&gt;&lt;/s:Body&gt;&lt;/s:Envelope&gt;
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd
  Content-Type: application/octet-stream
  Content-Transfer-Encoding: binary
  Content-ID: &lt;http://tempuri.org/1/636579161448284066&gt;
  
  0  0  !k 9 &lt; ? U ~0
  B   ͹ D   O$" p` 2϶l $ S G= "s1 1\K(  0 K k i   
  )Q 6   x;   $ JKmg '  \ 3      ا     A    l  F  Ew l Y*:L  , K  L ٞ * ̟ ) t7,L  r՛ JY I ,
  --MIMEBoundary_79a945e87ba858f448c98d77b4a80ffb5d7e70ea4b3491dd--
  </code></pre>
  
  <p>App.config file:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;diagnostics&gt;
        &lt;messageLogging
             logEntireMessage="true"
             logMalformedMessages="false"
             logMessagesAtServiceLevel="true"
             logMessagesAtTransportLevel="false"
             maxMessagesToLog="3000"
             maxSizeOfMessageToLog="2000"/&gt;
      &lt;/diagnostics&gt;
      &lt;client&gt;
        &lt;endpoint address="https://xxxxxxx/ESARWS/CORETransactionService"
          behaviorConfiguration="endpointCredentialBehavior" binding="customBinding"
          bindingConfiguration="esar" contract="ESAR.CORETransaction"
          name="CoreSoapPort"&gt;
          &lt;identity&gt;
            &lt;dns value="xxxxxxxx" /&gt;
          &lt;/identity&gt;
        &lt;/endpoint&gt;
      &lt;/client&gt;
     &lt;behaviors&gt;
       &lt;endpointBehaviors&gt;  
          &lt;behavior name="endpointCredentialBehavior"&gt; 
            &lt;clientCredentials&gt;  
              &lt;clientCertificate findValue="xxxxxxxxxxxxxx"
                                 storeLocation="CurrentUser"
                                 storeName="My"
                                 x509FindType="FindBySubjectName"/&gt;
  
             &lt;serviceCertificate&gt;
                &lt;defaultCertificate findValue="xxxxxxxxxxxxx"
                                 storeLocation="CurrentUser"
                                 storeName="AddressBook"
                                 x509FindType="FindBySubjectName" /&gt;   
             &lt;/serviceCertificate&gt;
            &lt;/clientCredentials&gt;  
          &lt;/behavior&gt;  
       &lt;/endpointBehaviors&gt;  
    &lt;/behaviors&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="BasicHttpBinding_IService1" /&gt;
        &lt;/basicHttpBinding&gt;
        &lt;customBinding&gt;
          &lt;binding name="esar"&gt;
            &lt;security defaultAlgorithmSuite="Basic128" authenticationMode="MutualCertificate"
              requireDerivedKeys="false" includeTimestamp="true" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" /&gt;
            &lt;mtomMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" maxBufferSize="2147483647"
              messageVersion="Soap12" writeEncoding="utf-8"&gt;
              &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
            &lt;/mtomMessageEncoding&gt;
            &lt;httpsTransport /&gt;
          &lt;/binding&gt;
        &lt;/customBinding&gt;
      &lt;/bindings&gt;
  
  
  &lt;/system.serviceModel&gt; 
  </code></pre>