Hi there.
I've been trying to trace the message encryption but it seems like the message in only signed (not encrypted).
I have configured the following operation contract in both service and client. and using WsHttpBinding
- [OperationContract(IsOneWay = true, ProtectionLevel = ProtectionLevel.EncryptAndSign)]
- void Execute(MessageType msg);
-
-
-
-
- [DataContract()]
- public class MessageType
- {
- private string m_batchName;
-
- [DataMember()]
- public string BatchName
- {
- get { return m_batchName; }
- set { this.m_batchName = value; }
- }
- }
[OperationContract(IsOneWay = true, ProtectionLevel = ProtectionLevel.EncryptAndSign)]
void Execute(MessageType msg);
//MessageType
[DataContract()]
public class MessageType
{
private string m_batchName;
[DataMember()]
public string BatchName
{
get { return m_batchName; }
set { this.m_batchName = value; }
}
}
The SOAP message result:
- <s:Body u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
- <Execute xmlns="http://tempuri.org/">
- <msg xmlns:a="http://schemas.datacontract.org/2004/07/MarketsoftService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
- <a:BatchName>REFORMAT-INPUT-DATA.BAT</a:BatchName>
- </msg>
- </Execute>
- </s:Body>
<s:Body u:Id="_0" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<Execute xmlns="http://tempuri.org/">
<msg xmlns:a="http://schemas.datacontract.org/2004/07/MarketsoftService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:BatchName>REFORMAT-INPUT-DATA.BAT</a:BatchName>
</msg>
</Execute>
</s:Body>
Notice that the batchName in the above SOAP message was not encrypted but it was signed.
any thoughts?