
35 Wis.2d 317 (1967)
CITY OF KENOSHA, Appellant,
v.
STATE and another, Respondents.
Supreme Court of Wisconsin.
May 9, 1967.
June 6, 1967.
*321 For the appellant there were briefs and oral argument by Burton A. Scott, city attorney.
For the respondents the cause was argued by Robert J. Vergeront, assistant attorney general, with whom on the brief was Bronson C. La Follette, attorney general.
A brief amicus curiae was filed by Julian Bradbury of Madison, for the League of Wisconsin Municipalities.
WILKIE, J.
Three procedural issues are dispositive of this appeal:
1. Does the defense of the sovereign immunity of the state against suit by Kenosha go to the subject-matter jurisdiction of the court, and is this defense then available in the instant case to both the state and the secretary of state, so that it can never be waived by the state or the secretary of state?
2. If the defense of sovereign immunity of the state against suit by Kenosha is a matter of personal jurisdiction, *322 was it waived by either the state or the secretary of state by a failure to raise that defense at trial or by a failure to preserve the defense as a question for appeal?
3. Does the city of Kenosha, a municipal corporation, have standing to sue the state of Wisconsin or the secretary of state in a declaratory judgment action which seeks to hold sec. 11.04, Stats., unconstitutional?
Sovereign Immunity.
Sec. 27, art. IV of the Wisconsin constitution provides:
"The legislature shall direct by law in what manner and in what courts suits may be brought against the state."
The rule developed from this constitutional provision is that the state cannot be sued without its consent.[1] If consent for suit is given by a statute enacted by the legislature, compliance with the conditions and restrictions of the legislature is jurisdictional.[2]
In the case at bar the suit by the city of Kenosha is against the state and the secretary of state for a declaratory judgment. Sec. 269.56, Stats., provides for actions for declaratory judgments, but makes no provision for actions for declaratory judgment against the state. In State ex rel. Martin v. Reis[3] the question was whether the state was an employer under sec. 103.39 (3). The court stated:
*323 "This raises for consideration the question whether a statute of general application containing no specific provision to the effect that the state is within it, applies to the state itself. It is universally held, both in this country and in England, that such statutes do not apply to the state unless the state is explicitly included by appropriate language."[4]
The Wisconsin declaratory-judgment statute does not make any provision for suits against the state and we have held that declaratory judgments against the state are barred by sovereign immunity.[5]
The rule of sovereign immunity is equally applicable to the state's administrative arms or agencies which have no independent proprietary powers or functions.[6] A general exception to the rule of state immunity for agencies or arms of the state, however, is that courts may entertain suits to enjoin state officers and state agencies from acting beyond their constitutional or jurisdictional authority.[7] These suits are permitted because *324 they are suits against individuals acting in excess of their authority.
In the case at bar the state is immune from suit for declaratory judgment because the declaratory-judgment statute does not give consent for the state to be sued. In addition, the secretary of state is also immune from suit under the principle of sovereign immunity. The secretary of state is an agent of the state and suits against him are subject to the defense of sovereign immunity.[8] Also, the secretary of state does not come within the exception to the rule that suits against state officers may be maintained where the officer is acting beyond his constitutional or jurisdictional authority.
Sec. 11.04, Stats., requires voting machines to be installed in cities and villages over 10,000 but does not give the secretary of state authority to enforce this legislative mandate. The secretary has no supervisory control over the installation of voting machines nor has he made any attempt to force cities to comply with the requirement. In short, the secretary of state has taken no action in this case beyond his constitutional or jurisdictional authority, and no such action by the secretary of state has been alleged in the city of Kenosha's amended complaint.[9] Thus, the defense of sovereign immunity may be raised by both the state of Wisconsin and the secretary of state.[10]
*325 If the defense of sovereign immunity is a bar to a suit against both the secretary of state and the state of Wisconsin, the critical question presented is when must the defense be raised in order to be recognized and preserved. In the case at bar, the state raised the defense of inability to be sued as a matter of personal jurisdiction in its demurrer to the amended complaint of the city of Kenosha. The secretary of state did not raise the defense of sovereign immunity in his demurrer to the city's complaint. The trial court sustained the demurrer of both defendants, but only on the ground that the facts pleaded were insufficient to state a cause of action. The state cross-appealed on the sole ground that the city of Kenosha has no standing to sue. On appeal here, however, the state and the secretary of state argue that the trial court had no jurisdiction over them. This issue is not properly raised on appeal by the secretary of state unless the defense of sovereign immunity goes to the lack of the trial court's subject-matter jurisdiction. If the defense of sovereign immunity nullifies the trial court's subject-matter jurisdiction, the city's cause of action against the secretary of state and the state is barred. If the defense of sovereign immunity only nullifies the trial court's personal jurisdiction the suit is barred only if the state has subsequently waived its objection to personal jurisdiction.
Thus, the issue is whether sovereign immunity is a personal-jurisdiction defense or a defense which affects the subject matter of the court. No Wisconsin cases have directly resolved this issue of whether immunity of suit is personal jurisdiction which can be waived. In State ex rel. Reynolds v. Smith,[11] the court dealt with the analogous problem of whether the state could waive its privileged immunity of being taxed for court costs where *326 the statute made no provision for taxation of court costs against the state. This court held that:
"... [W]hen a state voluntarily enters the courts of another sovereign as a party plaintiff, it thereby waives its sovereign immunity and subjects itself to liability for costs in the same manner as any other litigant."[12]
A corollary holding of this court in Reynolds was that the attorney general's decision to bring a suit in the federal court was sufficient to waive the state's sovereign immunity from being taxed for costs.
Courts of other states are divided on the question of whether sovereign immunity is a personal-jurisdiction matter which can be waived by a general appearance.[13] 81 C. J. S., States, p. 1303, sec. 214, discusses the defense of sovereign immunity as follows:
"... Hence, a state may be sued whenever it has consented thereto; and the voluntary general appearance of a state in a suit may constitute a waiver for that particular *327 suit; but consent or appearance by an officer, who has no authority to waive the immunity of the state, is ineffectual."[14]
The general rule appears to be that sovereign immunity is a matter of personal jurisdiction which can be waived. 1 Anderson, Declaratory Judgments (1959 supplement, p. 128, sec. 179) states in support of this rule that "... where the state appears or where the action is against the officer in his individual capacity, then the suit may properly be maintained."[15]
The problem with many cases discussing the issue of whether sovereign immunity is a personal-jurisdiction defense is that no discussion is made of the nature of personal and subject-matter jurisdiction. In Galloway v. State[16] this court states that subject-matter jurisdiction is the power of a court to treat a certain subject matter, whereas personal jurisdiction involves a failure to comply with the conditions necessary to acquire jurisdiction.[17]
*328 "... [A] court has jurisdiction over the `subject matter' if it is authorized to hear and determine the primary object of the action."[18] In the case at bar, the primary object of the action is a declaratory judgment which the court has the authority to grant. This action could be maintained in the trial court against any private party, and the trial court is fully empowered to hear suits for declaratory judgment. Sovereign immunity is a defense which can be raised by the state alone and does not go to the merits or primary object of the action. For this reason, sovereign immunity is a defense to the personal jurisdiction of the court which can be waived.
Personal jurisdiction over the secretary of state was obtained by the city of Kenosha. In the secretary of state's demurrer, no objection was made to the personal jurisdiction of the court, nor was any mention of sovereign immunity made. Under sec. 262.16 (6), Stats., failure to make an objection to the personal jurisdiction of the court waives such an objection. The secretary of state did not object to the personal jurisdiction of the court in any of the ways provided by sec. 262.16 (2), and this objection is therefore waived.
The existence of personal jurisdiction of the court over the state of Wisconsin is a more difficult problem. In its demurrer, the state objected to the personal jurisdiction of the court on the basis of sovereign immunity. The trial court did not discuss this objection in its memorandum decision so we must assume that the demurrer was not sustained on this ground. In the notice of cross appeal filed by the state the only issue listed as appealable by the state is the trial court's adverse holding that the city of Kenosha had standing to sue. No exception was taken to the trial court's assumption that the trial court had *329 personal jurisdiction over the state of Wisconsin. However, the state now raises this question in its brief on appeal.
This set of circumstances raises the issue of whether the state waives its objection to the personal jurisdiction of the court where the objection was raised in the state's demurrer but not made in the state's exceptions as part of its notice of cross appeal. The Wisconsin rule is that no exception is necessary to preserve for review an order overruling[19] or sustaining a demurrer.[20] Both the cases supporting this statement involved the challenge of insufficiency of the facts to state a cause of action. However, the rationale of the court in both cases was that the error appeared on the face of the record. Moreover, the trial court had an opportunity to consider the personal jurisdiction of the court over the state because the issue was clearly presented to it by the state's demurrer. It follows then that the state has not waived its objection to personal jurisdiction and the defense of sovereign immunity bars a suit for declaratory judgment against the state. For this reason the cause of action against the state should be dismissed.
Standing to Sue.
Because the secretary of state has waived his jurisdictional objections to the suit by the city of Kenosha, a further issue is presented as to whether or not the city has proper standing to sue the state and the secretary of state, an agent of the state. The city of Kenosha is a municipal corporation attempting to contest the constitutionality of a statute. In Columbia County v. Wisconsin Retirement Fund[21] our court stated the rule that a city *330 has no standing to raise constitutional issues in suits against the state. The reason for this rule was stated by the court as follows:
"... Upon the reasoning a city was a municipal corporation and a metropolitan sewerage district was a quasi-municipal corporation, both being political subdivisions of the state created as convenient agencies for the exercising of such governmental powers of the state as may be intrusted to them and as such were creatures of the legislature and an arm of the state, we held in Madison Metropolitan Sewerage Dist. v. Committee (1951), 260 Wis. 229, 50 N. W. (2d) 424, that the city of Madison and the metropolitan sewerage district did not have any standing to contest the constitutionality of the state law there in question....
"A county as a quasi-municipal corporation and as an arm of the state has no right to question the constitutionality of the acts of its superior and creator or of another arm or governmental agency of the state. A county or a governmental agency is created almost exclusively in the view of the policy of the state at large for purposes of political organization and civil administration in matters of state concern...."[22]
The court ruled that the rule of lack of standing for municipalities also applied to suits against agencies of the state.
In Marshfield v. Cameron[23] this court reiterated the rule that municipalities do not have standing to raise constitutional issues against the state. "Municipal corporations, being creatures of the state, are not permitted to censor or supervise the activities of their creator."[24] In the case at bar the trial court recognized the existence of this rule but made an exception to the rule because of the exigency of the situation and because a constitutional question was involved. The appellant also argues that an exception should be made because the instant suit involves *331 an issue of great public concern. The exceptions to the rule of municipal standing were discussed recently by this court in State ex rel. La Crosse v. Rothwell, where the court stated:
"The appellants argue the constitutional question is of great public concern, but in the Columbia County Case we pointed out these exceptions apply only to cases between private litigants and a municipality or state agency and not to suits between agencies of the state, or between an agency or municipal corporation and the state. Here, a municipality is suing the state superintendent of public instruction and consequently the city of La Crosse has no capacity to raise the constitutionality of the statute. However, so far as the constitutional question affects the rights of the individual appellants, such question is properly before us."[25]
The case at bar directly parallels the Rothwell Case. The secretary of state is also an agent of the state and exceptions to the standing rule do not apply. The city's remedy is to force the attorney general to bring an action of mandamus against it. In this way, the constitutional issues will be properly before this court.
Accordingly, the demurrers of both the state and the secretary of state should have been sustained; as to the state, because of lack of jurisdiction; as to both the defendants because of a lack of standing on the part of the city to sue. Thus, we do not reach the merits of the constitutional issues sought to be raised by Kenosha.
By the Court.Judgment affirmed.
NOTES
[1]  Sullivan v. Board of Regents of Normal Schools (1932), 209 Wis. 242, 244, 244 N. W. 563; State ex rel. Martin v. Reis (1939), 230 Wis. 683, 685, 284 N. W. 580; Konrad v. State (1958), 4 Wis. (2d) 532, 538, 91 N. W. (2d) 203; Arthur v. State Conservation Comm. (1967), 33 Wis. (2d) 585, 148 N. W. (2d) 17; Metzger v. Wisconsin Department of Taxation, ante, p. 119, 150 N. W. (2d) 431.
[2]  State ex rel. Martin v. Reis, supra, footnote 1; Konrad v. State, supra, footnote 1; Metzger v. Wisconsin Department of Taxation, supra, footnote 1.
[3]  Supra, footnote 1.
[4]  Id. at page 687. See also Konrad v. State, supra, footnote 1, at page 538.
[5]  In Berlowitz v. Roach (1947), 252 Wis. 61, 64, 30 N. W. (2d) 256, the court quotes the declaratory-judgment statute and states: "This clearly grants to any party the right to proceed under the uniform declaratory-judgment statute to have a statute construed with reference to a claimed right so long as it cannot be said to be an action against the state."

