Question

I've just started on a project where I need to insert contacts into a SugarCRM system using the SOAP interface.

So far I have created a reference to the service http://sugar-dev.walkinwifi.net/soap.php?wsdl=sugarsoap

Then writen some code like this

public SugarHelper()
    {
        //Create a new instance of the client proxy
        this.sugarClient = new sugarsoapPortTypeClient();

        //Set the default value
        this.sessionId = String.Empty;
    }

    public bool Authenticate(string Username, string Password)
    {
        //Create an authentication object
        user_auth user = new user_auth();

        //Set the credentials
        user.user_name = Username;
        user.password = this.computeMD5String(Password);

        //Try to authenticate
        set_entry_result authentication_result = this.sugarClient.login(user, "");

this gives you the jest.

The last line gives me an exception when login is called.

The exception I get has an inner exception complaining it can't connect to https://sugar-dev.walkinwifi.net/soap.php

{"An error occurred while making the HTTP request to https://sugar-dev.walkinwifi.net/soap.php. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."}

Where does the https part come from? I have used no other reference other than http yet the error clearly states https.

Can I connect to SugarCRM soap via http or must I use https?

In all the examples I can find on the net it's http but most of them are php with very c# ones.

Was it helpful?

Solution

I'm looking in the wrong place. Inside the Soap configuration of Sugar you specify the url that will be used for soap calls. This is set to https://sugar-dev.walkinwifi.com.

Changed it to http and all is well.

OTHER TIPS

In any case, the SOAP services must also work over HTTPS. Personally I have not had any problems, even with a C # client. Verify that the server certificate and the certificate chain are valid.

Bye, Antonio.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top