I am using WCF to talk to a Java web service. This Web service contains a method called Authentication, which returns the session ID. In this case, every request for this web service should be in the SOAP header.
I have googled it for no profit, the closest thing I can get She told me that I can complete it on the channel layer, but did not give any examples.
Note that I want to do this in the proxy class, not the proxy class in the code, thus those who call proxy class do not have to worry about automatic authentication again. I inherited from the auto generated proxy and am doing the WCF configuration program.
I will try wrapping a "gator" for your WCF client, such as before all calls , The authentication function is called.
public WCFClient GetServiceInstance () {client.DoAuth (); Return customer; }
You can add conditional to this method only call DoAuth () every 1 minute or more.
Comments
Post a Comment