You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2008/06/18 14:17:37 UTC
svn commit: r669144 [1/4] - in
/webservices/axis2/branches/c/post_1_4_mtom/c: ./ axiom/src/parser/libxml2/
include/ src/core/clientapi/ src/core/transport/http/common/
src/core/transport/http/sender/ src/core/transport/http/server/IIS/
src/core/transpo...
Author: manjula
Date: Wed Jun 18 05:17:36 2008
New Revision: 669144
URL: http://svn.apache.org/viewvc?rev=669144&view=rev
Log:
Commiting latest changes from the trunk.
Modified:
webservices/axis2/branches/c/post_1_4_mtom/c/ (props changed)
webservices/axis2/branches/c/post_1_4_mtom/c/CREDITS
webservices/axis2/branches/c/post_1_4_mtom/c/INSTALL
webservices/axis2/branches/c/post_1_4_mtom/c/NEWS
webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
webservices/axis2/branches/c/post_1_4_mtom/c/configure.ac
webservices/axis2/branches/c/post_1_4_mtom/c/include/axis2_http_transport_utils.h
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/clientapi/op_client.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_worker.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/sender/http_transport_sender.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/IIS/axis2_iis_worker.c
webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/util/http_transport_utils.c
webservices/axis2/branches/c/post_1_4_mtom/c/util/configure.ac
webservices/axis2/branches/c/post_1_4_mtom/c/util/include/axutil_error_default.h
webservices/axis2/branches/c/post_1_4_mtom/c/util/include/platforms/windows/axutil_windows.h
webservices/axis2/branches/c/post_1_4_mtom/c/util/src/class_loader.c
webservices/axis2/branches/c/post_1_4_mtom/c/util/src/network_handler.c
webservices/axis2/branches/c/post_1_4_mtom/c/util/src/platforms/windows/axutil_windows.c
webservices/axis2/branches/c/post_1_4_mtom/c/xdocs/docs/axis2c_manual.html
webservices/axis2/branches/c/post_1_4_mtom/c/xdocs/docs/faq.html
webservices/axis2/branches/c/post_1_4_mtom/c/xdocs/docs/index.html
webservices/axis2/branches/c/post_1_4_mtom/c/xdocs/docs/installationguide.html
Propchange: webservices/axis2/branches/c/post_1_4_mtom/c/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 18 05:17:36 2008
@@ -1 +1 @@
-/webservices/axis2/trunk/c:1-666519
+/webservices/axis2/trunk/c:1-669142
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/CREDITS
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/CREDITS?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/CREDITS (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/CREDITS Wed Jun 18 05:17:36 2008
@@ -1,8 +1,11 @@
-James Clark, author of Expat, for having provided very useful guidance on the proper way to design and implement a highly reusable C library.
+James Clark, author of Expat, for having provided very useful guidance on the
+proper way to design and implement a highly reusable C library.
Apache Project's
----------------
-Apache Axis2 [http://ws.apache.org/axis2] - Initial Architecture
-Apache Maven [http://maven.apache.org/] - Site generation.
-Apache APR [http://apr.apache.org/] - Versioning Guideline, Some codes in util
-Apache HTTPD [http://httpd.apache.org/] - mod_axis2
+Apache Axis2 [http://ws.apache.org/axis2] - Initial Architecture
+Apache Maven [http://maven.apache.org/] - Site generation
+Apache APR [http://apr.apache.org/] - Versioning Guideline,
+ Some codes in util
+Apache HTTPD [http://httpd.apache.org/] - mod_axis2
+Apache Qpid [http://cwiki.apache.org/qpid/index.html] - AMQP implementation
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/INSTALL
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/INSTALL?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/INSTALL (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/INSTALL Wed Jun 18 05:17:36 2008
@@ -1,538 +1,720 @@
-Table of Contents
-=================
-
-1. Getting Axis2/C working with the binary release on Linux
-2. Getting Axis2/C working with the source release on Linux
-3. Getting Axis2/C working with the binary release on Windows (win32)
- 3.1 Requirements
- 3.2 Binaries in the release
- 3.3 Running the binaries
-4. Getting Axis2/C working with the source release on Windows (win32)
- 4.1 Requirements
- 4.2 Editing Configure.in file
- 4.3 Compiling the source
- 4.4 Running the binaries
-5. Installing Apache2 Web Server integration module (mod_axis2)
-
-
-1. Getting Axis2/C working with the binary release on Linux.
-============================================================
-
-1. Extract the binary tar package to a directory.
-
-2. Set AXIS2C_HOME environment variable pointing to the location where you have
- extracted Axis2/C
- AXIS2C_HOME='/your_path_to_axis2c'
- export AXIS2C_HOME
-
- NOTE: You will need to set AXIS2C_HOME only if you need to run Axis2/C
- samples or tests. The reason is that the samples and test codes use
- AXIS2C_HOME to get the path to Axis2/C. To write your own services or
- clients this is not a requirement.
-
-3. Run the simple axis server:
- cd /your_path_to_axis2c/bin
- ./axis2_http_server
- This will start the simple axis server on port 9090. To see the possible
- command line options run
- ./axis2_http_server -h
-
- NOTE: If you run into shared lib problems, set the LD_LIBRARY_PATH
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib
-
-4. Run the sample clients in a new shell
- cd /your_path_to_axis2c/bin/samples
- ./echo
- This will invoke the echo service.
-
- ./math
- This will invoke the math service.
-
- To see the possible command line options for sample clients run them with
- '-h' option
-
- NOTE: If you run into shared lib problems, set the LD_LIBRARY_PATH
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your_path_to_axis2c/lib
-
-
-2. Getting Axis2/C working with the source release on Linux.
-============================================================
-
-1. Extract the source tar package to a directory
-
-2. Set AXIS2C_HOME environment variable pointing to the location where you want
- to install Axis2/C.
- AXIS2C_HOME='/your_desired_path_to_axis2c_installation'
- export AXIS2C_HOME
-
- NOTE: You will need to set AXIS2C_HOME only if you need to run Axis2/C
- samples or tests. The reason is that the samples and test codes use
- AXIS2C_HOME to get the path to Axis2/C. To write your own services or
- clients this is not a requirement.
-
-3. Go to the directory where you extracted the source
- cd /your_path_to_axis2c_source
-
-4. Build the source
- This can be done by running the following command sequence in the directory
- where you have extracted the source.
-
- ./configure --prefix=${AXIS2C_HOME}
- make
- sudo make install
-
- Please run './configure --help' in respective sub folders for more
- information on these configure options.
-
- NOTE: If you don't provide the --prefix configure option, it will by default
- be installed into '/usr/local/axis2c' directory.
-
- You could run 'make check' to test if everything is working fine. However,
- note that the test/core/clientapi/test_clientapi program would fail unless
- AXIS2C_HOME points to the installed location. (It's looking for Axis2/C
- repository) This means you really should run 'make && make install',
- then set 'AXIS2C_HOME=/path/to/install', and then 'make check'.
- That's a little different than the usual 'make && make check && make
- install' process.
-
- You may need to try Axis2/C with Libxml2 xml parser. You can do it by giving
- '--enable-libxml2=yes' as a configure option.
-
- ./configure --enable-libxml2=yes [other configuration options]
- make
- sudo make install
-
- If you need to get the samples working, you also need to build the samples.
-
- To build the samples:
-
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/axis2c/lib/
- cd samples
- ./configure --prefix=${AXIS2C_HOME} --with-axis2=${AXIS2C_HOME}/include/axis2-1.4.0
- make
- sudo make install
-
- Please run './configure --help' in samples folder for more information on
- configure options.
-
- NOTE: If you don't provide a --prefix configure option, samples will by default
- be installed into '/usr/local/axis2c/samples' directory.
-
-5. Go to the folder where you installed Axis2/C.
-
-6. Start simple axis server
- cd ${AXIS2C_HOME}/bin
- ./axis2_http_server
-
- This will start the simple axis server on port 9090. To see the possible command
- line options run:
- ./axis2_http_server -h
-
- NOTE: You may need to be login as superuser to run the simple axis server.
-
-8. Run the sample clients in a new shell
- cd ${AXIS2C_HOME}/bin/samples
- ./echo
- This will invoke the echo service.
-
- ./math
- This will invoke the math service.
-
- To see the possible command line options for sample clients, run them with
- '-h' option.
-
-
-3. Getting Axis2/C working with the binary release on Windows.
-==============================================================
-
-3.1 Requirements
-----------------
-
- * The binaries shipped with this version are compiled with Microsoft Visual
- Studio compiler (cl)
-
- Note: You can download Microsoft VS Express2005 Edition from Microsoft
- website and install it to run these binaries
-
- * You also need the following dlls
- - iconv.dll [http://www.zlatkovic.com/pub/libxml - version >= iconv-1.9.1.win32]
- - zlib1.dll [http://www.zlatkovic.com/pub/libxml - version >= zlib-1.2.3.win32]
-
- * You might optionally need the following dlls
- - libxml2.dll [http://www.zlatkovic.com/pub/libxml - version >= libxml2-2.6.20.win32]
-
-3.2 Binaries in the release
----------------------------
-
- Extract the binary distribution to a folder of your choice.
- (example: C:\axis2c)
-
- The c:\axis2c folder structure is as follows.
-
- axis2c
- |
- +- bin - server and other executables
- | |
- | +- samples - samples go here
- | |
- | +...
- |
- |
- +- docs - documentation
- |
- +- include - all include files of axis2
- |
- +- lib - library modules
- |
- +- logs - system and client logs are written to this folder
- |
- +- modules - deployed modules
- |
- +- samples - source files of the samples in bin
- |
- +- services - deployed services
-
- Copy the downloaded iconv.dll and zlib1.dll to C:\axis2c\lib
- You might optionally require to copy the libxml2.dll as well
- (Or you can have these dll's some other place and add the location to PATH
- environment variable)
-
-
-3.3 Running the binaries
-------------------------
-
- You need to set a couple of environment variables before you can run the
- server and samples.
-
- Set the variable AXIS2C_HOME to the deploy folder (C:\axis2c)
- Add the path to lib directory to the PATH variable (%AXIS2C_HOME%\lib)
-
- Now everything is set to run the server!
-
- C:\axis2c\bin>axis2_http_server.exe
-
- You should see the message:
- Started Simple Axis2 HTTP Server...
-
- By default the log is created under %AXIS2C_HOME%\logs folder with the name
- axis2.log.
-
- NOTE: You may provide command line options to change the default behaviour.
- Type 'axis2_http_server.exe -h' to learn about the usage)
-
- Now you can run any sample client deployed under %AXIS2C_HOME%\bin\samples\
- Example:
- C:\axis2c\bin\samples>echo.exe
-
-
-4. Getting Axis2/C working with the source release on Windows.
-============================================================
-
-4.1 Requirements
-----------------
-
- * The makefile shipped with this version needs Microsoft Visual Studio
- compiler (cl) and nmake build tool
-
- NOTE: You can download Microsoft VS Express2005 Edition and Platform SDK from
- Microsoft website. You will need to add the path to Platform SDK Include
- and Lib folders to the makefile.
-
- * You also need
- - iconv [http://www.zlatkovic.com/pub/libxml - download the version >= iconv-1.9.1.win32]
- - zlib [http://www.zlatkovic.com/pub/libxml - download the version >= zlib-1.2.3.win32]
-
- * You might optionally need the following dlls
- - libxml2.dll [http://www.zlatkovic.com/pub/libxml - version >= libxml2-2.6.20.win32]
-
-4.2 Editing configure.in file
------------------------------
-
- The default places for iconv and zlib are specified in configure.in.
-
- Example:
- Default location for zlib is C:\zlib
- You can either extract zlib to this folder. Folder structure should
- look like the following.
- C:\zlib
- |
- +- include
- |
- +- bin
- |
- +- lib
-
- Or extract to whatever place of your choice and edit the configure.in
- accordingly.
-
- You need to have zlib1.dll in a library path.
-
- In order to use the Libxml2 xml parser set 'ENABLE_LIBXML2 = 1'. This will
- require you specifying the path to libxml2.
-
-4.3 Compiling the source
-------------------------
-
- Extract the source distribution to a folder of your choice.
- (Example: C:\axis2c)
- Open a DOS shell and type:
- cd C:\axis2c\build\win32
- C:\axis2c\build\win32>vcvars32.bat
- to access .Net tools
- (Note: You may need to set the PATH environment
- variable to vcvars32.bat if Windows complains
- that it cannot find this bat)
- C:\axis2c\build\win32>nmake install
-
- That's it! This will build the system and create a directory named 'deploy'
- under the build directory.
-
- The deploy folder structure is as follows.
-
- deploy
- |
- +- bin - server and other executables
- | |
- | +- samples - samples go here
- | |
- | +...
- |
- +- lib - library modules
- |
- +- services - deployed services
- |
- +- modules - deployed modules
- |
- +- include - all include files of axis2
- |
- +- logs - system and client logs are written to this folder
-
-4.4 Running the binaries
-------------------------
-
- You need to set a couple of environment variables before you can run the
- server and samples.
-
- Set the variable AXIS2C_HOME to the deploy folder (C:\axis2c\build\deploy)
- Add the path to lib directory to the PATH variable (%AXIS2C_HOME%\lib)
-
- Copy iconv.dll and zlib1.dll to the Axis2/C lib folder
- (%AXIS2C_HOME%\lib)
-
- You might optionally require to copy the libxml2.dll to the Axis2/C lib
- folder (%AXIS2C_HOME%\lib)
-
- Now everything is set to run the server!
-
- C:\axis2c\build\deploy\bin>axis2_http_server.exe
-
- You should see the message
- Started Simple Axis2 HTTP Server...
-
- By default, the log is created under %AXIS2C_HOME%\logs folder with the
- name axis2.log.
- (Note: You may provide command line options to change the default
- behaviour. Type 'axis2_http_server.exe -h' to learn about the usage)
-
- Now you can run any sample client deployed under %AXIS2C_HOME%\bin\samples\
- Example:
- C:\axis2c\build\deploy\bin\samples>echo.exe
-
-
-5. Installing Apache2 Web Server integration module (mod_axis2)
----------------------------------------------------------------
-
-5.1 Building mod_axis2 from the source tree
-
-5.1.1 On the Linux Platform
-
- Provide the Apache2 include file location as a configure option
- ./configure --with-apache2="<apache2 httpd include files location>" [other configure options]
-
- NOTE: Some apache2 distributions install APR (Apache Portable Run-time)
- include files in a separate location which is required to build mod_axis2.
- In that case use:
- ./configure --with-apache2="<apache2 directornclude files location>>"
- --with-apr="<apr include files location>" [other configure options]
-
- Then build the source tree
- make
- make install
-
- This will install mod_axis2.so into your "<your_path_to_axis2c>/lib"
-
-5. 1.4.0 On Win32 platform
-
- Provide the apache2 location in configure.in file in APACHE_INSTALL_DIR
- Example:
- APACHE_INSTALL_DIR = E:\Apache
-
- After compiling the sources (as described in section 4.3) build the
- mod_axis2.dll by issuing the command 'nmake axis2_apache_module'.
- This will build mod_axis2.dll and copy it to %AXIS2C_HOME%\lib directory.
- Example:
- C:\axis2c\build\deploy\lib
-
-5.2 Deploying in Apache2 Web Server
-
- NOTE: To do the following tasks, you might need super user privileges in your
- machine.
-
- Copy the mod_axis2 (libmod_axis2.so.0.3.1 on Linux and mod_axis2.dll
- in Windows) to "<apache2 modules directory>" as mod_axis2.so
- Example:
- cp $AXIS2C_HOME/lib/libmod_axis2.so.0.3.1 /usr/lib/apache2/modules/mod_axis2.so
- in Linux or
-
- copy C:\axis2c\build\deploy\lib\mod_axis2.dll C:\Apache2\modules\mod_axis2.so
- in Windows
-
- Edit the Apache2's configuration file (generally httpd.conf) and add the
- following directives
-
- LoadModule axis2_module <apache2 modules directory>/mod_axis2.so
- Axis2RepoPath <axis2 repository path>
- Axis2LogFile <axis2 log file path>
- Axis2MaxLogFileSize <maximum size of log file>
- Axis2LogLevel LOG_LEVEL
- <Location /axis2>
- SetHandler axis2_module
- </Location>
-
- NOTE: Axis2 log file path should have write access to all users because by
- default Apache Web Server runs as nobody.
- NOTE: If you want to use a Shared Global Pool with Apache you have to give
- another entry called Axis2GlobalPoolSize.You have to give the size of
- the shared global pool in MB.If you doesn't set the value or if you
- set a negative value Apache module doesn't create shared global pool.
-
- Axis2GlobalPoolSize <global pool size in MB>
-
- LOG_LEVEL can be one of following
- crit - Log critical errors only
- error - Log errors critical errors
- warn - Log warnings and above
- info - Log info and above
- debug - Log debug and above (default)
- trace - Log trace messages
-
- NOTE: Use forward slashes "/" for path separators in
- <apache2 modules directory>, <axis2 repository path> and
- <axis2 log file path>
-
- Make sure that the apache2 user has the correct permissions to above paths
- - Read permission to the repository
- - Write permission to the log file
-
- Restart apache2 and test whether mod_axis2 module is loaded by typing the URL
- http://localhost/axis2/services
-
-
-6. Installing IIS (Interner Information Server) integration module (mod_axis2_IIS)
-----------------------------------------------------------------------------------
-
-6.1 Building mod_axis2_IIS from the source tree
-
- After compiling the sources (as described in section 4.3) build the
- mod_axis2.dll by issuing the command 'nmake axis2_IIS_module'.
- This will build the mod_axis2_IIS.dll and copy it to %AXIS2C_HOME%\lib
- directory.
- Example:
- C:\axis2c\build\deploy\lib
-
-6.2 Deploying in the IIS
-
- Add the following key to the registery.
-
- HKEY_LOCAL_MACHINE\SOFTWARE\Apache Axis2c\IIS ISAPI Redirector
-
- Under this registry key add the following entries.
-
- Add a string value with the name axis2c_home and a value of the axis2c home
- path
- Example: c:\axis2c
- Add a string value with the name log_file and a value of absolute path of
- the log file
- Example: c:\axis2c\logs\axis2.log
- Add a string value with the name log_level. The value can be one of the
- following
- trace - Log trace messages
- error - Log errors critical errors
- info - Log info and above
- critical - Log critical errors only
- debug - Log debug and above (default)
- warning - Log warnings
-
- Using the IIS management console, add a new virtual directory to the
- IIS/PWS web site called "axis2" The physical path of this virtual
- directory should be the axis2\lib directory (Where the mod_axis2_IIS.dll
- is in)
- Assign excecute permissions to this virtual directory.
-
- Using the IIS management console, add mod_axis2_IIS.dll as a filter to the
- IIS/PWS web site. The name of the filter can be any meaningful name.
-
- Restart IIS and test whether mod_axis2_IIS module is loaded by typing the
- URL http://localhost/axis2.
- Enjoy Axis2/C!
-
-
-FAQ
-===
-
-1. Although I was able to get simple axis server up, unable to run samples.
-
- This could happen because the AXIS2C_HOME environment variable is not
- set to the correct axis2 installation path.
-
-
-2. What are the other dependencies Axis2/C has?
-
- Basically if you are willing to use libxml2 as your parser, you need to
- have it installed on your system.
- libxml2 - http://xmlsoft.org/downloads.html
-
-3. I installed libxml2 installed in my system, but ./configure fails saying
- "libxml2 not found"
-
- Yes, you need to install libxml2-dev packages.
-
- 1. If you are using a debian based system
- apt-get install libxml2-dev
- 2. If you are using redhat/fedora based system.
- yum install libxml2-dev
- 3. If you compile libxml2 from source you will not get this error.
-
-4. Is there any recommended packages, that I need to instal in my system?
-
- 1. automake, autoconf, libtool, aclocal
- 2. libxml2 and libxml2-dev
- 5. pkg-config
-
-5. I tried several methods, browse through axis-c-dev and axis-c-user mail
- archives but I was not able solve it.
-
- Then you can ask from Axis2/C users or Axis2/C developers about it by
- sending your question to
- user = axis-c-user@ws.apache.org
- developer = axis-c-dev@ws.apache.org
-
- You can get subscribe to
-
- axis-c-user list by sending request to
- <ax...@ws.apache.org>
-
- axis-c-dev list by sending request to
- <ax...@ws.apache.org>
-
- subject of the request should be "subscribe"
-
-
-6. This FAQ is not enough...
-
- You can help us by reporting your suggestions, complaints, problems and bugs
-
-
-
-
-Thank you for using Axis2/C ...
+Table of Contents
+=================
+1. Getting Axis2/C Working on Linux
+
+ 1.1 Setting up Prerequisites
+ 1.1.1 Mandatory
+ 1.1.2 Optional
+ 1.2 Using Binary Release
+ 1.3 Using Source Release
+ 1.3.1 Basic Build
+ 1.3.2 Build with Options
+ (a) With Guththila
+ (b) With libxml2
+ (c) With AMQP Transport
+ 1.3.3 Building Samples
+ 1.4 Configuration
+ 1.4.1 AMQP Transport
+ 1.5 Running Samples
+ 1.5.1 HTTP Transport
+ (a) Server
+ (b) Clients
+ 1.5.2 AMQP Transport
+ (a) Server
+ (b) Client
+
+2. Getting Axis2/C Working on Windows (Win32)
+
+ 2.1 Setting up Prerequisites
+ 2.1.1 Mandatory
+ 2.1.2 Optional
+ 2.2 Using Binary Release
+ 2.3 Using Source Release
+ 2.3.1 Setting Build Options
+ (a) Setting zlib Location
+ (b) Enable Guththila
+ (c) Enable libxml2
+ (d) Enable SSL Support
+ (e) Enable libcurl
+ 2.3.2 Compiling the Source
+ 2.4 Running Samples
+ 2.4.1 HTTP transport
+ (a) Server
+ (b) Clients
+
+3. Installing Apache2 Web Server Integration Module (mod_axis2)
+
+ 3.1 Building mod_axis2 from Source
+ 3.1.1 On Linux
+ 3.1.2 On Windows (Win32)
+ 3.2 Deploying in Apache2 Web Server
+
+4. Installing IIS (Interner Information Server) Integration Module
+ (mod_axis2_IIS)
+
+ 4.1 Building mod_axis2_IIS from Source
+ 4.2 Deploying in the IIS
+
+5. FAQ
+
+
+1. Getting Axis2/C Working on Linux
+===================================
+
+ 1.1 Setting up Prerequisites
+ ----------------------------
+
+ 1.1.1 Mandatory
+ ---------------
+ (a) zlib - http://www.zlib.net/
+
+ 1.1.2 Optional
+ --------------
+ (a) libxml2 - http://www.xmlsoft.org/
+ (b) libiconv - http://www.gnu.org/software/libiconv/
+
+ (c) Apache Qpid - You need to have Qpid libraries installed on your machine
+ if you are going to use AMQP transport. It is imperative
+ that you compile and install Qpid from SVN source.
+ You can checkout Qpid SVN source from
+ https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid.
+
+ 1.2 Using Binary Release
+ ------------------------
+
+ (a) Extract the binary tar package to a directory.
+
+ (b) Set AXIS2C_HOME environment variable pointing to the location where you
+ have extracted Axis2/C.
+
+ $ AXIS2C_HOME='/your_path_to_axis2c'
+ $ export AXIS2C_HOME
+
+ NOTE : You will need to set AXIS2C_HOME only if you need to run Axis2/C
+ samples or tests. The reason is that the samples and test codes
+ use AXIS2C_HOME to get the path to Axis2/C. To write your own
+ services or clients this is not a requirement.
+
+ 1.3 Using Source Release
+ ------------------------
+
+ 1.3.1 Basic Build
+ -----------------
+
+ (a) Extract the source tar package to a directory
+
+ (b) Set AXIS2C_HOME environment variable pointing to the location where you
+ want to install Axis2/C.
+
+ $ AXIS2C_HOME='/your_desired_path_to_axis2c_installation'
+ $ export AXIS2C_HOME
+
+ NOTE : You will need to set AXIS2C_HOME only if you need to run Axis2/C
+ samples or tests. The reason is that the samples and test codes
+ use AXIS2C_HOME to get the path to Axis2/C. To write your own
+ services or clients this is not a requirement.
+
+ (c) Go to the directory where you extracted the source
+
+ $ cd /your_path_to_axis2c_source
+
+ (d) Build the source
+ This can be done by running the following command sequence in the
+ directory where you have extracted the source.
+
+ $ ./configure --prefix=${AXIS2C_HOME}
+ $ make
+ $ make install
+
+ Please run './configure --help' in respective sub directories for more
+ information on these configure options.
+
+ NOTE : If you don't provide the --prefix configure option, it will by
+ default be installed into '/usr/local/axis2c' directory.
+
+ You could run 'make check' to test if everything is working fine. However,
+ note that the test/core/clientapi/test_clientapi program would fail unless
+ AXIS2C_HOME points to the installed location. (It's looking for Axis2/C
+ repository) This means you really should run 'make && make install',
+ then set 'AXIS2C_HOME=/path/to/install', and then 'make check'.
+ That's a little different than the usual 'make && make check && make
+ install' process.
+
+ 1.3.2 Build with Options
+ ------------------------
+
+ (a) With Guththila
+ ------------------
+ You may need to try Axis2/C with Guththila XML parser. You can do it by
+ giving '--enable-guththila=yes' as a configure option.
+
+ $ ./configure --enable-guththila=yes [other configuration options]
+ $ make
+ $ make install
+
+ (b) With libxml2
+ ----------------
+
+ You may need to try Axis2/C with libxml2 XML parser. You can do it by
+ giving '--enable-libxml2=yes' as a configure option.
+
+ $ ./configure --enable-libxml2=yes [other configuration options]
+ $ make
+ $ make install
+
+ (c) With AMQP Transport
+ -----------------------
+
+ You may need to try Axis2/C with the AMQP transport. You can do it by
+ giving '--with-qpid=/path/to/qpid/home' as a configure option.
+
+ $ ./configure --with-qpid=/path/to/qpid/home [other configuration options]
+ $ make
+ $ make install
+
+ 1.3.3 Building Samples
+ ----------------------
+
+ If you need to get the samples working, you also need to build the samples.
+
+ To build the samples:
+
+ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib/
+ $ cd samples
+ $ ./configure --prefix=${AXIS2C_HOME}
+ --with-axis2=${AXIS2C_HOME}/include/axis2-1.4.0
+ $ make
+ $ make install
+
+ Please run './configure --help' in samples folder for more information on
+ configure options.
+
+ NOTE : If you don't provide a --prefix configure option, samples will by
+ default be installed into '/usr/local/axis2c/samples' directory.
+
+ 1.4 Configuration
+ -----------------
+
+ 1.4.1 AMQP Transport
+ --------------------
+
+ You need to add the following entries into the axis2.xml.
+
+ <transportReceiver name="amqp" class="axis2_amqp_receiver">
+ <parameter name="qpid_broker_ip" locked="false">127.0.0.1</parameter>
+ <parameter name="qpid_broker_port" locked="false">5672</parameter>
+ </transportReceiver>
+
+ <transportSender name="amqp" class="axis2_amqp_sender"/>
+
+ 1.5 Running Samples
+ -------------------
+
+ 1.5.1 HTTP Transport
+ --------------------
+
+ (a) Server
+ ----------
+
+ You have to first start the axis2_http_server as follows.
+
+ $ cd ${AXIS2C_HOME}/bin
+ $ ./axis2_http_server
+
+ You should see the message
+ Started Simple Axis2 HTTP Server...
+
+ This will start the simple axis server on port 9090. To see the possible
+ command line options run
+
+ $ ./axis2_http_server -h
+
+ NOTE 1 : You may need to login as superuser to run the axis2_http_server.
+ NOTE 2 : If you run into shared lib problems, set the LD_LIBRARY_PATH as
+ follows.
+
+ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
+
+ (b) Clients
+ -----------
+
+ When the axis2_http_server is up and running, you can run the sample
+ clients in a new shell as follows.
+
+ $ cd ${AXIS2C_HOME}/bin/samples
+ $ ./echo
+ This will invoke the echo service.
+
+ $ ./math
+ This will invoke the math service.
+
+ To see the possible command line options for sample clients run them
+ with '-h' option
+
+ NOTE : If you run into shared lib problems, set the LD_LIBRARY_PATH as
+ follows.
+ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
+
+ 1.5.2 AMQP Transport
+ --------------------
+
+ (a) Server
+ ----------
+
+ Start the Qpid broker as follows.
+
+ $ cd ${QPID_HOME}/sbin
+ $ ./qpidd --data-dir ./
+
+ Start the axis2_amqp_server as follows.
+
+ $ cd ${AXIS2C_HOME}/bin
+ $ ./axis2_amqp_server
+
+ You should see the message
+ Started Simple Axis2 AMQP Server...
+
+ This will connect to the Qpid broker listening on 127.0.0.1:5672.
+ To see the possible command line options run
+
+ $ ./axis2_amqp_server -h
+
+ NOTE 1 : You have the flexibility of starting the Qpid broker first and
+ then axis2_amqp_server or vise versa.
+ NOTE 2 : You may need to login as superuser to run the axis2_amqp_server.
+ NOTE 3 : If you run into shared lib problems, set the LD_LIBRARY_PATH as
+ follows.
+
+ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
+
+ (b) Clients
+ -----------
+
+ When the axis2_amqp_server is up and running, you can run the sample
+ clients in a new shell as follows.
+
+ $ cd ${AXIS2C_HOME}/bin/samples/amqp
+ $ ./echo_blocking
+ This will invoke the echo service.
+
+ To see the possible command line options for sample clients run them
+ with '-h' option
+
+ NOTE : If you run into shared lib problems, set the LD_LIBRARY_PATH as
+ follows.
+
+ $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${AXIS2C_HOME}/lib
+
+
+2. Getting Axis2/C Working on Windows (Win32)
+=============================================
+
+ 2.1 Setting up Prerequisites
+ ----------------------------
+
+ 2.1.1 Mandatory
+ ---------------
+ (a) The binaries shipped with this version are compiled with
+ Microsoft Visual Studio compiler (cl). And also the makefile that is
+ shipped with this version needs Microsoft Visual Studio compiler (cl)
+ and nmake build tool.
+
+ NOTE : You can download Microsoft VS Express2005 Edition and
+ Platform SDK from Microsoft website. You need to add the path to
+ Platform SDK Include and Lib folders to the makefile in order
+ for you to compile the source.
+
+ (b) zlib [http://www.zlatkovic.com/pub/libxml
+ version >= zlib-1.2.3.win32]
+
+ 2.1.2 Optional
+ --------------
+ (a) libxml2 [http://www.zlatkovic.com/pub/libxml
+ version >= libxml2-2.6.20.win32]
+ (b) iconv [http://www.zlatkovic.com/pub/libxml
+ version >= iconv-1.9.1.win32]
+
+ 2.2 Using Binary Release
+ ------------------------
+
+ Extract the binary distribution to a folder of your choice.
+ (example: C:\axis2c)
+
+ The c:\axis2c folder structure is as follows.
+
+ axis2c
+ |
+ +- bin - server and other executables
+ | |
+ | +- samples - samples go here
+ | |
+ | +...
+ |
+ |
+ +- docs - documentation
+ |
+ +- include - all include files of axis2
+ |
+ +- lib - library modules
+ |
+ +- logs - system and client logs are written to this folder
+ |
+ +- modules - deployed modules
+ |
+ +- samples - source files of the samples in bin
+ |
+ +- services - deployed services
+
+ Copy the downloaded zlib1.dll to C:\axis2c\lib.
+ You might optionally require to copy the iconv.dll and libxml2.dll as well
+ (Or you can have these dll's in some other place and add that
+ location to PATH environment variable)
+
+ 2.3 Using Source Release
+ ------------------------
+
+ 2.3.1 Setting Build Options
+ ---------------------------
+ Please edit the <source_distribution>\build\win32\configure.in file
+ to set the following build options.
+
+ (a) Setting zlib Location
+ -------------------------
+
+ Set the ZLIB_BIN_DIR to the location where zlib is installed to
+
+ Default location for zlib is E:\zlib-1.2.3.win32 and the folder
+ structure should look like the following
+
+ E:\zlib-1.2.3.win32
+ |
+ +- include
+ |
+ +- bin
+ |
+ +- lib
+
+ You can either extract zlib to this folder or extract it to a location
+ of your choice and edit the configure.in file accordingly.
+
+ NOTE : You need to have zlib1.dll in the library path.
+
+ (b) Enable Guththila
+ --------------------
+
+ - Set the ENABLE_GUTHTHILA option to 1
+
+ (c) Enable libxml2
+ ------------------
+
+ - Set the ENABLE_LIBXML2 option to 1
+ - Set the LIBXML2_BIN_DIR to the location where libxml2 is installed to
+ - Set the ICONV_BIN_DIR to the location where iconv is installed to
+
+ (d) Enable SSL Support
+ ----------------------
+
+ - Set ENABLE_SSL option to 1
+ - Set OPENSSL_BIN_DIR to the location where OpenSSL is installed to
+
+ (e) Enable libcurl
+ ------------------
+
+ - Set ENABLE_LIBCURL to 1
+ - Set LIBCURL_BIN_DIR to the location where libcurl is installed to
+
+ 2.3.2 Compiling the Source
+ --------------------------
+
+ Extract the source distribution to a folder of your choice.
+ Example:
+ C:\axis2c
+
+ Open a DOS shell and type:
+
+ > cd %AXIS2C_HOME%\build\win32
+ > vcvars32.bat
+ > nmake install
+
+ NOTE : You may need to set the PATH environment variable to vcvars32.bat
+ if Windows complains that it cannot find this batch file. This file
+ is located in <Your MS Visual Studio Install Directory>\VC\bin
+ directory.
+
+ That's it! This will build the system and create a directory named 'deploy'
+ under the build directory.
+
+ The deploy folder structure is as follows.
+
+ deploy
+ |
+ +- bin - server and other executables
+ | |
+ | +- samples - samples go here
+ | |
+ | +...
+ |
+ +- lib - library modules
+ |
+ +- services - deployed services
+ |
+ +- modules - deployed modules
+ |
+ +- include - all include files of axis2
+ |
+ +- logs - system and client logs are written to this folder
+
+ 2.4 Running Samples
+ -------------------
+
+ You need to set a couple of environment variables before you can run the
+ server and samples.
+
+ Set the variable AXIS2C_HOME to the deploy folder (C:\axis2c)
+ Add the path to lib directory to the PATH variable (%AXIS2C_HOME%\lib)
+
+ Copy iconv.dll and zlib1.dll to the %AXIS2C_HOME%\lib folder.
+
+ You might optionally require to copy the libxml2.dll to
+ the %AXIS2C_HOME%\lib folder.
+
+ 2.4.1 HTTP transport
+ --------------------
+
+ (a) Server
+ ----------
+
+ > cd %AXIS2C_HOME%\bin
+ > axis2_http_server.exe
+
+ You should see the message
+ Started Simple Axis2 HTTP Server...
+
+ By default the log is created under %AXIS2C_HOME%\logs folder with the
+ name axis2.log.
+
+ NOTE : You may provide command line options to change the default behaviour.
+ Type 'axis2_http_server.exe -h' to learn about the usage
+
+ (b) Clients
+ -----------
+
+ Now you can run any sample client deployed under %AXIS2C_HOME%\bin\samples\
+
+ Example:
+ > cd %AXIS2C_HOME%\bin\samples
+ > echo.exe
+
+
+3. Installing Apache2 Web Server Integration Module (mod_axis2)
+===============================================================
+
+ 3.1 Building mod_axis2 from Source
+ ----------------------------------
+
+ 3.1.1 On Linux
+ --------------
+
+ Provide the Apache2 include file location as a configure option
+
+ $ ./configure --with-apache2="<apache2 httpd include files location>"
+ [other configure options]
+
+ NOTE : Some apache2 distributions install APR (Apache Portable Runtime)
+ include files in a separate location which is required to build
+ mod_axis2.
+
+ In that case use:
+ $ ./configure --with-apache2="<apache2 include files location>"
+ --with-apr="<apr include files location>"
+ [other configure options]
+
+ Then build the source tree
+
+ $ make
+ $ make install
+
+ This will install mod_axis2.so into your "<your_path_to_axis2c>/lib"
+
+ 3.1.2 On Windows (Win32)
+ ------------------------
+
+ Provide the apache2 location in configure.in file in APACHE_BIN_DIR
+
+ Example:
+ APACHE_BIN_DIR = E:\Apache22
+
+ After compiling the sources (as described in section 2.3) build the
+ mod_axis2.dll by issuing the command 'nmake axis2_apache_module'.
+ This will build mod_axis2.dll and copy it to %AXIS2C_HOME%\lib directory.
+
+ Example:
+ C:\axis2c\build\deploy\lib
+
+ 3.2 Deploying in Apache2 Web Server
+ -----------------------------------
+
+ NOTE : To do the following tasks, you might need super user privileges
+ on your machine.
+
+ Copy the mod_axis2 (libmod_axis2.so.0.3.1 on Linux and mod_axis2.dll
+ on Windows) to "<apache2 modules directory>" as mod_axis2.so
+
+ Example:
+ cp $AXIS2C_HOME/lib/libmod_axis2.so.0.3.1
+ /usr/lib/apache2/modules/mod_axis2.so (on Linux)
+
+ copy C:\axis2c\build\deploy\lib\mod_axis2.dll
+ C:\Apache2\modules\mod_axis2.so (on Windows)
+
+ Edit the Apache2's configuration file (generally httpd.conf) and add the
+ following directives
+
+ LoadModule axis2_module <apache2 modules directory>/mod_axis2.so
+ Axis2RepoPath <axis2 repository path>
+ Axis2LogFile <axis2 log file path>
+ Axis2MaxLogFileSize <maximum size of log file>
+ Axis2LogLevel LOG_LEVEL
+ <Location /axis2>
+ SetHandler axis2_module
+ </Location>
+
+ NOTE: Axis2 log file path should have write access to all users because by
+ default Apache Web Server runs as nobody.
+
+ If you want to use a Shared Global Pool with Apache you have to give
+ another entry called Axis2GlobalPoolSize. You have to give the size of
+ the shared global pool in MB. If you don't set the value or if you
+ set a negative value Apache module doesn't create shared global pool.
+
+ Axis2GlobalPoolSize <global pool size in MB>
+
+ LOG_LEVEL can be one of the followings
+ crit - Log critical errors only
+ error - Log errors critical errors
+ warn - Log warnings and above
+ info - Log info and above
+ debug - Log debug and above (default)
+ trace - Log trace messages
+
+ NOTE: Use forward slashes "/" for path separators in
+ <apache2 modules directory>, <axis2 repository path> and
+ <axis2 log file path>
+
+ Make sure that the apache2 user has the correct permissions to above paths
+ - Read permission to the repository
+ - Write permission to the log file
+
+ Restart apache2 and test whether mod_axis2 module is loaded by typing the
+ URL http://localhost/axis2/services in your Web browser
+
+4. Installing IIS (Interner Information Server) Integration Module
+ (mod_axis2_IIS)
+==================================================================
+
+ 4.1 Building mod_axis2_IIS from Source
+ --------------------------------------
+
+ After compiling the source (as described in section 2.3) build the
+ mod_axis2.dll by issuing the command 'nmake axis2_IIS_module'.
+ This will build the mod_axis2_IIS.dll and copy it to %AXIS2C_HOME%\lib
+ directory.
+
+ Example:
+ C:\axis2c\build\deploy\lib
+
+ 4.2 Deploying in the IIS
+ ------------------------
+
+ Add the following key to the registery.
+
+ HKEY_LOCAL_MACHINE\SOFTWARE\Apache Axis2c\IIS ISAPI Redirector
+
+ Under this registry key add the following entries.
+
+ A String value with the name "axis2c_home". The value is the AXIS2C_HOME.
+ Example : c:\axis2c
+
+ A String value with the name "log_file". The value is the absolute path of
+ the log file.
+ Example: c:\axis2c\logs\axis2.log
+
+ A String value with the name "log_level". The value can be one of the
+ followings.
+ trace - Log trace messages
+ error - Log errors critical errors
+ info - Log info and above
+ critical - Log critical errors only
+ debug - Log debug and above (default)
+ warning - Log warnings
+
+ Using the IIS management console, add a new virtual directory to the
+ IIS/PWS web site called "axis2". The physical path of this virtual
+ directory should be the axis2\lib directory (Where the mod_axis2_IIS.dll
+ is in)
+ Assign excecute permissions to this virtual directory.
+
+ Using the IIS management console, add mod_axis2_IIS.dll as a filter to the
+ IIS/PWS web site. The name of the filter can be any meaningful name.
+
+ Restart IIS and test whether mod_axis2_IIS module is loaded by typing the
+ URL http://localhost/axis2 in your Web browser.
+
+
+5. FAQ
+======
+
+1. Although I was able to get simple axis server up, unable to run samples.
+
+ This could happen because the AXIS2C_HOME environment variable is not
+ set to the correct axis2 installation path.
+
+2. What are the other dependencies Axis2/C has?
+
+ Basically if you are willing to use libxml2 as your parser, you need to
+ have it installed in your system.
+
+ You can get libxml2 from http://xmlsoft.org/downloads.html.
+
+3. I have libxml2 installed in my system, but ./configure fails saying
+ "libxml2 not found"
+
+ Yes, you need to install libxml2-dev packages.
+
+ 1. If you are using a Debian based system run
+ $ apt-get install libxml2-dev
+
+ 2. If you are using a RedHat/Fedora based system run
+ $ yum install libxml2-dev
+
+ 3. If you install libxml2 from source you will not get this error
+
+4. Is there any recommended packages, that I need to install in my system?
+
+ 1. automake, autoconf, libtool, aclocal
+ 2. libxml2 and libxml2-dev
+ 3. pkg-config
+
+5. I tried several methods, browse through axis-c-dev and axis-c-user mail
+ archives but I was not able to solve my problem.
+
+ Then you can ask from Axis2/C users or Axis2/C developers about it by
+ sending your question to
+
+ user = axis-c-user@ws.apache.org
+ developer = axis-c-dev@ws.apache.org
+
+ You can subscribe to
+
+ axis-c-user list by sending a request to
+ <ax...@ws.apache.org> with the subject "subscribe"
+
+ axis-c-dev list by sending request to
+ <ax...@ws.apache.org> with the subject "subscribe"
+
+6. This FAQ is not enough...
+
+ You can help us by reporting your suggestions, complaints, problems and bugs
+
+
+Thank you for using Axis2/C ...
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/NEWS
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/NEWS?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/NEWS (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/NEWS Wed Jun 18 05:17:36 2008
@@ -1,13 +1,18 @@
-Apache Axis2/C Team is pleased to announce the release of Apache Axis2/C version 1.4.0
-You can download this release from
+Apache Axis2/C Team is pleased to announce the release of Apache Axis2/C
+version 1.4.0.
-http://ws.apache.org/axis2/c/download.cgi
+You can download this release from http://ws.apache.org/axis2/c/download.cgi
Key Features
+============
- 1. Support for one-way messaging (In-Only) and request response messaging (In-Out)
- 2. Client APIs: Easy to use service client API and more advanced operation client API
- 3. Transports supported: HTTP
+ 1. Support for one-way messaging (In-Only) and
+ request response messaging (In-Out)
+
+ 2. Client APIs : Easy to use service client API and
+ more advanced operation client API
+
+ 3. Transports supported : HTTP
* Inbuilt HTTP server called simple axis server
* Apache2 httpd module called mod_axis2 for server side
* IIS module for server side
@@ -16,57 +21,60 @@
* Digest HTTP Authentication
* libcurl based client transport
- 4. Transports supported: HTTPS
+ 4. Transports supported : HTTPS
* HTTPS Transport implementation using OpenSSL
- 5. Transports supported: TCP
+ 5. Transports supported : TCP
* for both client and server side
- 6. Transport proxy support (HTTP)
+ 6. Transports supported : AMQP
+ * AMQP Transport implementation using Apache Qpid
+
+ 7. Transport proxy support (HTTP)
* Proxy Authentication (Basic/Digest)
- 7. Module architecture, mechanism to extend the SOAP processing model.
+ 8. Module architecture, mechanism to extend the SOAP processing model.
- 8. WS-Addressing support, both the submission (2004/08) and final (2005/08) versions,
- implemented as a module.
+ 9. WS-Addressing support, both the submission (2004/08) and
+ final (2005/08) versions, implemented as a module.
- 9. MTOM/XOP support.
+ 10. MTOM/XOP support.
- 10. AXIOM, an XML object model optimized for SOAP 1.1/1.2 messages;
+ 11. AXIOM, an XML object model optimized for SOAP 1.1/1.2 messages;
This has complete XML infoset support.
- 11. XML parser abstraction
+ 12. XML parser abstraction
* Libxml2 wrapper
* Guththila pull parser support
- 12. Both directory based and archive based deployment models for deploying
+ 13. Both directory based and archive based deployment models for deploying
services and modules
- 13. Description hierarchy providing access to static data of
- Axis2/C runtime (configuration, service groups, services, operations and messages)
+ 14. Description hierarchy providing access to static data of Axis2/C runtime
+ (configuration, service groups, services, operations and messages)
- 14. Context hierarchy providing access to dynamic
- Axis2/C runtime information (corresponding contexts to map to each level of
- description hierarchy)
+ 15. Context hierarchy providing access to dynamic
+ Axis2/C runtime information (corresponding contexts to map to
+ each level of description hierarchy)
- 15. Message receiver abstraction
+ 16. Message receiver abstraction
* Inbuilt raw XML message receiver
- 16. Code generation tool for stub and skeleton generation for a given
+ 17. Code generation tool for stub and skeleton generation for a given
WSDL (based on Java tool)
* Axis Data Binding (ADB) support
- 17. REST support (more POX like) using HTTP POST, GET, HEAD, PUT and DELETE
+ 18. REST support (more POX like) using HTTP POST, GET, HEAD, PUT and DELETE
* Support for RESTful Services
- 18. Comprehensive documentation
+ 19. Comprehensive documentation
* Axis2/C Manual
- 19. WS-Policy implementation called Neethi/C, with WS-SecurityPolicy extension
+ 20. WS-Policy implementation called Neethi/C, with WS-SecurityPolicy extension
-Major Changes Since Last Release.
---------------------------------
+Major Changes Since Last Release
+================================
1. Fixed library version numbering
2. Made Guththila as default XML parser
@@ -74,7 +82,9 @@
4. Memory leak fixes
We welcome your early feedback on this implementation.
-Thanks for your interest in Axis2/C
+
+Thanks for your interest in Axis2/C !!!
-- Apache Axis2/C Team --
+
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c Wed Jun 18 05:17:36 2008
@@ -24,7 +24,6 @@
#include <string.h>
#include <axutil_string.h>
-#define AXIS2_ATTR_NS_MAX 20
int AXIS2_CALL axis2_libxml2_reader_wrapper_next(
axiom_xml_reader_t * parser,
@@ -151,10 +150,10 @@
int event_map[18];
void *ctx;
- /* assuming that max ns and attri will be 20 */
+ /* assuming that max ns and attribute will be 20 */
- int namespace_map[AXIS2_ATTR_NS_MAX];
- int attribute_map[AXIS2_ATTR_NS_MAX];
+ int *namespace_map;
+ int *attribute_map;
AXIS2_READ_INPUT_CALLBACK read_input_callback;
@@ -242,21 +241,45 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_xml_reader_init(
- )
+axiom_xml_reader_init()
{
xmlInitParser();
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axiom_xml_reader_cleanup(
- )
+axiom_xml_reader_cleanup()
{
xmlCleanupParser();
return AXIS2_SUCCESS;
}
+static axis2_libxml2_reader_wrapper_impl_t*
+libxml2_reader_wrapper_create(const axutil_env_t *env)
+{
+ axis2_libxml2_reader_wrapper_impl_t *wrapper_impl = NULL;
+ wrapper_impl = (axis2_libxml2_reader_wrapper_impl_t *)AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_libxml2_reader_wrapper_impl_t));
+
+ if (!wrapper_impl)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create libxml2 reader wrapper");
+ return NULL;
+ }
+ memset(wrapper_impl, 0, sizeof(axis2_libxml2_reader_wrapper_impl_t));
+ wrapper_impl->attribute_map = NULL;
+ wrapper_impl->namespace_map = NULL;
+ wrapper_impl->close_input_callback = NULL;
+ wrapper_impl->read_input_callback = NULL;
+ wrapper_impl->ctx = NULL;
+ wrapper_impl->current_namespace_count = 0;
+ wrapper_impl->current_attribute_count = 0;
+ wrapper_impl->current_event = -1;
+ return wrapper_impl;
+}
+
+
AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
axiom_xml_reader_create_for_file(
const axutil_env_t * env,
@@ -268,20 +291,13 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, filename, NULL);
- wrapper_impl =
- (axis2_libxml2_reader_wrapper_impl_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axis2_libxml2_reader_wrapper_impl_t));
+ wrapper_impl = libxml2_reader_wrapper_create(env);
if (!wrapper_impl)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "No memory. Cannot create libxml2 reader wrapper");
return NULL;
}
- wrapper_impl->reader =
- xmlReaderForFile(filename, encoding, XML_PARSE_RECOVER);
+ wrapper_impl->reader = xmlReaderForFile(filename, encoding, XML_PARSE_RECOVER);
if (!(wrapper_impl->reader))
{
AXIS2_FREE(env->allocator, wrapper_impl);
@@ -296,7 +312,6 @@
(void *) env);
wrapper_impl->current_event = -1;
wrapper_impl->ctx = NULL;
-
axis2_libxml2_reader_wrapper_init_map(wrapper_impl);
wrapper_impl->parser.ops = &axiom_xml_reader_ops_var;
@@ -320,15 +335,9 @@
return NULL;
}
- wrapper_impl =
- (axis2_libxml2_reader_wrapper_impl_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axis2_libxml2_reader_wrapper_impl_t));
+ wrapper_impl = libxml2_reader_wrapper_create(env);
if (!wrapper_impl)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "No memory. Cannot create libxml2 reader wrapper");
return NULL;
}
wrapper_impl->close_input_callback = NULL;
@@ -381,18 +390,11 @@
{
axis2_libxml2_reader_wrapper_impl_t *wrapper_impl = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, container, NULL);
- wrapper_impl =
- (axis2_libxml2_reader_wrapper_impl_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axis2_libxml2_reader_wrapper_impl_t));
+ wrapper_impl = libxml2_reader_wrapper_create(env);
if (!wrapper_impl)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "No memory. Cannot create libxml2 reader wrapper");
return NULL;
}
wrapper_impl->close_input_callback = NULL;
@@ -503,18 +505,28 @@
axiom_xml_reader_t * parser,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (AXIS2_INTF_TO_IMPL(parser)->ctx)
- {
- AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(parser)->ctx);
- }
-
- if (AXIS2_INTF_TO_IMPL(parser)->reader)
- {
- xmlTextReaderClose(AXIS2_INTF_TO_IMPL(parser)->reader);
- xmlFreeTextReader(AXIS2_INTF_TO_IMPL(parser)->reader);
- }
-
+ axis2_libxml2_reader_wrapper_impl_t *parser_impl = NULL;
+ parser_impl = AXIS2_INTF_TO_IMPL(parser);
+ if (parser_impl->ctx)
+ {
+ AXIS2_FREE(env->allocator, parser_impl->ctx);
+ }
+
+ if (parser_impl->reader)
+ {
+ xmlTextReaderClose(parser_impl->reader);
+ xmlFreeTextReader(parser_impl->reader);
+ }
+ if(parser_impl->namespace_map)
+ {
+ AXIS2_FREE(env->allocator,parser_impl->namespace_map);
+ parser_impl->namespace_map = NULL;
+ }
+ if(parser_impl->attribute_map)
+ {
+ AXIS2_FREE(env->allocator, parser_impl->attribute_map);
+ parser_impl->attribute_map = NULL;
+ }
AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(parser));
return;
}
@@ -868,17 +880,35 @@
int i = 0;
char *q_name = NULL;
axis2_libxml2_reader_wrapper_impl_t *parser_impl = NULL;
-
+ int map_size = 0;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
parser_impl = AXIS2_INTF_TO_IMPL(parser);
libxml2_attribute_count = xmlTextReaderAttributeCount(parser_impl->reader);
if (libxml2_attribute_count == 0)
{
+ parser_impl->current_attribute_count = 0;
+ parser_impl->current_namespace_count = 0;
return AXIS2_SUCCESS;
}
-
- for (i = 0; i < AXIS2_ATTR_NS_MAX; i++)
+ map_size = libxml2_attribute_count +1;
+ if(parser_impl->namespace_map)
+ {
+ AXIS2_FREE(env->allocator, parser_impl->namespace_map);
+ parser_impl->namespace_map = NULL;
+ }
+ if(parser_impl->attribute_map)
+ {
+ AXIS2_FREE(env->allocator, parser_impl->attribute_map);
+ parser_impl->attribute_map = NULL;
+ }
+ parser_impl->attribute_map = AXIS2_MALLOC(env->allocator, sizeof(int)* map_size);
+ memset(parser_impl->attribute_map, 0, map_size*sizeof(int));
+
+ parser_impl->namespace_map = AXIS2_MALLOC(env->allocator, sizeof(int)*map_size);
+ memset(parser_impl->namespace_map,0, map_size*sizeof(int));
+
+ for (i = 0; i < map_size ; i++)
{
parser_impl->namespace_map[i] = -1;
parser_impl->attribute_map[i] = -1;
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/configure.ac?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/configure.ac (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/configure.ac Wed Jun 18 05:17:36 2008
@@ -62,7 +62,7 @@
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
- CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -g"
+ CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE"
# CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration"
fi
LDFLAGS="$LDFLAGS -lpthread"
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/include/axis2_http_transport_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/include/axis2_http_transport_utils.h?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/include/axis2_http_transport_utils.h (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/include/axis2_http_transport_utils.h Wed Jun 18 05:17:36 2008
@@ -26,7 +26,9 @@
/**
* @file axis2_http_transport_utils.h
- * @brief axis2 HTTP Transport Utility class
+ * @brief axis2 HTTP Transport Utility functions
+ * This file includes functions that handles soap and rest request
+ * that comes to the engine via HTTP protocol.
*/
#include <axis2_const.h>
@@ -40,29 +42,127 @@
#include <axutil_stream.h>
#include <axiom_soap_envelope.h>
#include <axutil_http_chunked_stream.h>
+#include <axis2_http_out_transport_info.h>
#include <axutil_url.h>
#ifdef __cplusplus
extern "C"
{
#endif
-
- /*
- * struct to hold the callback information
- */
- /*struct axis2_callback_info
- {
- const axutil_env_t *env;
- void *in_stream;
- int content_length;
- int unread_len;
- axutil_http_chunked_stream_t *chunked_stream;
- };
- typedef struct axis2_callback_info axis2_callback_info_t;
+
+ typedef enum axis2_http_method_types
+ {
+ AXIS2_HTTP_METHOD_GET = 0,
+ AXIS2_HTTP_METHOD_POST,
+ AXIS2_HTTP_METHOD_HEAD,
+ AXIS2_HTTP_METHOD_PUT,
+ AXIS2_HTTP_METHOD_DELETE
+ }axis2_http_method_types_t;
+
+
+ typedef struct axis2_http_transport_in
+ {
+ /** HTTP Content type */
+ axis2_char_t *content_type;
+ /** HTTP Content length */
+ int content_length;
+ /** Input message context */
+ axis2_msg_ctx_t *msg_ctx;
+
+ /** soap action */
+ axis2_char_t *soap_action;
+
+ /** complete request uri */
+ axis2_char_t *request_uri;
+
+ /** Input stream */
+ axutil_stream_t *in_stream;
+
+ /** remote request ip corresponds to CGI header REMOTE_ADDR */
+ axis2_char_t *remote_ip;
+
+ /** server port */
+ axis2_char_t *svr_port;
+
+ /** HTTP transfer encoding header value */
+ axis2_char_t *transfer_encoding;
+
+ /** HTTP Accept header */
+ axis2_char_t *accept_header;
+
+ /** HTTP Accept language header */
+ axis2_char_t *accept_language_header;
+
+ /** HTTP accept charset header */
+ axis2_char_t *accept_charset_header;
+ /** HTTP METHOD Should be one of AXIS2_HTTP_METHOD_GET | AXIS2_HTTP_METHOD_POST |"
+ AXIS2_HTTP_METHOD_HEAD | AXIS2_HTTP_METHOD_PUT | AXIS2_HTTP_METHOD_DELETE" */
+ int request_method;
+ /** out transport */
+ axis2_http_out_transport_info_t *out_transport_info;
+ /** this is for serving services html */
+ axis2_char_t *request_url_prefix;
+
+ }axis2_http_transport_in_t;
+
+ typedef struct axis2_http_transport_out
+ {
+ /** HTTP Status code string */
+ axis2_char_t *http_status_code_name;
+ /** HTTP Status code value */
+ int http_status_code;
+ /** Out message context */
+ axis2_msg_ctx_t *msg_ctx;
+ /** Response data */
+ void *response_data;
+ /** HTTP content type */
+ axis2_char_t *content_type;
+ /** Response data length */
+ int response_data_length;
+ /** content language */
+ axis2_char_t *content_language;
+ /** output headers list */
+ axutil_array_list_t *output_headers;
+
+ }axis2_http_transport_out_t;
+
+
+ /**
+ * This methods provides the HTTP request handling functionality using axis2 for server side
+ * HTTP modules.
+ * @param env, environments
+ * @param conf_ctx, Instance of axis2_conf_ctx_t
+ * @param request, populated instance of axis2_http_transport_in_t struct
+ * @param response, an instance of axis2_http_transport_out_t struct
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_http_transport_utils_process_request(
+ const axutil_env_t *env,
+ axis2_conf_ctx_t *conf_ctx,
+ axis2_http_transport_in_t *request,
+ axis2_http_transport_out_t *response);
+
+
+
+ /**
+ * This function handles the HTTP POST request that comes to the axis2 engine.
+ * The request can be either a SOAP request OR a REST request.
+ * @param env, axutil_env_t instance
+ * @param msg_ctx, Input message context. (an instance of axis2_msg_ctx_t struct.)
+ * @param in_stream, This is the input message content represented as an axutil_stream instance.
+ * A callback function will be used to read as required from the stream with in the engine.
+ * @param out_stream, This is the output stream. The outgoing message contents is represented as
+ * an instance of axutil_stream
+ * @param content_type, HTTP content type. This value should not be null.
+ * @param content_length, HTTP Content length value.
+ * @param soap_action_header, SOAPAction header value. This is only required in case of SOAP 1.1.
+ * For SOAP 1.2 , the action header will be within the ContentType header and
+ * this method is able to obtain the extract the action header value from content type.
+ * @param request_uri, This is the HTTP request uri. Should not be null.
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
*/
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
axis2_http_transport_utils_process_http_post_request(
const axutil_env_t * env,
axis2_msg_ctx_t * msg_ctx,
@@ -73,8 +173,21 @@
axutil_string_t * soap_action_header,
const axis2_char_t * request_uri);
- AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ /**
+ * This method handles the HTTP put request. Parameters are similar to that of post_request
+ * method.
+ * @param env, environment
+ * @param msg_ctx, in message context.
+ * @param in_stream, input stream
+ * @param out_stream, output stream.
+ * @param content_type, HTTP ContentType header value
+ * @param content_length, HTTP Content length value
+ * @param soap_action_header, SOAP Action header value
+ * @param request_uri, request uri
+ * @returns AXIS2_SUCCESS on success, AXIS2_FAILURE Otherwise
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_http_transport_utils_process_http_put_request(
const axutil_env_t * env,
axis2_msg_ctx_t * msg_ctx,
@@ -86,7 +199,6 @@
const axis2_char_t * request_uri);
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-
axis2_http_transport_utils_process_http_get_request(
const axutil_env_t * env,
axis2_msg_ctx_t * msg_ctx,
@@ -231,9 +343,14 @@
axis2_msg_ctx_t * msg_ctx,
const axis2_char_t * soap_ns_uri);
+ AXIS2_EXTERN axutil_array_list_t* AXIS2_CALL
+ axis2_http_transport_utils_process_accept_headers(
+ const axutil_env_t *env,
+ axis2_char_t *accept_value);
+
/** @} */
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_HTTP_TRANSPORT_UTILS_H */
+#endif /* AXIS2_HTTP_TRANSPORT_UTILS_H */
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/clientapi/op_client.c?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/clientapi/op_client.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/clientapi/op_client.c Wed Jun 18 05:17:36 2008
@@ -219,7 +219,7 @@
if (op_client->reuse)
{
- /* This is the second invocation using the same service clinet,
+ /* This is the second invocation using the same service client,
so reset */
if (out_msg_ctx)
{
@@ -690,7 +690,7 @@
/* send the request and wait for response */
response = axis2_op_client_two_way_send(th_env, args_list->msg_ctx);
- /* We do not need to handle the NULL reponse here because this thread function is called only
+ /* We do not need to handle the NULL response here because this thread function is called only
* in the single channel non blocking case which, imply this is two way message by design.
*/
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_worker.c?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/common/http_worker.c Wed Jun 18 05:17:36 2008
@@ -98,7 +98,11 @@
return;
}
-
+/* Each in-coming request is passed into this function for process. Basically http method to deliver
+ * is deduced here and call appropriate http processing function.
+ * eg. transport_utils_process_http_post_request() function. Once this fuction call done it will go
+ * through engine inflow phases and finally hit the message receiver for the operation.
+ */
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axis2_http_worker_process_request(
axis2_http_worker_t * http_worker,
@@ -460,6 +464,10 @@
}
}
+ /* Here out_stream is set into the in message context. out_stream is copied from in message context
+ * into the out message context later in core_utils_create_out_msg_ctx() function. The buffer in
+ * out_stream is finally filled with the soap envelope in http_transport_sender_invoke() function.
+ */
axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
headers = axis2_http_worker_get_headers(http_worker, env, simple_request);
@@ -1576,6 +1584,10 @@
if (!response_written)
{
+ /* If in there is a soap message is to to be sent in the back channel then we go inside this
+ * block. Somewhere in the receiveing end axis2_op_ctx_set_response_written() function has
+ * been called by this time to indicate to append the message into the http back channel.
+ */
if (op_ctx && axis2_op_ctx_get_response_written(op_ctx, env))
{
if (do_rest)
@@ -1704,6 +1716,7 @@
if (!is_head)
{
+ /* This is where we append the message into the http back channel.*/
axis2_http_simple_response_set_body_stream(response, env, out_stream);
}
}
@@ -1889,7 +1902,9 @@
axis2_http_worker_set_response_headers(http_worker, env, svr_conn,
simple_request, response,
stream_len);
-
+
+ /* This is where it actually write to the wire in the http back channel
+ * append case. */
status = axis2_simple_http_svr_conn_write_response(svr_conn,
env,
response);
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/sender/http_transport_sender.c?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/sender/http_transport_sender.c Wed Jun 18 05:17:36 2008
@@ -244,15 +244,12 @@
axis2_endpoint_ref_t *ctx_epr = axis2_msg_ctx_get_to(msg_ctx, env);
if(ctx_epr)
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "ctx_epr:%s",
- axis2_endpoint_ref_get_address(ctx_epr, env));
- if (ctx_epr && 0 != axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL_SUBMISSION,
- axis2_endpoint_ref_get_address
- (ctx_epr, env)) &&
- 0 != axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL,
- axis2_endpoint_ref_get_address(ctx_epr, env)) &&
- !(axutil_strstr
- (axis2_endpoint_ref_get_address(ctx_epr, env),
- AXIS2_WS_RM_ANONYMOUS_URL)))
+ axis2_endpoint_ref_get_address(ctx_epr, env));
+
+ if (ctx_epr && axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL_SUBMISSION, axis2_endpoint_ref_get_address(
+ ctx_epr, env)) && axutil_strcmp(AXIS2_WSA_ANONYMOUS_URL, axis2_endpoint_ref_get_address(
+ ctx_epr, env)) && !(axutil_strstr(axis2_endpoint_ref_get_address(ctx_epr, env),
+ AXIS2_WS_RM_ANONYMOUS_URL)))
{
epr = ctx_epr;
}
@@ -312,6 +309,9 @@
}
}
+ /* If no endpoint reference could be derived from the the message context. It could well be the
+ * single channel two way scenario in the application server side send.
+ */
if (!epr)
{
axutil_stream_t *out_stream =
@@ -336,6 +336,7 @@
xml_writer = NULL;
return AXIS2_FAILURE;
}
+
is_soap11 = axis2_msg_ctx_get_is_soap_11(msg_ctx, env);
AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CHAR_ENCODING(out_info, env,
@@ -518,7 +519,6 @@
}
else
{
-
/* SOAP Processing */
axiom_output_set_do_optimize(om_output, env, do_mtom);
axiom_soap_envelope_serialize(soap_data_out, env, om_output,
@@ -540,11 +540,13 @@
}
else
{
- buffer =
- (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer,
- env);
- buffer_size =
- axiom_xml_writer_get_xml_size(xml_writer, env);
+ buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
+ buffer_size = axiom_xml_writer_get_xml_size(xml_writer, env);
+
+ /* This is where it actually fill the buffer in out_stream. In application server
+ * side this is the out_stream passed to the in message context from http_worker
+ * function and then copied to the out message context.
+ */
axutil_stream_write(out_stream, env, buffer, buffer_size);
}
}
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/IIS/axis2_iis_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/IIS/axis2_iis_worker.c?rev=669144&r1=669143&r2=669144&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/IIS/axis2_iis_worker.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/IIS/axis2_iis_worker.c Wed Jun 18 05:17:36 2008
@@ -64,6 +64,7 @@
const void *b,
unsigned int l);
+axutil_hash_t *axis2_iis_worker_read_http_headers(const axutil_env_t * env, LPEXTENSION_CONTROL_BLOCK lpECB);
static struct reasons
{
@@ -147,6 +148,9 @@
axis2_char_t port[MAX_TCP_PORT_LEN];
CHAR redirect_url[INTERNET_MAX_PATH_LENGTH];
axis2_op_ctx_t *op_ctx = NULL;
+ axutil_hash_t *headers = NULL;
+ CHAR peer_ip[50];
+ axutil_property_t *peer_property = NULL;
soap_action[0] = '\0';
@@ -218,6 +222,26 @@
return HSE_STATUS_ERROR;
}
+ cbSize = 50;
+ ret_val = lpECB->GetServerVariable(lpECB->ConnID, "REMOTE_ADDR", peer_ip, &cbSize);
+ if (strlen(peer_ip) > 0)
+ {
+ peer_property = axutil_property_create(env);
+ axutil_property_set_value(peer_property, env,
+ axutil_strdup(env, peer_ip));
+ axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR,
+ peer_property);
+ /*AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Peer ip=%s", peer_ip);*/
+ }
+
+ /* Set the http headers into the message context */
+ headers = axis2_iis_worker_read_http_headers(env, lpECB);
+ if (axis2_msg_ctx_set_transport_headers(msg_ctx, env, headers) == AXIS2_FAILURE)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "IIS: Error occured in"
+ " setting transport headers.");
+ }
+
if (AXIS2_STRICMP(lpECB->lpszMethod, "GET") == 0
|| AXIS2_STRICMP(lpECB->lpszMethod, "HEAD") == 0
|| AXIS2_STRICMP(lpECB->lpszMethod, "DELETE") == 0)
@@ -605,3 +629,63 @@
axutil_stream_free(tmp_stream, env);
return buffer;
}
+
+/** Read all HTTP headers.
+ */
+axutil_hash_t *axis2_iis_worker_read_http_headers(const axutil_env_t * env,
+ LPEXTENSION_CONTROL_BLOCK lpECB)
+{
+ const char szHTTP_[] = "HTTP_";
+ char szBuffer[4096];
+ DWORD dwBufferSize = sizeof szBuffer;
+ axutil_hash_t *headers = NULL;
+ axis2_http_header_t* http_header = NULL;
+
+ BOOL bGet = lpECB->GetServerVariable(lpECB->ConnID, "ALL_HTTP", szBuffer, &dwBufferSize);
+ if (bGet)
+ {
+ /* Find lines, split key/data pair and write them as output */
+ LPTSTR pOpts = NULL;
+ LPTSTR pEnd = NULL;
+ LPTSTR pChar = NULL;
+ char szTmpBuf[512];
+ char szTmpName[256];
+
+ headers = axutil_hash_make(env);
+ szTmpBuf[0] = 0;
+ for (pChar = szBuffer; '\0' != *pChar;)
+ {
+ if (*pChar == '\r' || *pChar == '\n')
+ {
+ pChar++;
+ continue;
+ }
+ pOpts = strchr(pChar, ':');/* findseparator */
+ if (pOpts && *pOpts)
+ {
+ pEnd = pOpts;
+ while (*pEnd && *pEnd != '\r' && *pEnd != '\n')
+ {
+ pEnd++;
+ }
+ *pOpts = '\0'; /* split the strings */
+ *pEnd = '\0';
+ if (0 == strncmp(pChar, szHTTP_, strlen(szHTTP_)))
+ {
+ pChar += strlen(szHTTP_);
+ }
+ strcpy(szTmpName, pChar);
+ axutil_string_replace(szTmpName, '_', '-');
+ http_header = axis2_http_header_create(env, szTmpName, pOpts + 1);
+ axutil_hash_set(headers, axutil_strdup(env, szTmpName), AXIS2_HASH_KEY_STRING, http_header);
+ pChar = pEnd + 1;
+ }
+ }
+ }
+ else
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "axis2_iis_worker_read_http_headers: no http headers");
+ }
+ return headers;
+}
+