|
Question : WS-Security and WSDL
|
|
Is there any way to define your WS-Security requirements in WSDL?
I have a service that requires a Username token, a MessageSignature, and EncryptedData. How should the service consumer know this, if not for WSDL?
References would be helpful.. :)
Thanks.
(Specifically, I'm writing this web service in C#, .NET Framework 1.1, WSE 2.0)
|
|
Answer : WS-Security and WSDL
|
|
U can have a SoapExtension Attribute in the Header. Then u can use the SoapHeaderAttribute to specify the tokens. These SoapHeaderAttributes represent a property that can be set and also retrieved.
[SoapExtension] [SoapHeaderAttribute("UserProfile", Direction=SoapHeaderDirection.In)] [SoapHeaderAttribute("MessageProfile", Direction=SoapHeaderDirection.InOut)] [SoapHeaderAttribute("DataClass", Direction=SoapHeaderDirection.InOut)]
Then u can have three classe called UserProfile,MessageProfile and DataClass
MessageProfile will have a property called MessageSignature UserProfile can have a property called Username DataClass can have a property called EncryptedData.
Or u can have all the three properties in the same class
|
|
|
|