Play Games

Search This Blog

Thursday, May 18, 2017

com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element Error

Solution: This type of error occurs because of mismatch of versions in authEndpoint and wsdl file version.
I used authEndpoint as : https://login.salesforce.com/services/Soap/c/29
I generated enterprisewsdl file which has top lines like this
<?xml version="1.0" encoding="UTF-8"?>
<!-- Salesforce.com Enterprise Web Services API Version 39.0 Generated on 2017-05-18 08:15:29 +0000. 

Note : wsdl file has version 39.0

So When I changed authEndpoint to https://login.salesforce.com/services/Soap/c/39 in my java code,the above issue is resolved.

No comments:

Post a Comment