1 Anderson, Declaratory Judgments (1959 supplement, p. 127, sec. 179), states: "Generally speaking, the same rule as to sovereign exemption from suit applies in declaratory judgments as in other types of action. In the absence of specific statutory authority, a court cannot enter a declaratory judgment affecting a state in its sovereign capacity."
[6]  Sullivan v. Board of Regents of Normal Schools, supra, footnote 1; Metzger v. Wisconsin Department of Taxation, supra, footnote 1.
[7]  Barry Laboratories, Inc., v. State Board of Pharmacy (1965), 26 Wis. (2d) 505, 132 N. W. (2d) 833; Arthur v. State Conservation Comm., supra, footnote 1, at pages 590, 591; Monroe v. Collins (1946), 393 Ill. 553, 66 N. E. (2d) 670.
[8]  Sullivan v. Board of Regents of Normal Schools, supra, footnote 1, at page 244.
[9]  The only allegation concerning the secretary of state is that he is charged with many and various supervisory duties in administering elections under the statutes of the state of Wisconsin.
[10]  See W. D. Haden Co. v. Dodgen (1958), 158 Tex. 74, 80, 308 S. W. (2d) 838: "`There is a clear distinction between a suit against an officer for a wrong committed by him in the name of the state, and suits brought against an officer to prevent the exercise by the state through such officer of some act of sovereignty, ...'"

