Click here to Skip to main content
12,072,640 members (63,152 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# .NET WCF .NET4
I have a WCF service with the below service\operation\data contracts.

namespace Enrollment
       [ServiceContract(Namespace = "")]
       public interface wstep
           [OperationContract(Action = "", Name = "RequestSecurityToken")]
           RequestSecurityTokenResponseCollection RequestSecurityToken(string TokenType, string RequestType, BinarySecurityToken binarySecurityToken, AdditionalContext additionalContext);
   [DataContract(Namespace = "")]
       public class AdditionalContext
           public List<ContextItem> contextItem { get; set; }
   [DataContract(Namespace = "")]
       public class ContextItem
           public string Name { get; set; }
           public object Item { get; set; }
       [DataContract(Namespace = "", Name = "BinarySecurityToken")]
       public class BinarySecurityToken
           [DataMember(Name = "ValueType",Order=1)]
           public string ValueType { get; set; }
           [DataMember(Name = "EncodingType", Order = 2)]
           public string EncodingType { get; set; }

However, I see that the client connects to the service but the last two parameters of the Operation - BinarySecurityToken and AdditionalContext are null when I check their values in the service. I have traced the client request, and I see the values are sent by the client correctly. The below mentioned is the SOAP body.

               <wsse:BinarySecurityToken ValueType="" EncodingType="">MIICcTCCAV0CAQAwMDEuMCwGA1UEAxMlQj=</wsse:BinarySecurityToken>
               <ac:AdditionalContext xmlns="">
                   <ac:ContextItem Name="DeviceType">
                   <ac:ContextItem Name="ApplicationVersion">

The first two parameters are showing up correctly. No idea what is going on.
Posted 27-Jan-13 22:30pm
Edited 28-Jan-13 0:19am
Joezer BH38.4K

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160208.1 | Last Updated 28 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100