— Appellant, an Indiana corporation, brought this action against appellee, an Illinois corporation, to recover a balance alleged to be due it on account of material it furnished appellee. The complaint is in two paragraphs, the first of which is based on a written contract filed as an exhibit with said complaint and alleges in effect a refusal on appellee’s part to make the payment to appellant for the material it furnished under such contract according to the terms thereof, and alleges that on September 24,1906, there was a balance due on said contract of $1748.23. In the second paragraph it is alleged in substance that the appellee is indebted to appellant in the sum of $1748.23, being a balance for goods, wares and materials sold and delivered to appellee at its special instance and request; that demand had been made on appellee for payment of said sum and said amount remained due and wholly unpaid. Both paragraphs aver, in substance, that although appellee is a corporation, organized under the laws of the state of Illinois, that it had been admitted to transact business within the State of Indiana under and pursuant to the laws of said State, and “had duly designated an agent upon whom service of process might be had and that for the purpose of this case the defendant was found and was doing business within the State of Indiana.”
The appellee entered a special appearance and filed a plea in abatement to which a demurrer filed by appellant was overruled. A reply of general denial to this plea closed the issues. The cause was tried by jury and at the close of all the evidence the court sustained a motion made by appellee for a peremptory instruction directing the jury to' find for appellee upon its plea in abatement to which ruling of the court the appellant at the time excepted. The jury found for the appellee as directed by the court and thereupon ap*635pellant filed its motion for new trial which was overruled and exceptions saved. Judgment was entered upon the finding of the jury that the action abate and that the appellee have and recover of the appellant the costs of the action to all of which appellant at the time excepted and prayed an appeal to this court.
The errors relied on for reversal are: (1) The court erred in overruling the demurrer of plaintiff (appellant) to defendant’s plea in abatement; (2) the court erred in overruling the motion of the plaintiff (appellant) for new trial; (3) the court erred in the judgment entered.
The first question presented for our consideration is the sufficiency of the plea in abatement as against the demurrer. This plea avers that appellee’s appearance is special only, and for the sole purpose of questioning the jurisdiction of the court over its person; that it is an Illinois corporation engaged solely in the business of general contracting with its principal and only place of business location and residence in the city of Chicago; that it at no time had any office or agent in the State of Indiana, except only and to the extent and in the manner hereinafter specifically stated; that in December, 1902, appellee had a contract for the construction work upon the Claypool Hotel, in the city of Indianapolis, and had sublet such work to divers subcontractors who furnished the materials and performed the labor,- and that in connection with said contract appellee, under date of December 2, 1902, appointed A. W. Hatch its agent in Indiana, with authority as required by the Indiana foreign corporation law of 1901, and caused the writing containing such-appointment to be filed with the Secretary of State,#of the State of Indiana; that on July 7, 1906, its board of directors at a meeting regularly convened, decided appellee should not do business in Indiana, and, by resolution duly adopted, cancelled, annulled and revoked the appointment of said A. W. Hatch and provided that appellee should thereafter maintain no office or agency in said State of In*636diana; that thereupon appellee, by its president made and filed with the Secretary of State of the State of Indiana, an affidavit showing that no part of its capital stock was represented by its property located, or business transacted, in the State of Indiana, that it had no property located in said , State, and that its appointment of its agent as aforesaid had been and was revoked; that the steps aforesaid were taken by appellee in good faith for the purpose of terminating the agency aforesaid for the reason that it was not then engaged and did not intend to engage in any business in said State, so as to bring it within the laws of Indiana relating to foreign corporations doing business in said State; that appellee did not remove any property from said State, except in the ordinary course of business as it completed the contract aforesaid ; and it has not at any time done, or suffered anything to be done whereby any person, firm or corporation in said State holding any claim against it or its property in said State, was or might be defrauded, hindered or delayed; that said Secretary of State thereupon issued to it a certificate of revocation as follows: Here follows the certificate which is a statement signed by the Secretary of State showing simply the filing in his office by appellee of “an affidavit revoking the appointment of A. W. Hatch as agent in Indiana for said company, and declaring the intent of the corporation to no longer maintain an office or agent in this State”. Then follow averments showing since said time appellee has done no business in said State and had no property office or agent therein; that the contract sued on was •for material, none of which was to be used -in Indiana but all of which was for use in construction work at the city of New Orleans, and that said contract was totally disconnected with any business at any time done by appellee in Indiana; that the summons in this cause was served upon said Hatch on or after February 16, 1907, at a time when he was in no way authorized to receive service of said summons and had no connection with appellee of any character, *637excepting only that he was then its attorney in respect to certain claims in litigation in said State, which claims have no connection with the contract set out in the complaint.
Appellant urges against the sufficiency of this plea: (1) That it fails in the requirement that it “must be certain to every intent in every particular and must anticipate every possible answer of the adversary. (2) “That it does not deny that the cause of action arose within this State which would be a possible answer.” (3) “That it does not deny that the appellee had money, credits, or effects belonging to or due the appellee within this State.” The fourth, fifth, sixth, seventh and eighth objections present practically the same question and will be hereafter referred to and discussed.
1. The first proposition above is amply supported by authority. “ ‘The criterion or leading distinction between a plea in abatement and a plea in bar is, that the former must not only point out the plaintiff’s error, but must show him how it may be corrected, and furnish him with materials for avoiding the same mistake in another suit in regard to the same cause of action; or, in technical language, must give the plaintiff a better writ.’ * * * ‘Certainty of this sort, or “to a certain intent in every particular,” requires the utmost fullness and particularity of statement, as well as the highest attainable accuracy and precision, leaving, on the one hand, nothing to be supplied by intendment or construction; and on the other, no supposable special answer unobviated.’ ” Needham v. Wright (1895), 140 Ind. 190, 194, 39 N. E. 510. See, also, Ohio Oil Co. v. Griest (1902), 30 Ind. App. 84, 87, 65 N. E. 534; American Surety Co. v. State, ex rel. (1912), 50 Ind. App. 475, 98 N. E. 829; Lechner v. Strauss (1912), 50 Ind. App. 414, 98 N. E. 444 and authorities there cited. As to the second and third propositions above, we find authority in our own State and other jurisdictions as well, which seem to support appellant’s contention, depending, we
*6382. think, on the theory upon which the plea in abatement proceeds. If the theory of this plea in abatement be that on account of the withdrawal of appellee from the State, and the revocation of the authority of its agent to accept service of process, the courts of this State have been deprived of any jurisdiction of the defendant and that for this reason this action should abate, then we think that the contention of the appellant that the pleading should contain averments showing that appellee has no money, credits or effects belonging to or due it in the State and that the cause of action did not arise within the State of Indiana is well taken and supported by authority. On the other hand, if the theory of the pleading be that thé court has not obtained jurisdiction of the person of the appellee by the service of process had upon Mr. Hatch and that such service should be set aside and the summons quashed, we think there would be no necessity for the averments insisted on.
3. The question whether service of process had been had on an authorized agent of the appellee could be affected in no way by appellee having or not having money, credits or effects belonging to or due it within the State, but the existence or nonexistence of such money, credits or effects within the State would determine whether the court might, by a supplemental or amended pleading in attachment or garnishment, acquire such jurisdiction of the person as would enable it to proceed to final judgment in rem.
4. It is an elemental principle of jurisprudence that one may not be deprived of his property without due process of law.
5. It is also elemental that a court of justice cannot acquire jurisdiction over the person of one who has no residence within its territorial jurisdiction except by actual service of notice within the jurisdiction on him, or on one authorized to accept service in his behalf, or by his waiver, by general appearance or *639otherwise, of the want of due service. Conley v. Mathieson Alkali Works (1903), 190 U. S. 406, 410, 411, 23 Sup. Ct. 728, 47 L. Ed. 1113; Thompson v. Whitman (1874), 18 Wall. 457, 21 L. Ed. 897; D’Arcy v. Ketchum (1850), 11 How. 165, 13 L. Ed. 648; Knowles v. Gaslight, etc., Co. (1873), 19 Wall. 58, 22 L. Ed. 70; Hall v. Lanning (1875), 91 U. S. 160, 23 L. Ed. 271; Pennoyer v. Neff (1878), 95 U. S. 714, 24 L. Ed. 565; York v. Texas (1890), 137 U. S. 15, 11 Sup. Ct. 9, 34 L. Ed. 604; Wilson v. Seligman (1892), 144 U. S. 41, 12 Sup. Ct. 541, 36 L. Ed. 338; McCord Lumber Co. v. Doyle (1899), 97 Fed. 22, 38 C. C. A. 34; Goldey v. Morning News (1895), 156 U. S. 518, 521, 15 Sup. Ct. 559, 39 L. Ed. 517, and authorities there cited. There are, however, two ways, by either of which, a person may be deprived of his property and such taking is sanctioned by the law and held not to violate the principle that prevents the taking without due process of law. These two actions are recognized and designated as actions in personam and actions in rem.
6. While it is true, jurisdiction over the person which will warrant a personal judgment may be obtained only in the way above announced, the court, in an action in rem by constructive service upon the person whose property is sought to be affected or taken, may obtain such qualified or limited jurisdiction over the person as will enable it to render a judgment depriving such person of the property over which it has obtained jurisdiction. So, in this case, if the appellee had property in the State of Indiana of any kind or character over which the trial court by a proper action in rem could have obtained jurisdiction, such court, in such an action by constructive service upon the appellee, could have obtained such limited or qualified jurisdiction of its person as would authorize a judgment directing the sale and disposition of such property and an application of the proceeds to appellant’s debt.
*6402. *639Section 316 Burns 1908, §313 R. S. 1881, provides: “Ac*640tions may be brought against a corporation created by or under .the laws of any other state, government or country, in any court having jurisdiction of the amount demanded, by any person having a cause of ’ action, in any county within the State, where any property, moneys, credits or effects belonging or due to the corporation may be found.” It would seem, therefore, under the rale above announced which requires a plea of this kind not only to anticipate all defenses but also “to point out plain tiff’s error and furnish it with material for avoiding the same mistake”, or in technical language, “give it a better writ”, that where such plea proceeds upon the theory that a court of this State can have no jurisdiction over the defendant, and that for such reason the action itself must abate, it must, by proper averment, show not alone that such corporation has withdrawn from the State, revoked the authority of its agent, and eeásed to do business therein, but it must show the additional facts that such corporation has no property, money, credits or effects of any kind over which such court might obtain control or jurisdiction. In other words, in order that a plea of this character may abate an action, which arose in this State, such plea should aver facts showing not only that the way to a judgment in personam is closed because of lack of jurisdiction of the person of defendant, but it should go further and show that no way to a final judgment in rem remains open. Rush v. Foos Mfg. Co. (1898), 20 Ind. App. 515, 519, 534, 51 N. E. 143; Gouner v. Missouri Valley Bridge, etc., Co. (1909), 123 La. 963, 967, 49 South. 657; Goodwin v. Claytor (1904), 137 N. C. 224, 232, 235, 49 S. E. 173, 67 L. R. A. 209, 107 Am. St. 479; Fisher v. Traders Mut. Life Ins. Co. (1904), 136 N. C. 217, 48 S. E. 667, 669; Connecticut Mut. Life Ins. Co. v. Spratley (1899), 172 U. S. 602, 19 Sup. Ct. 308, 43 L. Ed. 569; Pennoyer v. Neff, supra; Fitzgerald Constr. Co. v. Fitzgerald (1890), 137 U. S. 98, 11 Sup. Ct. 36, 34 L. Ed. 608. However, where it is clear that the plea in abatement *641proceeds solely upon, the theory that the service had upon the corporation is not sufficient, because not upon an authorized agent of such corporation and seeks simply to quash or set aside such service it would seem from the authorities, supra, that there is no necessity for the averments insisted upon.
7. Some of the averments of this pleading, and especially the prayer, indicate that its theory is that the court has not and can not obtain any such jurisdiction of the appellee as will authorize a judgment of any kind affecting it or its property in this State and that the action should abate. Ordinarily, the theory of a pleading is to be determined not by its prayer alone, but by its averments taken in their entirety. If we were to be governed by this rule we would say without hesitation, that the theory of this plea is simply that the service of process had on Mr. Hatch was not on an authorized agent of the appellee and that by reason of there being no proper service of process, the court had not obtained jurisdiction of the person of the appellee and that such service should be quashed or set aside. The trial court, however, seems to have tried and determined the case upon the other theory. It rendered a judgment abating the action. "We have no doubt but that under the rule above announced requiring such strict accuracy and certainty in a pleading of this character, that the same was not sufficient to withstand the demurrer. If we are correct in our views on the questions already discussed, the demurrer to the plea in abatement should have been sustained and it would follow that the judgment should be reversed, but the sufficiency of this plea, as before indicated, is questioned upon other grounds. The fourth, fifth, sixth, seventh and eighth grounds of objection above referred to present a question which is doubtless of controlling influence in the case, and we take it that it will be to the interest of both parties to this litigation to have the question now determined.
*642Under these grounds of objection appellant insists, in effect, that this plea is bad for the further reason that it affirmatively shows that appellee entered the State and complied with its statutory law authorizing it to do business therein, and duly designated and authorized an agent upon whom service of process could be had in all suits commenced against it in the State, and that the service of process had in this case vías on the agent so designated and authorized by appellee. It is urged that these averments are sufficient to show that the service of process in the case was such as was authorized by the statute which permitted appellant to do business in the State; that appellee accepted the terms of the statute and appointed such agent and came into the State and did business therein, and that inasmuch as the statute makes no provision for a withdrawal from the State by such corporation, or for a revocation of the authority of the agent designated as the person upon whom service of process could be had in all suits against such corporation, that such consent for service of process extends to all actions relating to any business done by the corporation while so in the State, and that it follows that service on such agent is a valid service on the corporation for the purpose of any litigation growing out of any business done by such corporation while so in the State, notwithstanding it may have afterwards attempted to withdraw from the State and revoke the authority given such agent; that such corporation is doing business in the State, within the meaning of the law which gives it the right to do such business, when it is litigating claims in its favor in the State and also has claims outstanding against it in the State where such claims both for and against it arose while it was doing business in the State.
This question, so far as we have been able to find, has never been presented or passed upon by the courts of this State. However, we are not without authority on the question, and counsel upon either side of the case have materially aided us by able briefs in which are cited numerous authori*643ties from state and federal courts which counsel insist support their respective contentions. "We have examined with care the authorities cited and given the question discussed careful thought and consideration, and must confess that in our disposition of it we are not free from doubt. We think either side of the question has authority for its support and good reasons may be offered for either position. Our final conclusion in the matter and our reasons therefor will be indicated in our discussion of the question as presented by appellee’s contention.
The law in force at the time appellant filed its suit in the court below, and on which it relies for its service of process is an act approved March 15, 1901 (Acts 1901 p. 621). The part of said act here involved provides as follows: “Sec. 1. * * * That every corporation for pecuniary profit formed in any other state, territory or country, before it shall be authorized or permitted to transact business in this State, or to continue business therein, if already established, shall have and maintain a public office or place in this State for the transaction of its business, where proper books shall be kept to enable such corporation to comply with the constitutional and statutory provisions governing such corporations; and it shall designate an agent or representative in this State upon whom service of process may be had; and such corporation shall be subjected to all the liabilities, restrictions and duties which are or may be imposed upon corporations of like character organized under the general laws of this State, and shall have no other or greater powers. * * Sec. 2. * * * and the principal or agent in Indiana of the said corporation shall make and forward to the Secretary of State, with the articles or certificates above provided for, a statement duly sworn to of the proportion of the capital stock of said corporation which is represented by its property located and business transacted in the State of Indiana. * * * Upon a compliance with the above provisions by said corporation, the Secretary *644of State shall give a certificate that said corporation has duly complied with the laws of this State and is authorized to do business therein, stating the amount of its entire capital and of the proportion thereof which is represented in Indiana. And such certificate shall be taken by all courts in this State as evidence that the said corporation is entitled to all the rights and benefits of this act, and such corporation shall enjoy those xfights and benefits set fox-th in its original charter or articles of association, unless this shall be for a greater length of time than is contexxxplated by the laws of this State, in xvhich event the time and duration shall be reckoned from the creation of the corporation to the limit of time set out in the laws of this State.” The second section of this act was amended in 1903, but the amendment does not affect the question presented by this appeal.
8. In detex’mining the validity of such statutes and the force and effect to be given the same, it must be remembered that a foreign corporation stands upon a different footing from that of a citizen of another state who comes within our borders to do business. The legislature would have no power to prevent such citizen from coming into the State or to prohibit him from doing business therein. This right is given to the individual by the organic law of the State and the United States without
the permission or comity of the State.
9. This is not so with a corporation. The State may, by legislative enactment, grant or refuse a foreign corporation the right to do business within its borders and may provide and prescribe the terms and conditions upon which such corporation may come into the State for such purpose. Douglas v. Kentucky (1897), 168 U. S. 488, 18 Sup. Ct. 199, 42 L. Ed. 553; People v. Fire Assn. of Philadelphia (1883), 92 N. Y. 311, 327, 44 Am. Rep. 380; Woodward v. Mutual, etc., Ins. Co. (1904), 178 N. Y. 485, 489, 490, 71 N. E. 10, 102 Am. St. 519; Ex parte Schollenberger (1877), 96 U. S. 369, 24 L. Ed. 853; Baltimore, etc., R. Co. v. Harris (1870), 12 Wall. *64565, 20 L. Ed. 354; Barrow Steamship Co. v. Kane (1898), 170 U. S. 100, 18 Sup. Ct. 526, 42 L. Ed. 964; Connecticut Mut. Life Ins. Co. v. Spratley, supra; Hooper v. California (1895), 155 U. S. 648, 652, 15 Sup. Ct. 207, 39 L. Ed. 297, and authorities there cited.
10. And, while it is true that the fundamental principle that no one shall be compelled to answer a complaint in a foreign jurisdiction except on such notice of the proceedings as is fair and reasonable must not be violated even in its application to foreign corporations, the distinction, above indicated, between the rights of a citizen of another state and the rights of such corporations permits the legislature of the respective states not only to provide the manner and mode of service for obtaining jurisdiction over such corporations which they deem fair and reasonable, but also to require of such corporation an acceptance of and compliance with the terms of the mode of service so provided as a condition precedent to its doing business in the State. See cases last above cited.
11. The courts of the respective states, when the question is properly raised in an action pending before them, must determine whether the mode of service that has been thus prescribed by their respective legislatures does in fact deprive such corporation of its property without due process of law, and while such determination, generally speaking, may be final in so far as it affects property within the jurisdiction of such state, yet if it be sought to enforce such judgment and affect property in some other jurisdiction or if such judgment is questioned in an action pending in a court of some other jurisdiction, state or federal, such court is permitted to judge for itself, where the question is properly raised, whether the mode of service that has been prescribed by the laws of the particular state violates the fundamental principle above announced. McCord Lumber Co. v. Doyle, supra, and authorities there cited.
*64612. *645Subject to the limitation just indicated “it is the *646established rule that a mode of service prescribed by the state laws for obtaining jurisdiction over foreign corporations, which is by the local courts recognized as valid, will obtain similar recognition in the federal courts.” McCord Lumber Co. v. Doyle, supra. See, also, Lafayette Ins. Co. v. French (1855), 18 How. 404, 406, 15 L. Ed. 451; Ex parte Schollenberger, supra; St. Clair v. Cox (1882), 106 U. S. 350, 1 Sup. Ct. 354, 27 L. Ed. 222; Goldey v. Morning News, supra; Barrow Steamship Co. v. Kane, supra; Connecticut Mut. Life Ins. Co. v. Spratley, supra.
13. These authorities, together with others hereinafter cited, convince us that the legislature was acting clearly within its right and power in passing the act in question, and that such act, even though its wording be such as to warrant the construction insisted on by appellant, would be upheld and sustained by the courts against the charge that it attempts to deprive the corporation affected by it of its property without due process of law. In fact, as we understand the contention of appellee, it, in effect, concedes that the legislature of the State might have enacted a law which would have enabled the appellant to have proceeded to a judgment on the process had in this case, but that having failed to provide for service of process after the withdrawal of the foreign corporation from the State, and having failed to provide that service on the agent designated by such corporation when found in the State should be a valid service on such corporation in any action based on a liability growing out of business done by such corporation while in the State, that the service of process in this case is without authority of law and of no effect.
14. Appellant on the other hand insists that the legislature intended, and that the words of the act will warrant the court in giving it the construction and meaning which appellee concedes the legislature might have given it. So the real question in the case, as we see it, is the construction to be given the act in question. As affect*647ing this question it is contended by appellee that the statute is governmental in character and can be changed, amended or repealed by any succeeding legislature and that for this reason an acceptance of, or compliance with its provisions by the corporation does not give rise to a contract. This contention is in the sense hereinafter indicated supported by authority. Connecticut Mut. Life Ins. Co. v. Spratley, supra; Newton v. Board, etc. (1879), 100 U. S. 548, 559, 25 L. Ed. 710; Fertilizing Co. v. Hyde Park (1878), 97 U. S. 659, 24 L. Ed. 1036; Douglas v. Kentucky, supra; Hooper v. California, supra. In this connection it is urged that appellee had the right upon public notice to terminate the authority of any agent designated by it, and withdraw from its domicil of business in the state, and thereafter jurisdiction cannot be acquired, at least in a strictly personal action, by service upon its former agent. As supporting this position appellee cites: Gouner v. Missouri Valley Bridge, etc., Co., supra; Eureka Mercantile Co. v. California Ins. Co. (1900), 130 Cal. 153, 62 Pac. 393; Ervin v. Oregon Steam, Nav. Co. (1880), 22 Hun 598; Sturgis v. Crescent Jute Mfg. Co. (1890), 10 N. Y. Supp. 470; People v. Commercial Alliance Life Ins. Co. (1896), 40 N. Y. Supp. 269, 7 App. Div. 297; DeCastro v. Compagnie Francaise, etc. (1896), 76 Fed. 425; McCord Lumber Co. v. Doyle, supra; Forest v. Pittsburgh Bridge Co. (1902), 116 Fed. 357, 53 C. C. A. 577; Cady v. Associated Colonies (1902), 119 Fed. 420; Lathrop-She6a, etc., Co. v. Interior Constr., etc., Co. (1907), 150 Fed. 666. The following authorities on the subject of due process of law are also cited by appellee as tending to support its contention. Goldey v. Morning News, supra; St. Clair v. Cox, supra; Mutual, etc., Life Assn. v. Phelps (1903), 190 U. S. 147, 157, 158, 23 Sup. Ct. 707, 47 L. Ed. 987, 994; Connecticut Mut. Life Ins. Co. v. Spratley, supra; Conley v. Mathieson Alkali Works, supra; Hunter v. Mutual, etc., Life Ins. Co. (1910), 218 U. S. 573, 584, 31 Sup. Ct. 127, 54 L. Ed. 1155, 1160, 30 L. R. A. (N. S.) 686. In this *648connection it is insisted by appellee that inasmuch as the State has the right to revoke, amend or change the license under which such corporation does business that the rule of mutuality of right or privilege would suggest and require that the corporation may likewise surrender the privilege given by the license and revoke the authority of the agent named to receive service. It is a sufficient answer to this contention to say that while the above authorities recognize the right of succeeding legislatures to revoke, modify or change the conditions upon which such corporation is permitted to do business within the State, such revocation, modification or changes would affect and apply only to the future business of such foreign corporation and we have no doubt that any legislation which would in fact, affect or take from such corporation a right already acquired by it, under a law formerly enacted, would not be upheld by the courts. So that, if that mutuality of privilege and right insisted upon by appellee, growing out of the right of the State to revoke, change or modify the condition upon which its license is granted, should be conceded to appellee, its privilege, corresponding to that exercised by the State, would permit its revocation of the authority of its agent and withdrawal from the State to affect only its future business and would not permit appellant by such withdrawal and revocation to affect or take away a right of a citizen of the State growing out of the business already done by such corporation under its license.
15. It is suggested that the agent appointed by appellee might resign or die, and that his authority might be revoked and he be removed from the State, and that in such case the only duty of the appellee would be to appoint another. To the extent that it would be appellee’s duty to appoint another agent in case of a vacancy caused by death, resignation or revocation while there was outstanding liability growing out of the business already done under its license, we agree with appellee’s contention.
*64916. But, it is further insisted that the duty of the corporation in this respect continues only while it is, by law, “subject to the jurisdiction of the courts of Indiana, and this is only while it is doing business in the State. ’ ’ Some of the authorities cited above as relied on by appellee tend to support this contention, but we think the better reason is with the authorities which seem to modify or qualify this rule to the extent of holding that for the purpose of such service in a case involving liability growing out of business done under its license, service on the agent appointed for such service as to such business when found in the State, will be sufficient. Of course, if the act in question be considered only as a vehicle affording a means to the corporation to do business, it would be clear that when the corporation no longer wanted to do business, there would be no further reason for the agency.
17. The purpose of the law was not alone to secure or give to the foreign corporation the right to do business within the borders of the State, but its purpose was likewise to afford to the citizens of the State with whom such corporation might do business the opportunity, in case it was necessary, to make such corporation yield itself to the jurisdiction of the courts of this State for the purpose of having determined any rights or liabilities that may have accrued to such citizens of the State by reason of the business done in the State by such corporation under its license. Such being the purpose of the law, the reason for the continuance of the agency after the withdrawal becomes apparent.
16. To give the condition imposed such a construction as will allow such corporation to come within the borders of the State and transact business with the citizens thereof and receive all the benefits of such business, and then at its own pleasure, and, before discharging its liabilities growing out of the business already done and from which it had received all the benefits, allow such corpora*650tion to withdraw from the State and by revoking the authority of its agent appointed to receive service of process avoid a service had on such agent when found and served in the State, in an action growing out of the business done under its license would be to render nugatory the condition upon which such license was given, and take from the act every protection and benefit which the legislature intended to give to the citizen who might do business with such corr poration. If such plea contained proper averments showing that before the filing of appellant’s complaint appellee had in fact revoked the authority of Mr. Hatch, upon whom the service of process was had in this case, as its agent upon whom process might be had, and that it had, in the manner provided by the act, designated another agent upon whom such service of process might be had, a different question would be presented, and appellee’s position be supported by both reason and authority. In other words, it is not necessary, for the purposes of the question here involved, to hold, nor do we want to be understood as holding, that a foreign corporation which has accepted the benefits of the statute in question and done business within our borders may not whenever it sees fit to do so, cease doing business and withdraw from the State and revoke the authority given to the person named as the agent upon whom service of process may be had, and in fact withdraw such person from the State, and thereby, to a certain extent, defeat the purpose and intent of the law. If such corporation actually ceases doing business in the State, there will be no need by it, or by the citizens of the State, for the existence of such agent within our borders for the purposes of future business and the right to revoke the authority of such agent, or the method provided or adopted for such revocation in such case would be of little consequence or importance either to the corporation or the citizens of the State in so far as future business might be affected thereby for the very good reason that there would be no future business to be affected. What *651we do decide is that a foreign corporation by accepting the license given by the State under the act here involved and by complying with the conditions thereof and naming an agent upon whom service of process may be had, and by coming into and doing business within the State, under such license, and receiving the benefits derived from a business done thereunder, thereby, in effect, agrees that service of process under such act shall be a valid service against it when sued by a citizen of this State in a proper court of the State on a contract made in this State with such citizen during the time such corporation was doing business in the State under said license. And, in a suit growing out of such business, such corporation will not be permitted to defeat the jurisdiction of the court, obtained over the person of the defendant, by service of process had in such case in such court by a plea like the one here involved which, in effect, admits that such service was had in such ease on the agent in this State so appointed by it to receive such service at a time when such agent was found in the State representing such corporation as its attorney in litigation growing out of the very business for the purpose of doing which such corporation obtained its license; unless such plea in addition to averments showing that such corporation had, at the time of such service, withdrawn from the State and revoked the authority of its agent so appointed to receive such service, also shows that after the revocation of the authority of such agent it properly designated and appointed another agent upon whom such service of process might be had for the purposes of litigation growing out of the business already done by it under its license.
*65218. *651We think this conclusion is clearly in accord with the purpose and intent of the act in question as indicated by its letter and spirit, and by the history of legislation upon this subject, taken in connection with the judicial sanction given to such legislation in the various courts of other jurisdictions, state and federal, evidenced by the authorities herein *652cited. That such intent and purpose of the legislature in enacting the statute in question should be kept constantly in view, and that it should have a controlling influence in construing the statute when it can be ascertained and collected from an examination of the whole as well as the separate parts of the statute, is well settled by the courts of this and other jurisdictions. United States Sav., etc., Co. v. Harris (1895), 142 Ind. 226, 231, 40 N. E. 1072, 41 N. E. 451; State, ex rel. v. Roby (1895), 142 Ind. 168, 182, 41 N. E. 145, 51 Am. St. 174, 33 L. R. A. 213; Travelers Ins. Co. v. Kent (1898), 151 Ind. 349, 354, 50 N. E. 562, 51 N. E. 723; Middleton v. Greeson (1886), 106 Ind. 18, 21, 5 N. E. 755; Greenbush Cemetery Assn. v. Van Natta (1911), 49 Ind. App. 192, 94 N. E. 899; Pennsylvania Co. v. Mosher (1911), 47 Ind. App. 556, 94 N. E. 1033; 2 Lewis’ Sutherland, Stat. Constr. (2d ed.) §376. This intent will be carried out, when it can be ascertained from the act, although in doing so the strict letter of the statute may not be followed and “If two constructions are possible, that one should be adopted which makes effectual, rather than one which defeats the purpose of the law.” Greenbush Cemetery Assn. v. Van Natta, supra. See, also, Pennsylvania Co. v. Mosher, supra, and authorities there cited.
19. We do not believe the averments of the plea in abatement sufficient to show that the court has not obtained jurisdiction over the person of the appellee, and for this reason as well as the other reasons above indicated the court improperly overruled the demurrers to said plea. We think this conclusion is supported by the authorities following: Home Benefit Society v. Muehl (1900), 109 Ky. 479, 59 S. W. 520, 521, 22 Ky. Law 1378; Magoffin v. Mutual, etc., Life Assn. (1902), 87 Minn. 260, 91 N. W. 1115, 1116, 94 Am. St. 699; Germania Ins. Co. v. Ashby (1901), 112 Ky. 303, 65 S. W. 611, 612, 23 Ky. Law 1564, 99 Am. St. 295; Woodward v. Mutual, etc., Ins. Co., supra; Goodwin v. Clay tor, supra; Johnston v. Mutual, etc., Ins. *653Co. (1904), 87 N. Y. Supp. 438, 445, 446, 43 Misc. 251; Johnston v. Mutual, etc., Ins. Co. (1904), 45 Misc. 316, 317, 318, 319, 90 N. Y. Supp. 539; Fisher v. Traders Mut. Life Ins. Co., supra; Moore v. Mutual, etc., Life Assn. (1901), 129 N. C. 31, 39 S. E. 637, 638; Ben Franklin Ins. Co. v. Gillett (1880), 54 Md. 212; Collier v. Mutual, etc., Life Assn. (1902), 119 Fed. 617; McCord Lumber Co. v. Doyle, supra; Mutual, etc., Life Assn. v. Phelps, supra; Hunter v. Mtitual, etc., Life Ins. Co. (1904), 89 N. Y. Supp. 849, 97 App. Div. 222. For modification of judgment see Hunter v. Mutual, etc., Life Ins. Co. (1906), 184 N. Y. 136, 76 N. E. 1072, 30 L. R. A. (N. S.) 677, 6 Ann. Cas. 291 or Hunter v. Mutual, etc., Life Ins. Co. (1910), 218 U. S. 573, 31 Sup. Ct. 127, 54 L. Ed. 1155, 30 L. R. A. (N. S.) 686; Little v. Banks (1881), 85 N. Y. 258; Biggs v. Mutual, etc., Life Assn. (1901), 128 N. C. 5, 37 S. E. 955; Weymouth v. Washington, etc., R. Co. (1873), 8 MacArthur 19; Angel & Ames, Corporations §§402-407; Pennoyer v. Neff, supra; Connecticut Mutual Life Ins. Co. v. Spratley, supra; City Fire Ins. Co. v. Carrugi (1871), 41 Ga. 660.
Judgment reversed with instructions to the court below to sustain the demurrer to appellee’s plea in abatement, and with leave to it to amend such plea and for any other proceedings consistent with this opinion.
Adams, Felt, Shea, JJ., concur. Ibach, C. J., and Lairy, J., dissent.