WCF services with a number of different methods (endpoints)

0

I took a project that uses WCF and I am not able to unravel this mystery.

I have two solutions: Project A and Project . When it attempts to instantiate OAuthServiceClient within Project B , it generates the following error:

  

Could not find default endpoint element of contract references 'SSOWebService.IOAuthService' in the ServiceModel client configuration section.

Environment code Environment.ServiceModelClients.config

<client>
  <endpoint address="http://sso.fundacao.interno/SSO/WebServices/OAuthService.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IOAuthService"
            contract="OAuthService.IOAuthService" name="BasicHttpBinding_IOAuthService" />
</client>

This happens, I believe, by the difference in the amount of WCF methods in Project B (30 endpoints) and Project A > (15 endpoints).

P.S. When I parse the code again I realize that there are 5 constructors within the Reference.cs file that are not defined inside the interface

public interface IOAuthService {

    [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOAuthService/IsValidToken", ReplyAction="http://tempuri.org/IOAuthService/IsValidTokenResponse")]
    LoginResult IsValidToken(string token, string appClientID);

    // mais 29 outros métodos
        ....
    }

And there are 5 builders in the implementation, which I can define from where they are being inherited

public partial class OAuthServiceClient : System.ServiceModel.ClientBase<IOAuthService>, IOAuthService {

public OAuthServiceClient() {

}

public OAuthServiceClient(string endpointConfigurationName) : 
        base(endpointConfigurationName) {
}

//... outros construtores

public LoginResult IsValidToken(string token, string appClientID) {
        return base.Channel.IsValidToken(token, appClientID);
}

//outros 29 métodos
....
    
asked by anonymous 10.12.2018 / 13:55

1 answer

0

Hello, I just solved the problem by simply deleting and adding the service references again.

    
11.12.2018 / 11:59