none
How to configure a WCF Webservice to process the following message RRS feed

  • Question

  • I have to develop a WebService using WCF. This Webservice will be accessed by a third party platform and it must implement certain requisites.

    The information provided by the third party is:

    <u5:p></u5:p>From this I understand that I need a binding like the following:

          <customBinding>

            <binding name="bindingAOC">

              <textMessageEncoding messageVersion="Soap11" />

              <httpTransport />

            </binding>

          </customBinding>

     

    But, how can I specify the signature of the body and the use of a timestamp?

    A sample of the message delivered by the third party service: https://www.dropbox.com/s/bsv0svc9o71sl3e/peticio.xml


    Friday, November 22, 2013 6:34 PM

Answers

  • Hi,

    >> how can I specify the signature of the body?

    If you are using a binding that applies security at the transport level, all application data will be secured according to the capabilities of the transport.

    If you are considering using a binding that applies security at the message level, then application data will be secured according to the protection levels set on the contract.

    It should be something like this:

    [ServiceContract(ProtectionLevel = ProtectionLevel.Sign)]
    {
        [OperationContract]
        int Price();
    }
    Or you can just set it in the OperationContract:
    [ServiceContract()]
    public interface IPurchaseOrder
    {
        [OperationContract(ProtectionLevel = ProtectionLevel.Sign)]
        int Price();
    }
    

    For more information, please try to refer to the following article:
    #Understanding Protection Level:
    http://msdn.microsoft.com/en-us/library/aa347692.aspx .

    #How to: Set the ProtectionLevel Property:
    http://msdn.microsoft.com/en-us/library/aa347791.aspx .

    >>use of a timestamp?

    For how to use the timestamp, please try to check the following article:
    #How to: Define and Process SOAP Headers:
    http://msdn.microsoft.com/en-us/library/vstudio/8728chd5(v=vs.100).aspx .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, November 25, 2013 2:42 AM
    Moderator