When invoking an API which includes building soap messages , you must've come across this error.
First Element must contain the local name, Envelope , but found faultstring
This is happening when the server is not returning the expected xml response format. For example, if you have an endpoint like  where soap format 11 is declared , but the server returns a soap12 format, you might get an error like above.
 <endpoint xmlns="http://ws.apache.org/ns/synapse" name="StudentServiceEndpoint">
<address uri="http://localhost:9764/services/StaffService" format="soap11"/>
The cause for this is Axis2 dispatches the message based on Request URI based on different options like below.
1.Request URI Operation based
2.SOAP Action based
3.SOAP MessageBody based
So if the system can't find any of the options to dispatch the request to correct endpoint, axis2 will throw an error.