In Barry Laboratories, Inc., v. State Board of Pharmacy, supra, footnote 7, it is stated that suits against officers of the state have been termed a fiction created in order to find a way around sovereign immunity. In the case at bar, the fiction becomes too transparent because the secretary of state has taken no action in the controversy so that there is no reason to permit an exception to sovereign immunity.
[11]  (1963), 19 Wis. (2d) 577, 120 N. W. (2d) 664.
[12]  Id. at page 583.
[13]  In Lowry v. Commonwealth (1950), 365 Pa. 474, 76 Atl. (2d) 363, the court states that sovereign immunity is a matter of subject-matter jurisdiction, cannot be waived by acquiescence in the proceeding, and may be raised at any stage of the proceeding. The court does not analyze why sovereign immunity is a matter of subject-matter jurisdiction.

On the other hand several cases support the view that where the state appears through its attorney general the defense of sovereign immunity is waived. Teeval Co. v. City of New York (D. C. N. Y. 1950) 88 Fed. Supp. 652; Kleban v. Morris (1952), 363 Mo. 7, 247 S. W. (2d) 832; 39th-40th Corp. v. Port of New York Authority (1946), 188 Misc. 657, 65 N. Y. Supp. (2d) 712; Jackson County v. McGlasson (1934), 167 Tenn. 311, 69 S. W. (2d) 887; Hunt v. State Highway Comm. (1957), 350 Mich. 309, 86 N. W. (2d) 345; Security Nat. Bank v. Sabatelli (1962), 38 Misc. (2d) 503, 236 N. Y. Supp. (2d) 775.
In State v. Hall (Mo. 1965), 389 S. W. (2d) 798, the court states that the defense of sovereign immunity is a matter of personal jurisdiction but that the attorney general had no authority to waive it by general appearance.
[14]  See also 49 Am. Jur., States, Territories, and Dependencies, pp. 313, 314, sec. 96, which supports the proposition that sovereign immunity is a matter of personal jurisdiction which can be waived by general appearance.
[15]  The case of Maguire v. Monaghan (1954), 206 Misc. 550, 134 N. Y. Supp. (2d) 320, held that a suit for declaratory judgment may be maintained against the state where the attorney general appears, because the appearance waived the state's immunity. See also Babin v. City of Ashland (1953), 160 Ohio St. 328, 116 N. E. (2d) 580.
[16]  (1966), 32 Wis. (2d) 414, 145 N. W. (2d) 761, 147 N. W. (2d) 542.
[17]  Seyfert v. Seyfert (1930), 201 Wis. 223, 228, 229 N. W. 636. "... That the term `jurisdiction' has a double meaning has been fully elucidated by this court upon prior occasions. [Citations omitted.] In one sense a lack of jurisdiction means a lack of judicial power to act at all in a given situation or with reference to a certain subject matter. To act under such circumstances is usurpation. It is also used to denote want of jurisdiction of the subject matter of the action in a particular instance where prescribed conditions precedent to the exercise of judicial power have not been complied withwhere the power to deal with the subject generally exists, but where under the particular circumstances jurisdiction to act in the specific instance has not been acquired. In the latter case action is erroneous but not void."
[18]  Galloway v. State, supra, footnote 16, at page 420.
[19]  Platteter v. Paulson-Ellingson Lumber Co. (1912), 149 Wis. 186, 135 N. W. 535.
[20]  Dow v. Deissner (1900), 105 Wis. 385, 80 N. W. 940, 81 N. W. 671.
[21]  (1962), 17 Wis. (2d) 310, 116 N. W. (2d) 142.
[22]  Id. at page 317.
[23]  (1964), 24 Wis. (2d) 56, 127 N. W. (2d) 809.
[24]  Id. at page 63.
[25]  (1964), 25 Wis. (2d) 228, 233, 130 N. W. (2d) 806, 131 N. W. (2d) 699.
