| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() |
![]() |
Events are Hashes, Hashes are EventsWell, pretty close...at least that's the spirit. Line 21 of the previous example shows the new " When converted to a hash, the event fields are copied as hash keys. The hash will sport an extra key, though, named " Working in reverse, a new event can be created from an existing Perl hash:
In the true Perl spirit, there is no need to worry about pesky data types -- The Aw marshaling layer will properly convert and set each field's data type based upon the broker's stored event type definition. Another demonstration script in the Aw package tests the hash-to-event conversion robustness. The Perl script "Event of Doom" is a deeply-nested horror of struct arrays within struct arrays and so on. The struct arrays include every available event data type. The script "eod.pl" illustrates the initialization of the complex "Event of Doom". The script "eod-autotest.pl" goes one step further. It creates a test broker, a client group, an event definition (by applying hashes to typedefs) and the event. It then destroys the definitions and broker to complete the test. Uses of the Perl Aw packageThe Aw package was developed as an interface between ActiveWorks brokers and a very large infrastructure developed in Perl. The author has rapidly developed clients and adapters using the package and has not encountered limitations of any sort. Some noteworthy projects involved using Perl scripts to create adapter clients in addition to embedding clients in server-side processed HTML documents. A mod_perl example that comes with the Aw package plays Tic-Tac-Toe in a Web browser against an adapter. Imagine using the ActiveWorks broker "Monitor" to view Apache servers! Perhaps more practically, an Enterprise broker can be turned into a SOAP server with Perl's SOAP-Lite package. The additional package, SOAP-Lite-ActiveWorks, provides all that you need to do just that. The SOAP-Lite-ActiveWorks package also offers a gateway between an existing SOAP server and an Enterprise broker. Limitations of the Aw packageThe version of the Aw package at the time of this writing is 0.16.2. The The author has only deployed the package on the Solaris 2.6 platform and Perl versions 5.004_04 up to the present 5.8, and with ActiveWorks versions 3.0 and 4.0.2. Reliability with other versions is unknown. A terse API reference comes with the Aw package. It is just enough to illustrate usage. Since the Perl APIs are modeled closely on the Java architecture, the webMethods Java Platform reference serves double duty as the Perl guide. More than a few examples are provided with the package housed in the " Finally, it must be noted that the Aw package was developed by neither Active Software nor the webMethods corporation. The package is not in anyway endorsed, supported or guaranteed by webMethods. As with most every open source software, you are on your own in terms of installation and setup support. That said, the author is available to offer limited assistance via email or in the webMethods User Community forums. Go Deeper on the Subject: The wMUsers Discussion Forums Daniel Mekonnen has over 10 years of IT experience working with information exchange systems and has worked with webMethods since 1999. He enjoys the challenge of bringing systems together with enterprise technologies, data architecture design, and XML API design with standards like SOAP, WSDL and XML-RPC. Daniel works as a consultant in Northern Virginia.
Daniel can be reached via email at |
| © All Rights Reserved, 2001-2008. |