Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Fault' but found 'urn:partner.soap.sforce.com:describeSObjectResponse'
- Dominant language
- Java
- Stars
- 276
- Forks
- 223
- PR merge metrics
- No merged PRs in 30d
Description
Hi team,
I experience an issue when executing API calls. The client throws a following error:
`Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Fault' but found 'urn:partner.soap.sforce.com:describeSObjectResponse'\nCaused by: org.mule.runtime.api.connection.ConnectionException: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Fault' but found 'urn:partner.soap.sforce.com:describeSObjectResponse'\nCaused by: com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Fault' but found 'urn:partner.soap.sforce.com:describeSObjectResponse'\n#011at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:461) ~[force-wsc-53.1.0.jar:?]\n#011at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:203) ~[force-wsc-53.1.0.jar:?]\n#011at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:163) ~[force-wsc-53.1.0.jar:?]\n#011at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:108) ~[force-wsc-53.1.0.jar:?]\n#011at com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java:1491) ~[force-partner-api-53.1.0.jar:?]\n#011at `
I believe all transport implementations evaluate the responses as failed when the status code >= 400:
https://github.com/forcedotcom/wsc/blob/master/src/main/java/com/sforce/ws/transport/JdkHttpTransport.java#L219
I inspected the code and came to a conclusion that this error is caused by the API returning HTTP status code >= 400, but the payload is not based on the Fault structure. Does it make sense?
Thanks for any feedback.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.