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 di...@apache.org on 2007/07/19 05:38:39 UTC

svn commit: r557477 [3/11] - in /webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp: ./ common/ common/.deps/ receiver/ sender/ server/ server/simple_tcp_server/ server/simple_tcp_server/.deps/ util/ util/.deps/ util/.libs/

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/Makefile.in
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/Makefile.in?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/Makefile.in (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/Makefile.in Wed Jul 18 20:38:32 2007
@@ -0,0 +1,517 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src/core/transport/http/common
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libaxis2_http_common_la_DEPENDENCIES =  \
+	$(top_builddir)/util/src/libaxutil.la \
+	$(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la
+am_libaxis2_http_common_la_OBJECTS = http_header.lo \
+	http_out_transport_info.lo http_request_line.lo \
+	http_simple_request.lo http_simple_response.lo \
+	http_status_line.lo http_response_writer.lo \
+	simple_http_svr_conn.lo http_worker.lo
+libaxis2_http_common_la_OBJECTS =  \
+	$(am_libaxis2_http_common_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libaxis2_http_common_la_SOURCES)
+DIST_SOURCES = $(libaxis2_http_common_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+APACHE2BUILD = @APACHE2BUILD@
+APACHE2INC = @APACHE2INC@
+APRINC = @APRINC@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXIS2_LIBCURL_ENABLED_FALSE = @AXIS2_LIBCURL_ENABLED_FALSE@
+AXIS2_LIBCURL_ENABLED_TRUE = @AXIS2_LIBCURL_ENABLED_TRUE@
+AXIS2_SSL_ENABLED_FALSE = @AXIS2_SSL_ENABLED_FALSE@
+AXIS2_SSL_ENABLED_TRUE = @AXIS2_SSL_ENABLED_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DICLIENT_DIR = @DICLIENT_DIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GUTHTHILA_DIR = @GUTHTHILA_DIR@
+GUTHTHILA_LIBS = @GUTHTHILA_LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PARSER_CFLAGS = @PARSER_CFLAGS@
+PARSER_DIR = @PARSER_DIR@
+PARSER_LIBS = @PARSER_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SAMPLES = @SAMPLES@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TESTDIR = @TESTDIR@
+VERSION = @VERSION@
+VERSION_NO = @VERSION_NO@
+WRAPPER_DIR = @WRAPPER_DIR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+lib_LTLIBRARIES = libaxis2_http_common.la
+libaxis2_http_common_la_LIBADD = $(top_builddir)/util/src/libaxutil.la\
+                                 $(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la
+
+libaxis2_http_common_la_SOURCES = http_header.c\
+                                  http_out_transport_info.c\
+                                  http_request_line.c\
+                                  http_simple_request.c\
+                                  http_simple_response.c\
+                                  http_status_line.c\
+                                  http_response_writer.c\
+                                  simple_http_svr_conn.c\
+                                  http_worker.c
+
+libaxis2_http_common_la_LDFLAGS = -version-info $(VERSION_NO)
+INCLUDES = -I$(top_builddir)/include \
+	       -I$(top_builddir)/src/core/transport\
+	       -I$(top_builddir)/src/core/transport/http \
+           -I$(top_builddir)/src/core/description \
+           -I$(top_builddir)/src/core/context \
+           -I$(top_builddir)/src/core/phaseresolver \
+           -I$(top_builddir)/src/core/engine \
+           -I$(top_builddir)/src/core/deployment \
+           -I$(top_builddir)/util/include \
+           -I$(top_builddir)/axiom/include
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/core/transport/http/common/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/core/transport/http/common/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libaxis2_http_common.la: $(libaxis2_http_common_la_OBJECTS) $(libaxis2_http_common_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libaxis2_http_common_la_LDFLAGS) $(libaxis2_http_common_la_OBJECTS) $(libaxis2_http_common_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_header.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_out_transport_info.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_request_line.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_response_writer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_simple_request.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_simple_response.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_status_line.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_worker.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_http_svr_conn.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am \
+	install-libLTLIBRARIES install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-libLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_header.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_header.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_header.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_header.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_header.h>
+#include <axutil_string.h>
+#include <axis2_tcp_transport.h>
+#include <stdio.h>
+#include <string.h>
+
+struct axis2_tcp_header
+{
+    axis2_char_t *name;
+    axis2_char_t *value;
+};
+
+AXIS2_EXTERN axis2_tcp_header_t *AXIS2_CALL
+axis2_tcp_header_create(
+    const axutil_env_t *env,
+    const axis2_char_t *name,
+    const axis2_char_t *value)
+{
+    axis2_tcp_header_t *tcp_header = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
+
+    tcp_header = (axis2_tcp_header_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_header_t));
+
+    if (! tcp_header)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    tcp_header->name = (axis2_char_t *)axutil_strdup(env, name);
+    tcp_header->value = (axis2_char_t *)axutil_strdup(env, value);
+
+    return tcp_header;
+}
+
+AXIS2_EXTERN axis2_tcp_header_t *AXIS2_CALL
+axis2_tcp_header_create_by_str(
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axis2_char_t *tmp_str = NULL;
+    axis2_char_t *ch = NULL;
+    axis2_char_t *ch2 = NULL;
+    axis2_tcp_header_t *ret = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
+
+    tmp_str = axutil_strdup(env, str);
+    if (! tmp_str)
+    {
+        return NULL;
+    }
+    /* remove trailing \r\n */
+    if ('\r' == tmp_str[axutil_strlen(tmp_str)-2])
+    {
+        tmp_str[axutil_strlen(tmp_str)-2] = '\0';
+    }
+
+    ch = strchr((const char *)tmp_str, ':');
+    if (! ch)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_HEADER,
+                AXIS2_FAILURE);
+        AXIS2_FREE(env->allocator, tmp_str);
+        return NULL;
+    }
+    ch2 = ch + sizeof(axis2_char_t);
+    /* skip spaces */
+    while (' ' == *ch2)
+    {
+        ch2 += sizeof(axis2_char_t);
+    }
+    *ch = '\0';
+    ret = axis2_tcp_header_create(env, tmp_str, ch2);
+    AXIS2_FREE(env->allocator, tmp_str);
+    return ret;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_header_free(
+    axis2_tcp_header_t *tcp_header,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (tcp_header->name)
+    {
+        AXIS2_FREE(env->allocator, tcp_header->name);
+    }
+    if (tcp_header->value)
+    {
+        AXIS2_FREE(env->allocator, tcp_header->value);
+    }
+
+    AXIS2_FREE(env->allocator, tcp_header);
+    return;
+}
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_header_to_external_form(
+    axis2_tcp_header_t *tcp_header,
+    const axutil_env_t *env)
+{
+    axis2_ssize_t len = 0;
+    axis2_char_t *external_form = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    len = axutil_strlen(tcp_header->name) +
+            axutil_strlen(tcp_header->value) + 8;
+    external_form = (axis2_char_t *) AXIS2_MALLOC(env->allocator,
+            len);
+    sprintf(external_form, "%s: %s%s", tcp_header->name,
+            tcp_header->value, AXIS2_HTTP_CRLF);
+    return external_form;
+}
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_header_get_name(
+    const axis2_tcp_header_t *tcp_header,
+    const axutil_env_t *env)
+{
+    return tcp_header->name;
+}
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+
+axis2_tcp_header_get_value(
+    const axis2_tcp_header_t *tcp_header,
+    const axutil_env_t *env)
+{
+    return tcp_header->value;
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_out_transport_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_out_transport_info.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_out_transport_info.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_out_transport_info.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_out_transport_info.h>
+#include <axutil_string.h>
+#include <axis2_tcp_transport.h>
+#include <axutil_string.h>
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_out_transport_info_impl_set_content_type(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env,
+    const axis2_char_t *content_type)
+{
+    axis2_char_t *tmp1 = NULL;
+    axis2_char_t *tmp2 = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, content_type, AXIS2_FAILURE);
+    if (tcp_out_transport_info->encoding)
+    {
+        axis2_char_t *charset_pos = axutil_strcasestr(content_type, "charset");
+        if (!charset_pos)
+        {
+            tmp1 = axutil_stracat(env, content_type, ";charset=");
+            tmp2 = axutil_stracat(env, tmp1, tcp_out_transport_info->encoding);
+            axis2_tcp_simple_response_set_header(tcp_out_transport_info->response, env,
+                    axis2_tcp_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE,
+                            tmp2));
+            AXIS2_FREE(env->allocator, tmp1);
+            AXIS2_FREE(env->allocator, tmp2);
+        }
+        else
+        {
+            axis2_tcp_simple_response_set_header(tcp_out_transport_info->response, env,
+                axis2_tcp_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE,
+                        content_type));
+        }
+    }
+    else
+    {
+        if(tcp_out_transport_info->response)
+            axis2_tcp_simple_response_set_header(tcp_out_transport_info->response, env,
+                axis2_tcp_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE,
+                        content_type));
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_out_transport_info_impl_set_char_encoding(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env,
+    const axis2_char_t *encoding)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE);
+    if (tcp_out_transport_info->encoding)
+    {
+        AXIS2_FREE(env->allocator, tcp_out_transport_info->encoding);
+    }
+    tcp_out_transport_info->encoding = axutil_strdup(env, encoding);
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_impl_free(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+    if(tcp_out_transport_info->response)
+    {
+        axis2_tcp_simple_response_free(tcp_out_transport_info->response, env);
+    }
+    if (tcp_out_transport_info->encoding)
+    {
+        AXIS2_FREE(env->allocator, tcp_out_transport_info->encoding);
+    }
+    AXIS2_FREE(env->allocator, tcp_out_transport_info);
+    return;
+}
+
+AXIS2_EXTERN axis2_tcp_out_transport_info_t *AXIS2_CALL
+axis2_tcp_out_transport_info_create(
+    const axutil_env_t *env,
+    axis2_tcp_simple_response_t *response)
+{
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+
+    tcp_out_transport_info = (axis2_tcp_out_transport_info_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_out_transport_info_t));
+
+    if (! tcp_out_transport_info)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    tcp_out_transport_info->response = response;
+    tcp_out_transport_info->encoding = NULL;
+	tcp_out_transport_info->set_char_encoding = NULL;
+	tcp_out_transport_info->set_content_type = NULL;
+	tcp_out_transport_info->free_function = NULL;
+
+	tcp_out_transport_info->set_char_encoding =
+          axis2_tcp_out_transport_info_impl_set_char_encoding;
+	tcp_out_transport_info->set_content_type = 
+        axis2_tcp_out_transport_info_impl_set_content_type;
+	tcp_out_transport_info->free_function = 
+        axis2_tcp_out_transport_info_impl_free;
+    
+    return tcp_out_transport_info;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_free(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env)
+{
+    tcp_out_transport_info->free_function(tcp_out_transport_info, env);
+    return;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_free_void_arg(
+    void *transport_info,
+    const axutil_env_t *env)
+{
+    axis2_tcp_out_transport_info_t *transport_info_l = NULL;
+
+    AXIS2_ENV_CHECK(env, void);
+    transport_info_l = (axis2_tcp_out_transport_info_t *) transport_info;
+    axis2_tcp_out_transport_info_free(transport_info_l, env);
+    return;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_out_transport_info_set_content_type(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env,
+    const axis2_char_t *content_type)
+{
+	return tcp_out_transport_info->set_content_type(tcp_out_transport_info, env, content_type);
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_out_transport_info_set_char_encoding(
+    axis2_tcp_out_transport_info_t *tcp_out_transport_info,
+    const axutil_env_t *env,
+    const axis2_char_t *encoding)
+{
+	return tcp_out_transport_info->set_char_encoding(tcp_out_transport_info, env, encoding);
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_set_char_encoding_func(
+		axis2_tcp_out_transport_info_t *out_transport_info,
+		const axutil_env_t *env,
+		axis2_status_t (AXIS2_CALL *set_char_encoding)
+		(axis2_tcp_out_transport_info_t *,	const axutil_env_t *,const axis2_char_t *))
+{
+	out_transport_info->set_char_encoding = set_char_encoding;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_set_content_type_func(
+	axis2_tcp_out_transport_info_t *out_transport_info,
+	const axutil_env_t *env,
+	axis2_status_t (AXIS2_CALL *set_content_type)(
+		axis2_tcp_out_transport_info_t *,
+		const axutil_env_t*,const axis2_char_t *))
+{
+	out_transport_info->set_content_type = set_content_type;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_out_transport_info_set_free_func(
+    axis2_tcp_out_transport_info_t *out_transport_info,
+    const axutil_env_t *env,
+    void (AXIS2_CALL *free_function)(axis2_tcp_out_transport_info_t *,const axutil_env_t*)
+    )
+{
+	out_transport_info->free_function = free_function;
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_request_line.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_request_line.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_request_line.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_request_line.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_request_line.h>
+#include <axutil_string.h>
+#include <string.h>
+#include <axis2_tcp_transport.h>
+#include <stdio.h>
+
+struct axis2_tcp_request_line
+{
+    axis2_char_t *tcp_version;
+    axis2_char_t *method;
+    axis2_char_t *uri;
+};
+
+AXIS2_EXTERN axis2_tcp_request_line_t *AXIS2_CALL
+axis2_tcp_request_line_create(
+    const axutil_env_t *env,
+    const axis2_char_t *method,
+    const axis2_char_t *uri,
+    const axis2_char_t *tcp_version)
+{
+    axis2_tcp_request_line_t *request_line = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, method, NULL);
+    AXIS2_PARAM_CHECK(env->error, uri, NULL);
+    AXIS2_PARAM_CHECK(env->error, tcp_version, NULL);
+
+    request_line = (axis2_tcp_request_line_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(axis2_tcp_request_line_t));
+
+    if (! request_line)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    request_line->method = (axis2_char_t *)axutil_strdup(env, method);
+    request_line->uri = (axis2_char_t *)axutil_strdup(env, uri);
+    request_line->tcp_version = (axis2_char_t *)axutil_strdup(env, tcp_version);
+                
+
+    return request_line;
+}
+
+void AXIS2_CALL
+axis2_tcp_request_line_free(
+    axis2_tcp_request_line_t *request_line,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (request_line->method)
+    {
+        AXIS2_FREE(env->allocator, request_line->method);
+    }
+    if (request_line->uri)
+    {
+        AXIS2_FREE(env->allocator, request_line->uri);
+    }
+    if (request_line->tcp_version)
+    {
+        AXIS2_FREE(env->allocator, request_line->tcp_version);
+    }
+
+    AXIS2_FREE(env->allocator, request_line);
+    return;
+}
+
+AXIS2_EXTERN axis2_tcp_request_line_t *AXIS2_CALL
+axis2_tcp_request_line_parse_line(
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axis2_char_t *req_line = NULL;
+    axis2_char_t *method = NULL;
+    axis2_char_t *uri = NULL;
+    axis2_char_t *tcp_version = NULL;
+    axis2_tcp_request_line_t *ret = NULL;
+    axis2_char_t *tmp = NULL;
+    int i = 0;
+
+    AXIS2_PARAM_CHECK(env->error, str, NULL);
+
+    tmp = axutil_strstr(str, AXIS2_HTTP_CRLF);
+
+
+    if (! tmp)
+    {
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    i = tmp - str;
+    req_line = AXIS2_MALLOC(env->allocator, i * sizeof(axis2_char_t) + 1);
+    if (! req_line)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    memcpy(req_line, str, i * sizeof(axis2_char_t));
+    req_line[i] = '\0';
+    tmp = req_line;
+
+    method = tmp;
+    tmp = strchr(tmp, ' ');
+    if (! tmp)
+    {
+        AXIS2_FREE(env->allocator, req_line);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    *tmp++ = '\0';
+    uri = tmp;
+    tmp = strrchr(tmp, ' ');
+    if (! tmp)
+    {
+        AXIS2_FREE(env->allocator, req_line);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    *tmp++ = '\0';
+    tcp_version = tmp;
+    ret = axis2_tcp_request_line_create(env, method, uri, tcp_version);
+    AXIS2_FREE(env->allocator, req_line);
+
+    return ret;
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_request_line_get_method(
+    const axis2_tcp_request_line_t *request_line,
+    const axutil_env_t *env)
+{
+    return request_line->method;
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_request_line_get_tcp_version(
+    const axis2_tcp_request_line_t *request_line,
+    const axutil_env_t *env)
+{
+    return request_line->tcp_version;
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_request_line_get_uri(
+    const axis2_tcp_request_line_t *request_line,
+    const axutil_env_t *env)
+{
+    return request_line->uri;
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_request_line_to_string(
+    axis2_tcp_request_line_t *request_line,
+    const axutil_env_t *env)
+{
+    int alloc_len = 0;
+    axis2_char_t *ret = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    alloc_len = axutil_strlen(request_line->method) +
+            axutil_strlen(request_line->uri) +
+            axutil_strlen(request_line->tcp_version) + 6;
+    /* 5 = 2 * spaces + '/' +CR + LF + '\0' */
+
+    ret = AXIS2_MALLOC(env->allocator,
+            alloc_len * sizeof(axis2_char_t));
+    if (! ret)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    if (request_line->uri[0] != '/')
+    {
+        sprintf(ret, "%s /%s %s%s", request_line->method, request_line->uri,
+                request_line->tcp_version, AXIS2_HTTP_CRLF);
+    }
+    else
+    {
+        sprintf(ret, "%s %s %s%s", request_line->method, request_line->uri,
+                request_line->tcp_version, AXIS2_HTTP_CRLF);
+    }
+    return ret;
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_response_writer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_response_writer.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_response_writer.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_response_writer.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_response_writer.h>
+#include <axutil_array_list.h>
+#include <axis2_tcp_transport.h>
+#include <axutil_string.h>
+
+struct axis2_tcp_response_writer
+{
+    axutil_stream_t *stream;
+    axis2_char_t *encoding;
+};
+
+AXIS2_EXTERN axis2_tcp_response_writer_t *AXIS2_CALL
+axis2_tcp_response_writer_create(
+    const axutil_env_t *env,
+    axutil_stream_t *stream)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return axis2_tcp_response_writer_create_with_encoding(env, stream,
+            AXIS2_HTTP_DEFAULT_CONTENT_CHARSET);
+
+}
+
+AXIS2_EXTERN axis2_tcp_response_writer_t *AXIS2_CALL
+axis2_tcp_response_writer_create_with_encoding(
+    const axutil_env_t *env,
+    axutil_stream_t *stream,
+    const axis2_char_t *encoding)
+{
+    axis2_tcp_response_writer_t *response_writer = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, encoding, NULL);
+
+    response_writer = (axis2_tcp_response_writer_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_response_writer_t));
+
+    if (! response_writer)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    response_writer->stream = stream;
+    response_writer->encoding = (axis2_char_t *)axutil_strdup(env, encoding);
+
+    return response_writer;
+}
+
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_response_writer_free(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_FREE(env->allocator,
+        response_writer->encoding);
+
+    AXIS2_FREE(env->allocator, response_writer);
+
+    return;
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_response_writer_get_encoding(
+    const axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return response_writer->encoding;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_close(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_flush(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    return AXIS2_FALSE;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_write_char(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env,
+    char c)
+{
+    int write = -1;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if (! response_writer->stream)
+    {
+        return AXIS2_FAILURE;
+    }
+    write = axutil_stream_write(response_writer->stream, env, &c, 1);
+    if (write < 0)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_write_buf(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env,
+    char *buf,
+    int offset,
+    axis2_ssize_t len)
+{
+    int write = -1;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, buf, AXIS2_FAILURE);
+
+    if (! response_writer->stream)
+    {
+        return AXIS2_FAILURE;
+    }
+    write = axutil_stream_write(response_writer->stream, env, buf, len);
+    if (write < 0)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_print_str(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env,
+    const char *str)
+{
+    int write = -1;
+    int len = -1;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    len = axutil_strlen(str);
+    if (! response_writer->stream)
+    {
+        return AXIS2_FAILURE;
+    }
+    write = axutil_stream_write(response_writer->stream, env, str, len);
+    if (write < 0)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_print_int(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env,
+    int i)
+{
+    axis2_char_t int_str[10];
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    sprintf(int_str, "%10d", i);
+    return axis2_tcp_response_writer_print_str(response_writer, env, int_str);
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_println_str(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env,
+    const char *str)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    if (AXIS2_SUCCESS == axis2_tcp_response_writer_print_str(response_writer,
+            env, str))
+    {
+        return axis2_tcp_response_writer_print_str(response_writer, env,
+                AXIS2_HTTP_CRLF);
+    }
+    return AXIS2_FAILURE;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_response_writer_println(
+    axis2_tcp_response_writer_t *response_writer,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    return axis2_tcp_response_writer_print_str(response_writer, env,
+            AXIS2_HTTP_CRLF);
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_request.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_request.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_request.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_request.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,440 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_simple_request.h>
+#include <axutil_array_list.h>
+#include <axis2_tcp_transport.h>
+#include <axutil_string.h>
+#include <string.h>
+#include <axutil_types.h>
+
+struct axis2_tcp_simple_request
+{
+    axis2_tcp_request_line_t *request_line;
+    axutil_array_list_t *header_group;
+    axutil_stream_t *stream;
+    axis2_bool_t owns_stream;
+};
+
+AXIS2_EXTERN axis2_tcp_simple_request_t *AXIS2_CALL
+axis2_tcp_simple_request_create(
+    const axutil_env_t *env,
+    axis2_tcp_request_line_t *request_line,
+    axis2_tcp_header_t **tcp_headers,
+    axis2_ssize_t tcp_hdr_count,
+    axutil_stream_t *content)
+{
+    axis2_tcp_simple_request_t *simple_request = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
+
+    simple_request = (axis2_tcp_simple_request_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_simple_request_t));
+
+    if (! simple_request)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    simple_request->request_line = request_line;
+    simple_request->stream = content;
+    simple_request->header_group = NULL;
+    simple_request->owns_stream = AXIS2_FALSE;
+
+    if (!(simple_request->stream))
+    {
+        simple_request->stream = axutil_stream_create_basic(env);
+        if (! simple_request->stream)
+        {
+            axis2_tcp_simple_request_free((axis2_tcp_simple_request_t *)
+                    simple_request, env);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return NULL;
+        }
+        simple_request->owns_stream = AXIS2_TRUE;
+    }
+
+    if (tcp_hdr_count > 0 &&  tcp_headers)
+    {
+        int i = 0;
+        simple_request->header_group = axutil_array_list_create(env,
+                tcp_hdr_count);
+
+        for (i = 0; i < tcp_hdr_count; i++)
+        {
+            axutil_array_list_add(simple_request->header_group, env,
+                    (void *)tcp_headers[i]);
+        }
+    }
+
+    return simple_request;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_simple_request_free(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (AXIS2_TRUE == simple_request->owns_stream)
+    {
+        axutil_stream_free(simple_request->stream, env);
+    }
+    /*
+        Don't free the stream since it belongs to the socket
+    */
+    if (simple_request->request_line)
+    {
+        axis2_tcp_request_line_free(simple_request->request_line, env);
+    }
+    if (simple_request->header_group)
+    {
+        int i = 0;
+        axis2_tcp_header_t *tmp = NULL;
+        for (i = 0; i < axutil_array_list_size(simple_request->header_group,
+                env); i++)
+        {
+            tmp = (axis2_tcp_header_t *)axutil_array_list_get(
+                        simple_request->header_group, env, i);
+            axis2_tcp_header_free(tmp, env);
+
+        }
+        axutil_array_list_free(simple_request->header_group, env);
+    }
+
+    AXIS2_FREE(env->allocator, simple_request);
+
+    return;
+}
+
+AXIS2_EXTERN axis2_tcp_request_line_t *AXIS2_CALL
+axis2_tcp_simple_request_get_request_line(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    return simple_request->request_line;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_simple_request_set_request_line(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    axis2_tcp_request_line_t *request_line)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, request_line, AXIS2_FAILURE);
+    simple_request->request_line = request_line;
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_tcp_simple_request_contains_header(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    const axis2_char_t *name)
+{
+    int i = 0;
+    axis2_char_t *header_name = NULL;
+    int count = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE);
+
+    if (! simple_request->header_group)
+    {
+        return AXIS2_FALSE;
+    }
+
+    count = axutil_array_list_size(simple_request->header_group, env);
+
+    if (0 == count)
+    {
+        return AXIS2_FALSE;
+    }
+
+    for (i = 0; i < count; i++)
+    {
+        header_name = axis2_tcp_header_get_name((axis2_tcp_header_t *)
+                axutil_array_list_get(simple_request->header_group,
+                        env, i), env);
+        if (0 == axutil_strcasecmp(name, header_name))
+            return AXIS2_TRUE;
+    }
+    return AXIS2_FALSE;
+}
+
+
+AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+axis2_tcp_simple_request_get_headers(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    return simple_request->header_group;
+}
+
+
+AXIS2_EXTERN axis2_tcp_header_t *AXIS2_CALL
+axis2_tcp_simple_request_get_first_header(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axutil_array_list_t *header_group = NULL;
+    int i = 0;
+    int count = 0;
+    axis2_tcp_header_t *tmp_header = NULL;
+    axis2_char_t *tmp_name = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, str, NULL);
+
+    header_group = simple_request->header_group;
+    if (! simple_request->header_group)
+    {
+        return NULL;
+    }
+    if (0 == axutil_array_list_size(header_group, env))
+    {
+        return NULL;
+    }
+
+
+    count = axutil_array_list_size(header_group, env);
+
+
+    for (i = 0; i < count; i++)
+    {
+
+        tmp_header = (axis2_tcp_header_t *)axutil_array_list_get(header_group,
+                env, i);
+        tmp_name = axis2_tcp_header_get_name(tmp_header, env);
+        if (0 == axutil_strcasecmp(str, tmp_name))
+        {
+            return tmp_header;
+        }
+    }
+    return NULL;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_simple_request_remove_headers(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    axis2_char_t *tmp_name = NULL;
+    int i = 0;
+    int count = 0;
+    axutil_array_list_t *header_group = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    header_group = simple_request->header_group;
+
+    if (! header_group)
+    {
+        /* Even though we couldn't complete the op, we are sure that the
+         * requred header is no more in the request. So we can proceed without a
+         * problem.
+         */
+        return AXIS2_SUCCESS;
+    }
+
+    count = axutil_array_list_size(header_group, env);
+
+    for (i = 0; i < count; i++)
+    {
+        tmp_header = (axis2_tcp_header_t *)axutil_array_list_get(header_group,
+                env, i);
+        tmp_name = axis2_tcp_header_get_name(tmp_header, env);
+        if (0 == axutil_strcasecmp(str, tmp_name))
+        {
+            axis2_tcp_header_free(tmp_header, env);
+            axutil_array_list_remove(header_group, env, i);
+            break;
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_simple_request_add_header(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    axis2_tcp_header_t *header)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, header, AXIS2_FAILURE);
+
+    if (! simple_request->header_group)
+    {
+        simple_request->header_group = axutil_array_list_create(env, 1);
+    }
+    return axutil_array_list_add(simple_request->header_group,
+            env, header);
+}
+
+
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_request_get_content_type(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    tmp_header = axis2_tcp_simple_request_get_first_header
+            (simple_request, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
+    if (tmp_header)
+        return axis2_tcp_header_get_value(tmp_header, env);
+
+    return AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN;
+}
+
+
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_request_get_charset(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header  = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    tmp_header = axis2_tcp_simple_request_get_first_header
+            (simple_request, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
+    if (tmp_header)
+    {
+        axis2_char_t *value = axis2_tcp_header_get_value(tmp_header, env);
+        axis2_char_t *charset = (axis2_char_t *)strstr((char *)value,
+                (char *)AXIS2_HTTP_CHAR_SET_ENCODING);
+        if (charset)
+        {
+            charset = strchr((char *)charset, '=');
+            return charset;
+        }
+    }
+
+    return AXIS2_HTTP_DEFAULT_CONTENT_CHARSET;
+}
+
+
+AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+axis2_tcp_simple_request_get_content_length(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    tmp_header = axis2_tcp_simple_request_get_first_header
+            (simple_request, env, AXIS2_HTTP_HEADER_CONTENT_LENGTH);
+    if (tmp_header)
+    {
+        return AXIS2_ATOI(axis2_tcp_header_get_value(tmp_header, env));
+    }
+    return -1;
+}
+
+
+AXIS2_EXTERN axutil_stream_t *AXIS2_CALL
+axis2_tcp_simple_request_get_body(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env)
+{
+    return simple_request->stream;
+}
+
+
+AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
+axis2_tcp_simple_request_get_body_bytes(
+    const axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    char **buf)
+{
+    axutil_stream_t *body = NULL;
+    char *tmp_buf = NULL;
+    char *tmp_buf2 = NULL;
+    char *tmp_buf3 = NULL;
+    int length = 0;
+    int read_len = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    body = simple_request->stream;
+    if (! body)
+    {
+        *buf = (char*)AXIS2_MALLOC(env->allocator, 1);
+        *buf[0] = '\0';
+        return 0;
+    }
+    length = axis2_tcp_simple_request_get_content_length(simple_request, env);
+    if (length > 0)
+    {
+        *buf = (char*)AXIS2_MALLOC(env->allocator, length + 1);
+        read_len = axutil_stream_read(body, env, *buf, length + 1);
+        return read_len;
+    }
+    tmp_buf2 = AXIS2_MALLOC(env->allocator, 128 * sizeof(char));
+    while (axutil_stream_read(body, env, tmp_buf2, 128) > 0)
+    {
+        tmp_buf3 = axutil_stracat(env, tmp_buf, tmp_buf2);
+        if (tmp_buf)
+        {
+            AXIS2_FREE(env->allocator, tmp_buf);
+            tmp_buf = NULL;
+        }
+        tmp_buf = tmp_buf3;
+
+    }
+    if (tmp_buf)
+    {
+        *buf = tmp_buf;
+        return axutil_strlen(tmp_buf);
+    }
+    return -1;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_tcp_simple_request_set_body_string(
+    axis2_tcp_simple_request_t *simple_request,
+    const axutil_env_t *env,
+    void *str,
+    unsigned int str_len)
+{
+    axutil_stream_t *body_stream = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    body_stream = simple_request->stream;
+    if (! body_stream)
+    {
+        body_stream = axutil_stream_create_basic(env);
+        if (! body_stream)
+        {
+            return AXIS2_FAILURE;
+        }
+        simple_request->stream = body_stream;
+        simple_request->owns_stream = AXIS2_TRUE;
+    }
+    axutil_stream_write(body_stream, env, str, str_len);
+    return AXIS2_SUCCESS;
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_response.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_response.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_response.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_simple_response.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,543 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <axis2_tcp_simple_response.h>
+#include <axis2_tcp_transport.h>
+#include <axutil_string.h>
+#include <stdio.h>
+#include <string.h>
+#include <axutil_types.h>
+
+#define AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE 2048
+
+struct axis2_tcp_simple_response
+{
+    axis2_tcp_status_line_t *status_line;
+    axutil_array_list_t *header_group;
+    axutil_stream_t *stream;
+};
+
+AXIS2_EXTERN axis2_tcp_simple_response_t *AXIS2_CALL
+axis2_tcp_simple_response_create(
+    const axutil_env_t *env,
+    axis2_tcp_status_line_t *status_line,
+    const axis2_tcp_header_t **tcp_headers,
+    const axis2_ssize_t tcp_hdr_count,
+    axutil_stream_t *content)
+{
+    axis2_tcp_simple_response_t *ret = NULL;
+    axis2_tcp_simple_response_t *simple_response = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
+
+    ret = axis2_tcp_simple_response_create_default(env);
+    if (! ret)
+    {
+        return NULL;
+    }
+    simple_response = ret;
+
+    if (! simple_response)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    simple_response->status_line = status_line;
+    if (tcp_hdr_count > 0 &&  tcp_headers)
+    {
+        int i = 0;
+        simple_response->header_group = axutil_array_list_create(env,
+                tcp_hdr_count);
+
+        for (i = 0; i < tcp_hdr_count; i++)
+        {
+            axutil_array_list_add(simple_response->header_group, env,
+                    (void *)tcp_headers[i]);
+        }
+    }
+    simple_response->stream = content;
+
+    return ret;
+}
+
+
+AXIS2_EXTERN axis2_tcp_simple_response_t *AXIS2_CALL
+axis2_tcp_simple_response_create_default(
+    const axutil_env_t *env)
+{
+    axis2_tcp_simple_response_t *simple_response = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+
+    simple_response = (axis2_tcp_simple_response_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_simple_response_t));
+
+    simple_response->status_line = NULL;
+    simple_response->header_group = NULL;
+    simple_response->stream = NULL;
+
+    return simple_response;
+}
+
+void AXIS2_CALL
+axis2_tcp_simple_response_free(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (simple_response->status_line)
+    {
+        axis2_tcp_status_line_free(simple_response->status_line, env);
+    }
+    if (simple_response->header_group)
+    {
+        int i = 0;
+        axis2_tcp_header_t *tmp = NULL;
+        for (i = 0; i < axutil_array_list_size(simple_response->header_group,
+                env); i++)
+        {
+            tmp = (axis2_tcp_header_t *)axutil_array_list_get(
+                        simple_response->header_group, env, i);
+            if (tmp)
+            {
+                axis2_tcp_header_free(tmp, env);
+            }
+        }
+        axutil_array_list_free(simple_response->header_group, env);
+    }
+
+    AXIS2_FREE(env->allocator, simple_response);
+    /* 
+     * Stream is not freed
+     * Assumption : stream doesn't belong to the response
+     */
+    return;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_tcp_simple_response_set_status_line(
+    struct axis2_tcp_simple_response *simple_response,
+    const axutil_env_t *env,
+    const axis2_char_t *tcp_ver,
+    const int status_code,
+    const axis2_char_t *phrase)
+{
+    axis2_char_t *tmp_status_line_str = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, tcp_ver, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, status_code, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, phrase, AXIS2_FAILURE);
+
+    tmp_status_line_str = AXIS2_MALLOC(env->allocator,
+            (axutil_strlen(tcp_ver) + axutil_strlen(phrase) + 8) *
+            sizeof(axis2_char_t *));
+    sprintf(tmp_status_line_str, "%s %3d %s%s", tcp_ver, status_code, phrase,
+            AXIS2_HTTP_CRLF);
+    if (simple_response->status_line)
+    {
+        axis2_tcp_status_line_free(simple_response->status_line, env);
+        simple_response->status_line = NULL;
+    }
+    simple_response->status_line = axis2_tcp_status_line_create(env,
+            tmp_status_line_str);
+    AXIS2_FREE(env->allocator, tmp_status_line_str);
+
+    if (! simple_response->status_line)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_response_get_phrase(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    if (!(simple_response->status_line))
+    {
+        return NULL;
+    }
+    return axis2_tcp_status_line_get_reason_phrase(simple_response->status_line, env);
+}
+
+
+int AXIS2_CALL
+axis2_tcp_simple_response_get_status_code(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    if (!(simple_response->status_line))
+    {
+        return -1;
+    }
+    return axis2_tcp_status_line_get_status_code(simple_response->status_line, env);
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_response_get_tcp_version(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    if (!(simple_response->status_line))
+    {
+        return NULL;
+    }
+    return axis2_tcp_status_line_get_tcp_version(simple_response->status_line, env);
+}
+
+
+axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_response_get_status_line(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    if (!(simple_response->status_line))
+    {
+        return NULL;
+    }
+    return axis2_tcp_status_line_to_string(simple_response->status_line, env);
+}
+
+axutil_array_list_t *AXIS2_CALL
+axis2_tcp_simple_response_get_headers(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    return simple_response->header_group;
+}
+
+axis2_tcp_header_t *AXIS2_CALL
+axis2_tcp_simple_response_get_first_header(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    axis2_char_t *tmp_name = NULL;
+    int i = 0;
+    int count = 0;
+    axutil_array_list_t *header_group = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, str, NULL);
+
+    header_group = simple_response->header_group;
+    if (! simple_response->header_group)
+    {
+        return NULL;
+    }
+    if (0 == axutil_array_list_size(header_group, env))
+    {
+        return NULL;
+    }
+
+    count = axutil_array_list_size(header_group, env);
+
+    for (i = 0; i < count; i++)
+    {
+        tmp_header = (axis2_tcp_header_t *)axutil_array_list_get(header_group,
+                env, i);
+        tmp_name = axis2_tcp_header_get_name(tmp_header, env);
+        if (0 == axutil_strcasecmp(str, tmp_name))
+        {
+            return tmp_header;
+        }
+    }
+    return NULL;
+
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_tcp_simple_response_remove_headers(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axutil_array_list_t *header_group = NULL;
+    axis2_tcp_header_t *tmp_header = NULL;
+    axis2_char_t *tmp_name = NULL;
+    int i = 0;
+    int count = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    header_group = simple_response->header_group;
+    if (! header_group)
+    {
+        /* Even though we couldn't complete the op, we are sure that the
+         * requred header is no more in the request. So we can proceed without a
+         * problem.
+         */
+        return AXIS2_SUCCESS;
+    }
+
+    count = axutil_array_list_size(header_group, env);
+
+
+    for (i = 0; i < count; i++)
+    {
+        tmp_header = (axis2_tcp_header_t *)axutil_array_list_get(header_group,
+                env, i);
+        tmp_name = axis2_tcp_header_get_name(tmp_header, env);
+        if (0 == axutil_strcasecmp(str, tmp_name))
+        {
+            axis2_tcp_header_free(tmp_header, env);
+            axutil_array_list_remove(header_group, env, i);
+            break;
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_tcp_simple_response_set_header(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    axis2_tcp_header_t *header)
+{
+    int i = 0;
+    int count = 0;
+    axis2_tcp_header_t *tmp_header = NULL;
+    axis2_char_t *tmp_name = NULL;
+    axutil_array_list_t *header_group = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, header, AXIS2_FAILURE);
+
+    if (! simple_response->header_group)
+    {
+        simple_response->header_group = axutil_array_list_create(env, 10);
+        axutil_array_list_add(simple_response->header_group, env, header);
+        return AXIS2_SUCCESS;
+    }
+
+    /* If a header with the same name exists
+     * search and remove the old header
+     */
+    header_group = simple_response->header_group;
+
+    count = axutil_array_list_size(header_group, env);
+    for (i = 0; i < count; i++)
+    {
+        tmp_header = (axis2_tcp_header_t *)axutil_array_list_get(header_group,
+                env, i);
+        tmp_name = axis2_tcp_header_get_name(tmp_header, env);
+        if (0 == axutil_strcasecmp(axis2_tcp_header_get_name(header, env),
+                tmp_name))
+        {
+            axis2_tcp_header_free(tmp_header, env);
+            axutil_array_list_remove(header_group, env, i);
+            break;
+        }
+    }
+    axutil_array_list_add(simple_response->header_group, env,
+            (void *)header);
+    return AXIS2_SUCCESS;
+}
+
+
+const axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_response_get_charset(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    tmp_header = axis2_tcp_simple_response_get_first_header
+            (simple_response, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
+    if (tmp_header)
+    {
+        axis2_char_t *value = axis2_tcp_header_get_value(tmp_header, env);
+        axis2_char_t *charset = (axis2_char_t *)strstr((char *)value,
+                (char *)AXIS2_HTTP_CHAR_SET_ENCODING);
+        if (charset)
+        {
+            charset = strchr((char *)charset, '=');
+            return charset;
+        }
+    }
+
+    return AXIS2_HTTP_DEFAULT_CONTENT_CHARSET;
+}
+
+
+axis2_ssize_t AXIS2_CALL
+axis2_tcp_simple_response_get_content_length(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    tmp_header = axis2_tcp_simple_response_get_first_header
+            (simple_response, env, AXIS2_HTTP_HEADER_CONTENT_LENGTH);
+    if (tmp_header)
+    {
+        return AXIS2_ATOI(axis2_tcp_header_get_value(tmp_header, env));
+    }
+    return -1;
+}
+
+
+const axis2_char_t *AXIS2_CALL
+axis2_tcp_simple_response_get_content_type(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    axis2_tcp_header_t *tmp_header = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    tmp_header =  axis2_tcp_simple_response_get_first_header
+            (simple_response, env, AXIS2_HTTP_HEADER_CONTENT_TYPE);
+    if (tmp_header)
+        return axis2_tcp_header_get_value(tmp_header, env);
+
+    return AXIS2_HTTP_HEADER_ACCEPT_TEXT_PLAIN;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_tcp_simple_response_set_body_string(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    axis2_char_t *str)
+{
+    axutil_stream_t *body_stream = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
+
+    body_stream = simple_response->stream;
+    if (! body_stream)
+    {
+        body_stream = axutil_stream_create_basic(env);
+        if (! body_stream)
+        {
+            return AXIS2_FAILURE;
+        }
+        simple_response->stream = body_stream;
+    }
+    axutil_stream_write(body_stream, env, str, axutil_strlen(str));
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_tcp_simple_response_set_body_stream(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    axutil_stream_t *stream)
+{
+    /*
+     * We don't free the stream
+     * Problem in freeing is most of the time the stream doesn't belong
+     * to the tcp_simple_response
+     */
+    simple_response->stream = stream;
+    return AXIS2_SUCCESS;
+}
+
+axutil_stream_t *AXIS2_CALL
+axis2_tcp_simple_response_get_body(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env)
+{
+    return simple_response->stream;
+}
+
+
+axis2_ssize_t AXIS2_CALL
+axis2_tcp_simple_response_get_body_bytes(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    axis2_char_t **buffer)
+{
+    axutil_stream_t *tmp_stream = NULL;
+    int return_size = -1;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if (! simple_response->stream)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_BODY, AXIS2_FAILURE);
+        return -1;
+    }
+    tmp_stream = axutil_stream_create_basic(env);
+    while (1)
+    {
+        int read = 0;
+        int write = 0;
+        /*   int AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE = 32; */
+        char buf[AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE];
+        read = axutil_stream_read(simple_response->stream, env, buf, AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE);
+        if (read < 0)
+        {
+            break;
+        }
+        write = axutil_stream_write(tmp_stream, env, buf, read);
+        if (read < (AXIS2_HTTP_SIMPLE_RESPONSE_READ_SIZE - 1))
+        {
+            break;
+        }
+    }
+    return_size = axutil_stream_get_len(tmp_stream, env);
+
+    if (return_size > 0)
+    {
+        *buffer = (char *)AXIS2_MALLOC(env->allocator, sizeof(char) *
+                (return_size + 1));
+        return_size = axutil_stream_read(tmp_stream, env, *buffer,
+                return_size + 1);
+    }
+    axutil_stream_free(tmp_stream, env);
+    return return_size;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_tcp_simple_response_contains_header(
+    axis2_tcp_simple_response_t *simple_response,
+    const axutil_env_t *env,
+    const axis2_char_t *name)
+{
+    axis2_char_t *header_name = NULL;
+    int count = 0;
+    int i = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE);
+    if (! simple_response->header_group)
+    {
+        return AXIS2_FALSE;
+    }
+    count = axutil_array_list_size(simple_response->header_group, env);
+    if (0 == count)
+    {
+        return AXIS2_FALSE;
+    }
+
+    for (i = 0; i < count; i++)
+    {
+        header_name = axis2_tcp_header_get_name((axis2_tcp_header_t *)
+                axutil_array_list_get(simple_response->header_group,
+                        env, i), env);
+        if (0 == axutil_strcasecmp(name, header_name))
+            return AXIS2_TRUE;
+    }
+    return AXIS2_FALSE;
+}

Added: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_status_line.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_status_line.c?view=auto&rev=557477
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_status_line.c (added)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/tcp/common/http_status_line.c Wed Jul 18 20:38:32 2007
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      tcp://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_tcp_status_line.h>
+#include <axutil_string.h>
+#include <axis2_tcp_transport.h>
+#include <string.h>
+#include <axutil_types.h>
+
+struct axis2_tcp_status_line
+{
+    axis2_char_t *line;
+    axis2_char_t *tcp_version;
+    axis2_char_t *status_code;
+    axis2_char_t *reason_phrase;
+};
+
+AXIS2_EXTERN axis2_tcp_status_line_t *AXIS2_CALL
+axis2_tcp_status_line_create(
+    const axutil_env_t *env,
+    const axis2_char_t *str)
+{
+    axis2_char_t *tmp_status_line = NULL;
+    axis2_char_t *reason_phrase = NULL;
+    axis2_char_t *status_code = NULL;
+    axis2_char_t *tcp_version = NULL;
+    int i = 0;
+    axis2_char_t *tmp = NULL;
+    axis2_tcp_status_line_t *status_line  = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    status_line = (axis2_tcp_status_line_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_tcp_status_line_t));
+
+    if (! status_line)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+	status_line->line = (axis2_char_t *)axutil_strdup(env, str);
+    status_line->tcp_version = NULL;
+    status_line->reason_phrase = NULL;
+    status_line->status_code = NULL;
+
+    tmp = strstr(str, AXIS2_HTTP_CRLF);
+    if (! tmp)
+    {
+        axis2_tcp_status_line_free((axis2_tcp_status_line_t *)
+                status_line, env);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    i = tmp - str;
+    tmp_status_line = AXIS2_MALLOC(env->allocator,
+            i * sizeof(axis2_char_t) + 1);
+    if (! tmp_status_line)
+    {
+        axis2_tcp_status_line_free((axis2_tcp_status_line_t *)
+                status_line, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    memcpy(tmp_status_line, str, i *sizeof(axis2_char_t));
+    tmp_status_line[i] = '\0';
+    tmp = tmp_status_line;
+
+    tcp_version = tmp;
+    tmp = strchr(tmp, ' ');
+    if (! tmp)
+    {
+        AXIS2_FREE(env->allocator, tmp_status_line);
+        axis2_tcp_status_line_free((axis2_tcp_status_line_t *)
+                status_line, env);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    *tmp++ = '\0';
+    status_code = tmp;
+    tmp = strchr(tmp, ' ');
+    if (! tmp)
+    {
+        AXIS2_FREE(env->allocator, tmp_status_line);
+        axis2_tcp_status_line_free((axis2_tcp_status_line_t *)
+                status_line, env);
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_INVALID_HTTP_HEADER_START_LINE,
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    *tmp++ = '\0';
+    reason_phrase = tmp;
+    status_line->tcp_version = (axis2_char_t *)
+            axutil_strdup(env, tcp_version);
+    status_line->status_code = (axis2_char_t *)
+            axutil_strdup(env, status_code);
+    status_line->reason_phrase = (axis2_char_t *)
+            axutil_strdup(env, reason_phrase);
+
+    if (! status_line->tcp_version ||
+            ! status_line->reason_phrase)
+    {
+        AXIS2_FREE(env->allocator, tmp_status_line);
+        axis2_tcp_status_line_free((axis2_tcp_status_line_t *)
+                status_line, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    AXIS2_FREE(env->allocator, tmp_status_line);
+
+    return status_line;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_tcp_status_line_free(
+    axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (status_line->line)
+    {
+        AXIS2_FREE(env->allocator, status_line->line);
+    }
+    if (status_line->tcp_version)
+    {
+        AXIS2_FREE(env->allocator, status_line->tcp_version);
+    }
+    if (status_line->status_code)
+    {
+        AXIS2_FREE(env->allocator, status_line->status_code);
+    }
+    if (status_line->reason_phrase)
+    {
+        AXIS2_FREE(env->allocator, status_line->reason_phrase);
+    }
+
+    AXIS2_FREE(env->allocator, status_line);
+    return;
+}
+
+AXIS2_EXTERN int AXIS2_CALL
+axis2_tcp_status_line_get_status_code(
+    const axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_CRITICAL_FAILURE);
+    if (status_line->status_code)
+    {
+        return AXIS2_ATOI(status_line->status_code);
+    }
+    else
+    {
+        return AXIS2_CRITICAL_FAILURE;
+    }
+
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_status_line_get_tcp_version(
+    const axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    return status_line->tcp_version;
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_status_line_get_reason_phrase(
+    const axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    return status_line->reason_phrase;
+}
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_tcp_status_line_starts_with_tcp(
+    axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    if (0 == axutil_strncasecmp(status_line->line, "HTTP", 4))
+    {
+        return AXIS2_TRUE;
+    }
+    return AXIS2_FALSE;
+}
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_tcp_status_line_to_string(
+    axis2_tcp_status_line_t *status_line,
+    const axutil_env_t *env)
+{
+    return status_line->line;
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org