Code Refactoring for SOAP requesting