You need to sign in to do that
Don't have an account?
Steve Inman
SOAP API fail on one computer within our organization
Hi,
We have been using the SOAP API calls for a couple of years without issue.
On one of our machines which was recently given a fresh image, we are unable to communicate with the SOAP interface when connecting to Salesforce within Python.
I've tried connecting to both:
https://test.salesforce.com/services/Soap/u/32.0
and
https://login.salesforce.com/services/Soap/u/32.0
I have disabled all firewalls and still no luck from one machine on our network.
Is there an easy way to validate that Salesforce is even receiving the call from this machine as a standard Salesforce error message isn't being returned.
Thanks,
Steve
We have been using the SOAP API calls for a couple of years without issue.
On one of our machines which was recently given a fresh image, we are unable to communicate with the SOAP interface when connecting to Salesforce within Python.
I've tried connecting to both:
https://test.salesforce.com/services/Soap/u/32.0
and
https://login.salesforce.com/services/Soap/u/32.0
I have disabled all firewalls and still no luck from one machine on our network.
Is there an easy way to validate that Salesforce is even receiving the call from this machine as a standard Salesforce error message isn't being returned.
Thanks,
Steve
Also, I know this sounds ... overly simple, but check your hosts file to make sure there's not a DNS resolution issue?
We were using a modified version of the Soap4r ruby gem. With Ruby / that gem, I can basically dump the entire "wire conversation" -- what the client is sending and recieving from the SF server to the screen to debug things. Generated about 19 pages of very unformated text. I searched that in Sublime text for "ERR" and saw that it was failing to validate the new 2048b certs.
I would assume that something similar is possible with python, but I don't know how. (I don't do python)
Looks like you are spot-on with the certificate error. I added the httplib and requests module to my Python install and embedded the try within the login call in the beatbox modules. I get the error below. Now that being known, how did you go about correcting the certificate error? Are there steps you followed with the client you fixed this for?
send: 'GET /services/Soap/u/32.0 HTTP/1.1\r\nHost: test.salesforce.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.5.3 CPython/2.7.9 Windows/7\r\n\r\n'
reply: 'HTTP/1.1 405 GET not supported\r\n'
header: Date: Wed, 04 Mar 2015 20:10:49 GMT
header: Set-Cookie: BrowserId=AEowaw4kQUKmCszgfiUeaA;Path=/;Domain=.salesforce.com;Expires=Sun, 03-May-2015 20:10:49 GMT
header: Content-Type: text/html;charset=ISO-8859-1
header: Cache-Control: must-revalidate,no-cache,no-store
header: Content-Length: 1401
Traceback (most recent call last):
File "C:\myCode\SFDC\test_beatbox_call2.py", line 34, in <module>
requests.get(sf_client.login(sf_username, sf_password))
File "C:\Python27\lib\site-packages\beatbox\python_client.py", line 76, in login
res = BaseClient.login(self, username, passwd)
File "C:\Python27\lib\site-packages\beatbox\_beatbox.py", line 78, in login
lr = LoginRequest(self.serverUrl, username, password).post()
File "C:\Python27\lib\site-packages\beatbox\_beatbox.py", line 344, in post
conn.request("POST", path, self.makeEnvelope(), headers)
File "C:\Python27\lib\httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "C:\Python27\lib\httplib.py", line 1035, in _send_request
self.endheaders(body)
File "C:\Python27\lib\httplib.py", line 997, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 850, in _send_output
self.send(msg)
File "C:\Python27\lib\httplib.py", line 812, in send
self.connect()
File "C:\Python27\lib\httplib.py", line 1216, in connect
server_hostname=server_hostname)
File "C:\Python27\lib\ssl.py", line 350, in wrap_socket
_context=self)
File "C:\Python27\lib\ssl.py", line 566, in __init__
self.do_handshake()
File "C:\Python27\lib\ssl.py", line 788, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
I would much appreciate your answer since this is been causing me troubles for 1 week already.
One other thing to keep in mind that we ran into recently was in communicating with Salesforce via a web service call from inside of an ETL tool. With their latest release, Salesforce only supports SH-256 certificates now and we had to push out a newer patch set on our ETL tool to communicate cleanly.