I have a problem with parsing a response I am receiving via a SOAP callout in Salesforce. The error I am receiving is : Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found 'http://schemas.xmlsoap.org/soap/envelope/:Fault'
One odd part of this is that the response is parsed fine when it is successful but when it faults, Salesforce does not know what to do with the response. I need those error messages so the end user can fix the issues and try again.
I have spoken with the tech in charge of the target system and he says the error responses are being sent correctly. Another oddity is that we have other similar webservices on the same system that are parsing errors perfectly. There seems to be no apparent differences in the Methods that were created by the WSDLs.
Does anyone have any thoughts as to why this error is occurring or does anyone have any tips to troubleshooting this issue.
Any suggestions are much appreciated. Thanks!