You need to sign in to do that
Don't have an account?
Mark Jeffrey
Apex webservice
I have an Apex webservice that I am trying to consume from a simple .net website. I can login into Salesforce using the Enterprise WSDL or the Partnerservice WSDL. But when I try to call the class I get the following error.
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 96.43.150.232:443 at System.Net.Sockets.Socket.DoConnect
This is connecting to a Sandbox environment.
Any ideas please?
This is my Apex class
global class PAVE_ProjectWebService
{
webservice static List<PAVE_Project__c> getProjectProposal(String strFilter)
{
String SOQL;
SOQL = 'SELECT Project_Name__c,PAVE_Site__r.Name,Status__c FROM PAVE_Project__c ';
if (strFilter != null) SOQL += 'WHERE ' + strFilter;
return Database.query(SOQL);
}
}
I have generated the WSDL for the class.
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 96.43.150.232:443 at System.Net.Sockets.Socket.DoConnect
This is connecting to a Sandbox environment.
Any ideas please?
This is my Apex class
global class PAVE_ProjectWebService
{
webservice static List<PAVE_Project__c> getProjectProposal(String strFilter)
{
String SOQL;
SOQL = 'SELECT Project_Name__c,PAVE_Site__r.Name,Status__c FROM PAVE_Project__c ';
if (strFilter != null) SOQL += 'WHERE ' + strFilter;
return Database.query(SOQL);
}
}
I have generated the WSDL for the class.
It is NOT looks like error generated by salesforce. After quick glance on stackexnange I guess it can be an issue with proxy or firewall.
All Answers
It is NOT looks like error generated by salesforce. After quick glance on stackexnange I guess it can be an issue with proxy or firewall.
Thanks for your reply. The issue was that I was trying to test the web service from .NET when hosted locally, not from a web server.
After changing the proxy server settings in IE the web service was consumed successfully. So once deployed to a .NET web server I should not experience this problem. But thanks for pointing me in the right direction.
Regards
Mark