You need to sign in to do that
Don't have an account?

Error calling my .NET web service from Apex code
I am trying to call my .NET web service from Apex code and would like
some help and advise (I a newbie ;) I added my web service URL in
the Remote Site Settings area and generated an Apex Code object from my WSDL.
I created an S-Control to call my Apex Code and it fails. When I copied the Apex
code into Apex Log Debug window and Execute, I receive the follow error. Any clues?
I suspect my WSDL or generated an Apex Code object from my WSDL is at fault.
Any links or example references (beyond Hello World) would be great too!
Chris
13:39:21 DEBUG - Executing: SymphonieApiWs.SymphonieWsSoap api = new SymphonieApiWs.SymphonieWsSoap(); SymphonieApiWs.LoginResult loginInfo = api.Login('customer', 'login', 'pw');13:39:21 DEBUG - Executing: SymphonieApiWs.SymphonieWsSoap api = new SymphonieApiWs.SymphonieWsSoap();
SymphonieApiWs.LoginResult loginInfo = api.Login('customer', 'login', 'pw');
13:39:23 INFO - 20070830203922.736:Class.SymphonieApiWs.SymphonieWsSoap.Login: line 296, column 13:13:39:23 INFO - 20070830203922.736:Class.SymphonieApiWs.SymphonieWsSoap.Login: line 296, column 13:
Created Web Service callout to endpoint: https://symphonie.goolara.net/Api/SymphonieApiWs.asmx 20070830203922.736:Class.SymphonieApiWs.SymphonieWsSoap.Login: line 296, column 13:
Sending callout request System.CalloutException: Web service callout failed: Unauthorized or inactive endpoint, please
check Setup->Security->Remote site settings.
endpoint = https://symphonie.goolara.net/Api/SymphonieApiWs.asmx Class.SymphonieApiWs.SymphonieWsSoap.Login: line 296, column 13 AnonymousBlock: line 2, column 40
Created Web Service callout to endpoint:
https://symphonie.goolara.net/Api/SymphonieApiWs.asmx 20070830203922.736:Class.SymphonieApiWs.SymphonieWsSoap.
Login: line 296, column 13: Sending callout request System.CalloutException: Web service callout failed:
Unauthorized or inactive endpoint, please check Setup->Security->Remote site settings.
endpoint = https://symphonie.goolara.net/Api/SymphonieApiWs.asmx Class.SymphonieApiWs.SymphonieWsSoap.Login:
line 296, column 13 AnonymousBlock: line 2, column 40
13:39:23 ERROR - Evaluation error: System.CalloutException: Web service callout failed:13:39:23 ERROR - Evaluation error: System.CalloutException: Web service callout failed: Unauthorized
Unauthorized or inactive endpoint, please check Setup->Security->Remote site settings.
endpoint = https://symphonie.goolara.net/Api/SymphonieApiWs.asmx
or inactive endpoint, please check Setup->Security->Remote site settings.
endpoint = https://symphonie.goolara.net/Api/SymphonieApiWs.asmx
13:39:23 ERROR - Evaluation error: Class.SymphonieApiWs.SymphonieWsSoap.Login: line 296, column 13 AnonymousBlock: line 2, column 40
The WSDL I had generated via VS.NET included bindings for both 'soap' and 'soap12'. SalesForce ONLY wants 'soap', so I had to modify the WSDL to eliminate the Soap12 bindings.
The WSDL generated by VS.NET includes bindings for BOTH 'soap' and 'soap12'.
SalesForce ONLY wants 'soap', so I had to modify the WSDL to eliminate the Soap12 bindings. (Near the end of the file)
Chris
Typically what happens is the call goes to your server, but that has some kind of unhandled exception, and so the server returns an HTML error page, instead of a SOAP message.
Cheers
Simon