I'm currently trying to work with the SugarCRM Soap/WSDL from Visual Studio in C#. Whenever I make a call to the servi开发者_如何学Goce I get a 404 - not found exception back, although I can perfectly add the service when entering the URL in Visual Studio.
My code is as follows:
public void Login()
{
//Create an authentication object
user_auth user = new user_auth();
//Set the credentials
user.user_name = "myusername";
user.password = this.computeMD5String("mypass");
//Try to authenticate
set_entry_result authentication_result = this.sugarService.login(user, "");
//Check for errors
if (Convert.ToInt32(authentication_result.error.number) != 0)
{
//An error occured
this.Session = String.Concat(authentication_result.error.name, ": ",
authentication_result.error.description);
//Clear the existing sessionId
this.Session = String.Empty;
}
else
{
//Set the sessionId
this.Session = authentication_result.id;
//Clear the existing error
this.Error = String.Empty;
}
}
Have anyone experienced this before? :-)
Any help/hint is greatly appreciated!
Thanks in advance.
/ Bo
Try using one of these url substituting your domain. Also add directory if not installed at root.
http://mydomain/service/v2/soap.php?wsdl or http://mydomain/service/v2_1/soap.php?wsdl
You hav to use the URL http://myCRMdomain.com/soap.php?wsdl
精彩评论