I created a Salesforce client using "Generate class from WSDL" feature. When i try to call the web service, throws the following error:
"System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':html'"
- The request parameter is a String
- Endpoint: https://www.consorciotransaccional.cl/WSCrm2/CasoPeoplesoftCRMWSService
Method to call web service:
public PageReference LlamarWS() { crmWsproviderServiceCnsvCl.CasoPeoplesoftCRMWSPort caso = new crmWsproviderServiceCnsvCl.CasoPeoplesoftCRMWSPort(); XMLResponse = caso.saveCasoPeoplesoftCMRPS(Header); return null; }
Variable "Header" is a String containing an XML.