The Toolkit Compatibility Wrapper allows scripts that use i5 Toolkit functionalities to continue to do so with requests fulfilled by the XMLSERVICE Toolkit functions with none, or limited code changes.
Because the Toolkit Compatibility Wrapper uses the same function names as the i5 Toolkit , this extension must first be disabled for the Toolkit Compatibility Wrapper to be tested.
Use your standard ZENDSVR Apache instance.
Note:
This way is easiest, but any production applications that rely on i5 Toolkit may not work correctly if the extension is disabled.
|
|
|
To disable i5 Toolkit and test the Toolkit Compatibility Wrapper using Method 1:
|
|
Create a second Apache instance called CW where you can disable the i5comm extension. This “second instance” method is not supported by Zend, but allows you to test the Toolkit Compatibility Wrapper without interfering with existing applications. You will also get “auto prepending” of the Toolkit Compatibility Wrapper in your tests so you will not have to add an “include” or “require.”
|
|
|
To disable i5 Toolkit and test the Toolkit Compatibility Wrapper using Method 2:
Note: In the special PHP.INI file, you may want to set max_execution_time = 120 or so, so that experimental long-running demo scripts will not end prematurely.
Note: The CW instance will have a different port number than usual, perhaps something like 10092.
|
If you want to run your existing scripts with this CW server, you can let the Toolkit Compatibility Wrapper see them by adding Alias statements in Apache. For Example: # Allow CW instance to run old toolkit class library from zendsvr Alias /i5Toolkit_library /www/zendsvr/htdocs/i5Toolkit_library # Allow requests for files in Zend Server folders (see aliases above) <Directory /www/zendsvr/htdocs> Options FollowSymLinks order allow,deny allow from all AllowOverride all </Directory> |
To configure the Toolkit Compatibility Wrapper, open the /usr/local/zendsvr/share/ToolkitApi/toolkit.ini configuration file.
Configuration options include:
Calls to i5_program_call(), i5_userspace_get(), and i5_command() can provide output by creating PHP variables. The i5 Toolkit seemingly exported these variables into local scope (outside the i5_ function, of course), while the Toolkit Compatibility Wrapper beta exports such variables into global scope. Therefore, if these functions are used within a class or a function call, please add the line
if (function_exists('i5_output')) extract(i5_output());
after the function call.
When invoking i5_program_call(), i5_userspace_get(), and i5_command() in global space (directly in the called script, not from inside a function), no changes are required.
An annotated version of the old PHP Toolkit Documentation has been included that indicates which functions are supported by the Compatibility Wrapper.
Note:
For users of 5250 Bridge: Zend Server 5.1.1 (only available from IBM at this time) includes an updated version of 5250 Bridge that works with the new toolkit, so the Toolkit Compatibility Wrapper is not required for the 5250 Bridge.
For further information on the XMLSERVICE Toolkit and the Toolkit Compatibility Wrapper, including technical documentation and updates, go to http://www.youngiprofessionals.com/wiki/XMLSERVICE.
|
|
|
Related Links: |
|
|
© 1999-2013 Zend Technologies, Ltd. All rights reserved.