1
                                                                     EXHIBIT 3.1

                           FIFTH AMENDED AND RESTATED
                         CERTIFICATE OF INCORPORATION OF
                                WEBMETHODS, INC.

                                    ARTICLE I

        The name of the corporation is webMethods, Inc. (the "Corporation").

                                   ARTICLE II

        The address of the registered office of this corporation in the State of
Delaware is Corporation Trust Center, 1209 Orange Street, in the City of
Wilmington, County of New Castle, 19805. The name of its registered agent at
such address is Corporation Trust Company.

                                   ARTICLE III

        The nature of the business or purposes to be conducted or promoted is to
engage in any lawful act or activity for which corporations may be organized
under the General Corporation Law of the State of Delaware.

                                   ARTICLE IV

        The Corporation is authorized to issue two classes of stock to be
designated common stock ("Common Stock") and preferred stock ("Preferred
Stock"). The number of shares of Common Stock authorized to be issued is five
hundred million (500,000,000), par value $.01 per share, and the number of
shares of preferred stock authorized to be issued is fifty million (50,000,000),
par value $.01 per share.

The board of directors is authorized, subject to any limitations prescribed by
law, to provide for the issuance of shares of preferred stock in series, and by
filing a certificate pursuant to the applicable law of the State of Delaware
(such certificate being hereinafter referred to as a "Preferred Stock
Designation"), to establish from time to time the number of shares to be
included in each such series, and to fix the designation, powers, preferences,
and rights of the shares of each such series and any qualifications, limitations
or restrictions thereof. The number of authorized shares of Preferred Stock may
be increased or decreased (but not below the number of shares thereof then
outstanding) by the affirmative vote of the holders of a majority of the Common
Stock without a vote of the holders of the Preferred Stock, or of any series
thereof, unless a vote of any such holders is required pursuant to the terms of
any Preferred Stock Designation.

                Except as otherwise expressly provided in any Preferred Stock
Designation, any new series of Preferred Stock may be designated, fixed and
determined as provided herein by the board of directors without approval of the
holders of the Common Stock or the holders of Preferred Stock, or any series
thereof, and any such new series may have powers, preferences and rights,
including, without limitation, voting rights, dividend rights, liquidation
rights, redemption rights and conversion rights, senior

   2

to, junior to or pari passu with the rights of the Common Stock, or any future
class or series of Preferred Stock or Common Stock.

                                    ARTICLE V

        The following provisions are inserted for the management of the business
and the conduct of the affairs of the Corporation, and for further definition,
limitation and regulation of the powers of the Corporation and of its directors
and stockholders:

        A.      The business and affairs of the Corporation shall be managed by
                or under the direction of the board of directors. In addition to
                the powers and authority expressly conferred upon them by
                statute or by this Fifth Amended and Restated Certificate of
                Incorporation or the Bylaws of the Corporation, the directors
                are hereby empowered to exercise all such powers and do all such
                acts and things as may be exercised or done by the Corporation.

        B.      The directors of the Corporation need not be elected by written
                ballot unless the Bylaws so provide.

        C.      Any action required or permitted to be taken by the stockholders
                of the Corporation must be effected at a duly called annual or
                special meeting of stockholders of the Corporation and may not
                be effected by any consent in writing by such stockholders.

        D.      Special meetings of stockholders of the Corporation may be
                called only by the Chairman of the Board or the President or by
                the board of directors acting pursuant to a resolution adopted
                by a majority of the Whole Board. For purposes of this Fifth
                Amended and Restated Certificate of Incorporation, the term
                "Whole Board" shall mean the total number of authorized
                directors whether or not there exist any vacancies in previously
                authorized directorships.

                                   ARTICLE VI

        A.      Subject to the rights of the holders of any series of Preferred
                Stock to elect additional directors under specified
                circumstances, the number of directors shall be fixed from time
                to time by the board of directors pursuant to a resolution
                adopted by a majority of the Whole Board. The directors, other
                than those who may be elected by the holders of any series of
                Preferred Stock under specified circumstances, shall be divided
                into three classes, with the term of office of the first class
                to expire at the Corporation's first annual meeting of
                stockholders following the effectiveness of this Article, the
                term of office of the second class to expire at the
                Corporation's second annual meeting of stockholders following
                the effectiveness of this Article and the term of office of the
                third class to expire at the Corporation's third annual meeting
                of stockholders following the effectiveness of this Article. At
                each annual meeting of stockholders, directors elected to
                succeed those directors whose

   3

                terms expire shall be elected for a term of office to expire at
                the third succeeding annual meeting of stockholders after their
                election.

        B.      Subject to the rights of the holders of any series of Preferred
                Stock then outstanding, newly created directorships resulting
                from any increase in the authorized number of directors or any
                vacancies in the board of directors resulting from death,
                resignation, retirement, disqualification, removal from office
                or other cause shall, unless otherwise provided by law or by
                resolution of the board of directors, be filled only by a
                majority vote of the directors then in office, though less than
                a quorum, and directors so chosen shall hold office for a term
                expiring at the annual meeting of stockholders at which the term
                of office of the class to which they have been chosen expires.
                No decrease in the authorized number of directors shall shorten
                the term of any incumbent director.

        C.      Advance notice of stockholder nominations for the election of
                directors and of business to be brought by stockholders before
                any meeting of the stockholders of the Corporation shall be
                given in the manner provided in the Bylaws of the Corporation.

        D.      Subject to the rights of the holders of any series of Preferred
                Stock then outstanding, any directors, or the entire board of
                directors, may be removed from office at any time, but only for
                cause and only by the affirmative vote of the holders of at
                least sixty-six and two-thirds percent (66-2/3%) of the voting
                power of all of the then-outstanding shares of capital stock of
                the Corporation entitled to vote generally in the election of
                directors, voting together as a single class.

                                   ARTICLE VII

        A director of the Corporation shall not be personally liable to the
Corporation or its stockholders for monetary damages for breach of fiduciary
duty as a director, except for liability (i) for any breach of the director's
duty of loyalty to the Corporation or its stockholders, (ii) for acts or
omissions not in good faith or which involve intentional misconduct or a knowing
violation of law, (iii) under Section 174 of the General Corporation Law of the
State of Delaware, or (iv) for any transaction from which the director derived
any improper personal benefit. If the General Corporation Law of the State of
Delaware is amended after approval by the stockholders of this Article to
authorize corporate action further eliminating or limiting the personal
liability of directors then the liability of a director of the Corporation shall
be eliminated or limited to the fullest extent permitted by the General
Corporation Law of the State of Delaware as so amended.

        Any repeal or modification of the foregoing provisions of this Article,
or any adoption of any provision of this Fifth Amended and Restated Certificate
of Incorporation that is inconsistent with this Article, by the stockholders of
the Corporation

   4

shall not adversely affect any right or protection of a director of the
Corporation existing at the time of, or increase the liability of any director
of this Corporation with respect to any acts or omissions of such director
occurring prior to, such repeal, modification or adoption of such an
inconsistent provision.

                                  ARTICLE VIII

        The board of directors is expressly empowered to adopt, amend or repeal
the Bylaws of the Corporation. Any adoption, amendment or repeal of the Bylaws
of the Corporation by the board of directors shall require the approval of a
majority of the Whole Board. The stockholders shall also have power to adopt,
amend or repeal the Bylaws of the Corporation; provided, however, that, in
addition to any vote of the holders of any class or series of stock of the
Corporation required by law or by this Fifth Amended and Restated Certificate of
Incorporation, the affirmative vote of the holders of at least sixty-six and
two-thirds percent (66-2/3%) of the voting power of all of the then-outstanding
shares of the capital stock of the Corporation entitled to vote generally in the
election of directors, voting together as a single class, shall be required to
adopt, amend or repeal any provision of the Bylaws of the Corporation.

                                   ARTICLE IX

        In addition to any vote of the holders of any class or series of the
stock of the Corporation required by law or by this Fifth Amended and Restated
Certificate of Incorporation, the affirmative vote of the holders of a majority
of the voting power of all of the then outstanding shares of capital stock of
the Corporation entitled to vote generally in the election of directors, voting
together as a single class, shall be required to amend or repeal the provisions
of Article I, Article II, and Article III of this Fifth Amended and Restated
Certificate of Incorporation. Notwithstanding any other provision of this Fifth
Amended and Restated Certificate of Incorporation or any provision of law which
might otherwise permit a lesser vote or no vote, but in addition to any vote of
the holders of any class or series of the stock of this Corporation required by
law or by this Fifth Amended and Restated Certificate of Incorporation, the
affirmative vote of the holders of at least sixty-six and two-thirds percent
(66-2/3%) of the voting power of all of the then outstanding shares of the
capital stock of the Corporation entitled to vote generally in the election of
directors, voting together as a single class, shall be required to amend or
repeal any provision of this Fifth Amended and Restated Certificate of
Incorporation not specified in the preceding sentence.

                                     * * * *

        IN WITNESS WHEREOF, this Fifth Amended and Restated Certificate of
Incorporation, which restates and integrates and further amends the provisions
of the Corporation's Fourth Amended and Restated Certificate of Incorporation,
and which has been duly adopted in accordance with Sections 242 and 245 of the
General Corporation Law of the State of Delaware, has been executed by a duly
authorized officer of the Corporation.