-
Notifications
You must be signed in to change notification settings - Fork 1
Adapters
Answer currently includes multiple adapters. These allow for a combination of features and target Webserver hosts to be selected.
As development is still underway, some adapters may be lacking feature parity with others, the most complete is usually the Axis2C adapter
The axis2C adapter uses the axis2C stack to provide SOAP and XML/RPC services. Answer includes a build step to automatically generate the required service.xml file.
The FastCGI adapter allows interoperability with multiple application hosts (Webservers) such as Apache HTTPd, Nginx, Lighttpd, among others. It supports */RPC and REST Webservices.
To configure answer using the apache module, add the following your apache conf. :
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule fastcgi_module>
FastCgiServer "${ANSWER_PATH}/answer.fcgi" -processes 1 -initial-env servicesDir=${ANSWER_PATH}/examples
ScriptAlias /fcgiAnswer /usr/lib/answer/answer.fcgi
<Directory "${ANSWER_PATH}/answer">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</IfModule>
Since managing multiple FastCGI instances can introduce some performance penalties, Answer also provides a native ApacheModule adapter. This adapter supports */RPC style and REST Webservices.
To configure answer using the apache module, add the following your apache conf. :
LoadModule apreq_module modules/mod_apreq2.so
LoadModule answer_module modules/mod_answer.so
<IfModule answer_module>
# Services path
AnswerServicesDir ${ANSWER_PATH}/examples
<Location "/apacheAnswer">
SetHandler answer_module
</Location>
</IfModule>
This (experimental) adapter uses the Mongoose library to provide a self hosted binary with which to run the services.
To start a self hosted version of answer use the following command
$>answer_mongoose -p 8000 --services ./answer/examples
Use --help to list other options
$>answer_mongoose --help
Allowed options:
-h [ --help ] Display help
-p [ --port ] arg (=8080) Http port
-r [ --root ] [=arg(=.)] Path to document root
-s [ --services ] arg Services library directories
-b [ --base ] arg (=/services) Services base directory
#Summary
| Adapter | RPC | SOAP | Host |
|---|---|---|---|
| FastCGI | YES | NO | Multiple (FastCGI support) |
| ApacheModule | YES | NO | Apache |
| Axis2/C | XML only | YES | Apache |
| Mongoose | YES | NO | Self Hosted |