qpid-tool session -- qpid: list methodtest Object Summary: ID Created Destroyed Index ============================================ 138 00:00:00 - test:methodtest: qpid: schema methodtest Object Class: Table Class: test:methodtest(8d301221-07bd-5e35-3e18-59626ef74dd9) Method: SuccessNoOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessNoOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessWithOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessWithOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorNoOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorNoOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorWithOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorWithOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O qpid: call 138 SuccessNoOutputNoText qpid: OK (0) - {u'output': ''} qpid: call 138 SuccessNoOutputWithText qpid: OK (0) - {u'output': ''} qpid: call 138 SuccessWithOutputNoText qpid: OK (0) - {u'output': 'SuccessWithOutputNoText'} qpid: call 138 SuccessWithOutputWithText qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'} call 138 SuccessWithOutputWithText qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'} qpid: call 138 ErrorNoOutputNoText qpid: error (7) - {} qpid: call 138 ErrorNoOutputWithText qpid: error (7) - {} qpid: call 138 ErrorWithOutputNoText qpid: error (7) - {} qpid: call 138 ErrorWithOutputWithText qpid: error (7) - {} qpid: quit Exiting... QMF C++ Agent session -- $ ./a.out SignalFD: 7 Waiting...1 SuccessNoOutputNoText called Waiting...2 SuccessNoOutputWithText called Waiting...3 SuccessWithOutputNoText called Waiting...4 SuccessWithOutputWithText called Waiting...5 SuccessWithOutputWithText called Waiting...6 ErrorNoOutputNoText called Waiting...7 ErrorNoOutputWithText called Waiting...8 ErrorWithOutputNoText called Waiting...9 ErrorWithOutputWithText called Waiting...10 Expected output for qpid-tool session... For all Error cases, the agent supplied error code should be returned and possibly error text.
Created attachment 422284 [details] MethodTest Agent
Created attachment 422285 [details] MethodTest QMF Schema
Fixed upstream in revision 953885.
Matt, this simple example is a perfect fit for Bug 606391. All that is needed to compile and run the example is to install qmf-devel and qpid-cpp-server (incl. dependencies) and cyrus-sasl-plain (see the above mentioned bug). # qmf-gen MethodTest.xml ... # gcc -g MethodTest.cpp test/MethodTest.cpp -lqpidcommon -lqpidclient -lqmf # ./a.out
This is my session on RHEL5 x86_64, packages python-qmf-0.7.946106-4.el5 python-qpid-0.7.946106-2.el5 qmf-devel-0.7.946106-4.el5 qpid-cpp-client-devel-0.7.946106-4.el5 qpid-cpp-server-0.7.946106-4.el5 qpid-tools-0.7.946106-4.el5 ------------------------------------------------------------------------ # qpid-tool Management Tool for QPID qpid: list methodtest Object Summary: ID Created Destroyed Index ============================================ 101 10:02:48 - test:methodtest: qpid: schema methodtest Object Class: Table Class: test:methodtest(8d301221-07bd-5e35-3e18-59626ef74dd9) Method: SuccessNoOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessNoOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessWithOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: SuccessWithOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorNoOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorNoOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorWithOutputNoText Argument Type Direction Unit Description ===================================================== output long-string O Method: ErrorWithOutputWithText Argument Type Direction Unit Description ===================================================== output long-string O qpid: call 101 SuccessNoOutputNoText qpid: OK (0) - {u'output': ''} qpid: call 101 SuccessNoOutputWithText qpid: OK (0) - {u'output': ''} qpid: call 101 SuccessWithOutputNoText qpid: OK (0) - {u'output': 'SuccessWithOutputNoText'} qpid: call 101 SuccessWithOutputWithText qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'} qpid: call 101 SuccessWithOutputWithText qpid: OK (0) - {u'output': 'SuccessWithOutputWithText'} qpid: call 101 ErrorNoOutputNoText qpid: (67482) - {} qpid: call 101 ErrorNoOutputWithText qpid: Error no output (67512) - {} qpid: call 101 ErrorWithOutputNoText qpid: (67516) - {} qpid: call 101 ErrorWithOutputWithText qpid: Error with output (67520) - {} qpid: quit Exiting... ------------------------------------------------------------------------
I would expect something like: qpid: call 101 ErrorWithOutputNoText qpid: (67516) - {u'output': 'ErrorWithOutputNoText'} and so on. Am I right?
Let's check with Ted - when an error (STATUS_USER) is returned, are output parameters also returned? If so, we have a new BZ, if not we're good.
Output parameters are only returned if the status is SUCCESS. In all failure cases, the only data returned is the error code and a text string. Note that this is for QMFv1 only. In QMFv2, errors are reported via exception which can carry arbitrary data. -Ted
This way I consider it VERIFIED. Thanks for comment.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, the error codes supplied by a QMF agent were being sent back as only one type of an exception. This rendered the error codes unusable for debugging the QMF agent's behavior. With this update, the QMF implementation logic was changed to accommodate error return codes for every error produced. Error codes can now be sent by a QMF agent and be distinguished by the QMF console.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html