summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar m0gg2006-11-21 08:34:34 +0000
committerGravatar m0gg2006-11-21 08:34:34 +0000
commitcd94b25993049a596b163f0ad8b3a2340e024cc3 (patch)
tree0b9489cf8c5869a2015bc6b1549e1f08f35325e9
parent949a8d0b46d6baa9f42c2f8c3bd5e3bdc3596cbd (diff)
downloadcsoap-cd94b25993049a596b163f0ad8b3a2340e024cc3.tar.gz
csoap-cd94b25993049a596b163f0ad8b3a2340e024cc3.tar.bz2
Web Services Addressing for multiple transport daemons (initial)
-rw-r--r--config.h.in12
-rwxr-xr-xconfigure349
-rw-r--r--configure.ac12
-rw-r--r--libcsoap/Makefile.am4
-rw-r--r--libcsoap/soap-addressing.c527
-rw-r--r--libcsoap/soap-addressing.h236
-rw-r--r--libcsoap/soap-env.c3
-rw-r--r--libcsoap/soap-env.h4
-rw-r--r--libcsoap/soap-server.c18
-rw-r--r--libcsoap/soap-xml.h3
-rw-r--r--nanohttp/nanohttp-admin.c14
-rw-r--r--nanohttp/nanohttp-client.c7
-rwxr-xr-xnanohttp/nanohttp-mime.c6
-rwxr-xr-xnanohttp/nanohttp-request.c4
-rwxr-xr-xnanohttp/nanohttp-response.c7
15 files changed, 1170 insertions, 36 deletions
diff --git a/config.h.in b/config.h.in
index ed1b9a1..823cacb 100644
--- a/config.h.in
+++ b/config.h.in
@@ -145,9 +145,21 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `uuid_create' function. */
+#undef HAVE_UUID_CREATE
+
+/* Define to 1 if you have the <uuid.h> header file. */
+#undef HAVE_UUID_H
+
+/* Define to 1 if you have the `uuid_to_string */
+#undef HAVE_UUID_TO_STRING
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
diff --git a/configure b/configure
index 28b0d00..b07eb95 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for csoap 1.1.0.
+# Generated by GNU Autoconf 2.59 for csoap 1.2.0.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -421,8 +421,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='csoap'
PACKAGE_TARNAME='csoap'
-PACKAGE_VERSION='1.1.0'
-PACKAGE_STRING='csoap 1.1.0'
+PACKAGE_VERSION='1.2.0'
+PACKAGE_STRING='csoap 1.2.0'
PACKAGE_BUGREPORT=''
ac_unique_file="nanohttp/nanohttp-server.c"
@@ -464,7 +464,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL csoap_major csoap_minor csoap_patch csoap_release csoap_version nanohttp_release nanohttp_version LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LIBSOCKET LIBNSL XML2_CONFIG XML_CPPFLAGS XML_LIBS XMLSEC1_CONFIG XMLSEC1_CFLAGS XMLSEC1_LIBS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL csoap_major csoap_minor csoap_patch csoap_release csoap_version nanohttp_release nanohttp_version LIBOBJS LIBUUID acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LIBSOCKET LIBNSL XML2_CONFIG XML_CPPFLAGS XML_LIBS XMLSEC1_CONFIG XMLSEC1_CFLAGS XMLSEC1_LIBS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -953,7 +953,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures csoap 1.1.0 to adapt to many kinds of systems.
+\`configure' configures csoap 1.2.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1019,7 +1019,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of csoap 1.1.0:";;
+ short | recursive ) echo "Configuration of csoap 1.2.0:";;
esac
cat <<\_ACEOF
@@ -1168,7 +1168,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-csoap configure 1.1.0
+csoap configure 1.2.0
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1182,7 +1182,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by csoap $as_me 1.1.0, which was
+It was created by csoap $as_me 1.2.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1828,7 +1828,7 @@ fi
# Define the identity of the package.
PACKAGE='csoap'
- VERSION='1.1.0'
+ VERSION='1.2.0'
cat >>confdefs.h <<_ACEOF
@@ -18921,7 +18921,8 @@ fi
-for ac_header in arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h signal.h pthread.h string.h sys/socket.h sys/time.h unistd.h io.h stdio.h stdarg.h errno.h ctype.h openssl/ssl.h openssl/rand.h openssl/err.h
+
+for ac_header in arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h signal.h pthread.h string.h sys/socket.h time.h sys/time.h unistd.h io.h stdio.h stdarg.h errno.h ctype.h openssl/ssl.h openssl/rand.h openssl/err.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -20412,6 +20413,329 @@ done
+for ac_header in uuid.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## -------------------------------- ##
+## Report this to the csoap lists. ##
+## -------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for uuid_create in -luuid" >&5
+echo $ECHO_N "checking for uuid_create in -luuid... $ECHO_C" >&6
+if test "${ac_cv_lib_uuid_uuid_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char uuid_create ();
+int
+main ()
+{
+uuid_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_uuid_uuid_create=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_uuid_uuid_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_create" >&5
+echo "${ECHO_T}$ac_cv_lib_uuid_uuid_create" >&6
+if test $ac_cv_lib_uuid_uuid_create = yes; then
+ LIBUUID="-luuid"
+fi
+
+
+
+for ac_func in uuid_to_string, uuid_create
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
@@ -22189,7 +22513,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by csoap $as_me 1.1.0, which was
+This file was extended by csoap $as_me 1.2.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22252,7 +22576,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-csoap config.status 1.1.0
+csoap config.status 1.2.0
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@@ -22530,6 +22854,7 @@ s,@csoap_version@,$csoap_version,;t t
s,@nanohttp_release@,$nanohttp_release,;t t
s,@nanohttp_version@,$nanohttp_version,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LIBUUID@,$LIBUUID,;t t
s,@acx_pthread_config@,$acx_pthread_config,;t t
s,@PTHREAD_CC@,$PTHREAD_CC,;t t
s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
diff --git a/configure.ac b/configure.ac
index e7433f0..3f49a2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
-AC_INIT(csoap, 1.1.0)
+AC_INIT(csoap, 1.2.0)
AC_CONFIG_SRCDIR([nanohttp/nanohttp-server.c])
AC_CONFIG_SRCDIR([libcsoap/soap-server.c])
@@ -41,7 +41,7 @@ dnl checks for headers
dnl
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h signal.h pthread.h string.h sys/socket.h sys/time.h unistd.h io.h stdio.h stdarg.h errno.h ctype.h openssl/ssl.h openssl/rand.h openssl/err.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stdint.h stdlib.h signal.h pthread.h string.h sys/socket.h time.h sys/time.h unistd.h io.h stdio.h stdarg.h errno.h ctype.h openssl/ssl.h openssl/rand.h openssl/err.h])
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -63,6 +63,14 @@ AC_FUNC_STRFTIME
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([gethostbyname inet_ntoa memmove memset mkdir select socket strchr strdup strncasecmp strpbrk strspn strstr strtol])
+dnl
+dnl check for uuid
+dnl
+AC_CHECK_HEADERS([uuid.h])
+AC_CHECK_LIB(uuid, uuid_create, [LIBUUID="-luuid"])
+AC_CHECK_FUNCS([uuid_to_string, uuid_create])
+AC_SUBST(LIBUUID)
+
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl @summary figure out how to build C programs using POSIX threads
diff --git a/libcsoap/Makefile.am b/libcsoap/Makefile.am
index 8b096d4..ecd212a 100644
--- a/libcsoap/Makefile.am
+++ b/libcsoap/Makefile.am
@@ -5,11 +5,11 @@ libcsoap_ladir=$(includedir)/libcsoap-@csoap_release@/libcsoap
libcsoap_la_SOURCES=soap-xml.c soap-fault.c soap-env.c soap-service.c \
soap-router.c soap-client.c soap-server.c soap-ctx.c \
- soap-admin.c
+ soap-admin.c soap-addressing.c
libcsoap_la_HEADERS=soap-xml.h soap-fault.h soap-env.h soap-service.h \
soap-router.h soap-client.h soap-server.h soap-ctx.h \
- soap-admin.h
+ soap-admin.h soap-addressing.h
libcsoap_la_LDFLAGS= -version-info @csoap_version@ -release @csoap_release@
libcsoap_la_CFLAGS=-I${top_srcdir}
diff --git a/libcsoap/soap-addressing.c b/libcsoap/soap-addressing.c
new file mode 100644
index 0000000..bd542fd
--- /dev/null
+++ b/libcsoap/soap-addressing.c
@@ -0,0 +1,527 @@
+/******************************************************************
+* $Id: soap-addressing.c,v 1.1 2006/11/21 08:34:34 m0gg Exp $
+*
+* CSOAP Project: A SOAP client/server library in C
+* Copyright (C) 2006 Heiko Ronsdorf
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Library General Public
+* License as published by the Free Software Foundation; either
+* version 2 of the License, or (at your option) any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Library General Public License for more details.
+*
+* You should have received a copy of the GNU Library General Public
+* License along with this library; if not, write to the
+* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+* Boston, MA 02111-1307, USA.
+*
+* Email: hero@persua.de
+******************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_UUID_H
+#include <uuid.h>
+#endif
+
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/uri.h>
+
+#include <nanohttp/nanohttp-common.h>
+#include <nanohttp/nanohttp-socket.h>
+#include <nanohttp/nanohttp-stream.h>
+#include <nanohttp/nanohttp-logging.h>
+
+#include "soap-xml.h"
+#include "soap-env.h"
+#include "soap-addressing.h"
+
+static const char *_soap_addressing_uuid_error(uint32_t status)
+{
+ switch(status)
+ {
+ case uuid_s_bad_version:
+ return "The UUID does not have a known version";
+ case uuid_s_invalid_string_uuid:
+ return "The string representation of an UUID is not valid";
+ case uuid_s_no_memory:
+ /* XXX: From FreeBSD 6.2 UUID(3) ??? */
+ return "The meaning of the code escaped the writers mind";
+ default:
+ return "Unkown error";
+ }
+}
+
+static char * _soap_addressing_generate_id(void)
+{
+ uuid_t uuid;
+ uint32_t status;
+ char *ret;
+
+ uuid_create(&uuid, &status);
+ if (status != uuid_s_ok)
+ {
+ log_error2("uuidcreate failed (%s)", _soap_addressing_uuid_error(status));
+ return NULL;
+ }
+
+ uuid_to_string(&uuid, &ret, &status);
+ if (status != uuid_s_ok)
+ {
+ log_error2("uuid_to_string failed (%s)", _soap_addressing_uuid_error(status));
+ return NULL;
+ }
+ return ret;
+}
+
+static xmlNsPtr _soap_addressing_get_namespace(xmlNodePtr node)
+{
+ xmlNsPtr ns;
+
+ if (!(ns = xmlSearchNsByHref(node->doc, node, BAD_CAST WSA_NAMESPACE)))
+ {
+ ns = xmlNewNs(node, BAD_CAST WSA_NAMESPACE, BAD_CAST WSA_NAMESPACE_PREFIX);
+ }
+ return ns;
+}
+
+static xmlNodePtr _soap_addressing_add_node(xmlNodePtr parent, const xmlChar *name, const xmlChar *content)
+{
+ xmlNsPtr ns;
+
+ ns = _soap_addressing_get_namespace(parent);
+ return xmlNewChild(parent, ns, name, content);
+}
+
+static xmlAttrPtr _soap_addressing_set_property(xmlNodePtr node, const xmlChar *name, const xmlChar *value)
+{
+ xmlNsPtr ns;
+
+ ns = _soap_addressing_get_namespace(node);
+ return xmlSetNsProp(node, ns, name, value);
+}
+
+static xmlAttrPtr _soap_addressing_set_property_uri(xmlNodePtr node, const xmlChar *name, xmlURI *uri)
+{
+ xmlChar *buf;
+ xmlAttrPtr ret;
+
+ buf = xmlSaveUri(uri);
+ ret = _soap_addressing_set_property(node, name, buf);
+ xmlFree(buf);
+
+ return ret;
+}
+
+static xmlNodePtr _soap_addressing_get_child_element(xmlNodePtr parent, const xmlChar *name)
+{
+ xmlNodePtr walker;
+
+ for (walker = soap_xml_get_children(parent); walker; walker = soap_xml_get_next(walker))
+ {
+ if (!xmlStrcmp(walker->name, name) && !xmlStrcmp(walker->ns->href, WSA_NAMESPACE))
+ return walker;
+ }
+ return NULL;
+}
+
+static xmlURI *_soap_addressing_extract_uri(xmlNodePtr node)
+{
+ xmlChar *content;
+ xmlURI *uri = NULL;
+
+ if ((content = xmlNodeGetContent(node)))
+ {
+ uri = xmlParseURI(content);
+ xmlFree(content);
+ }
+ return uri;
+}
+
+static xmlNodePtr _soap_addressing_set_content_uri(xmlNodePtr node, xmlURI *uri)
+{
+ xmlChar *buf;
+
+ buf = xmlSaveUri(uri);
+ xmlNodeSetContent(node, buf);
+ xmlFree(buf);
+
+ return node;
+}
+
+xmlURI *soap_addressing_get_address(xmlNodePtr endpoint_reference)
+{
+ xmlNodePtr address;
+
+ address = _soap_addressing_get_child_element(endpoint_reference, WSA_ADDRESS);
+ if (address == NULL)
+ return NULL;
+
+ return _soap_addressing_extract_uri(address);
+}
+
+xmlNodePtr soap_addressing_set_address(xmlNodePtr endpoint_reference, xmlURI *address)
+{
+ xmlNodePtr node;
+
+ node = _soap_addressing_get_child_element(endpoint_reference, WSA_ADDRESS);
+ if (node == NULL)
+ node = _soap_addressing_add_node(endpoint_reference, WSA_ADDRESS, NULL);
+
+ return _soap_addressing_set_content_uri(node, address);
+}
+
+xmlNodePtr soap_addressing_get_reference_properties(xmlNodePtr endpoint_reference)
+{
+ return _soap_addressing_get_child_element(endpoint_reference, WSA_REFERENCE_PROPERTIES);
+}
+
+xmlNodePtr soap_addressing_set_reference_properties(xmlNodePtr endpoint_reference, xmlNodePtr properties)
+{
+ xmlNodePtr node;
+
+ node = soap_addressing_get_reference_properties(endpoint_reference);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ node = xmlCopyNode(properties, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(endpoint_reference, node);
+
+ return node;
+}
+
+xmlNodePtr soap_addressing_get_metadata(xmlNodePtr endpoint_reference)
+{
+ return _soap_addressing_get_child_element(endpoint_reference, WSA_METADATA);
+}
+
+xmlNodePtr soap_addressing_set_metadata(xmlNodePtr endpoint_reference, xmlNodePtr metadata)
+{
+ xmlNodePtr node;
+
+ node = soap_addressing_get_metadata(endpoint_reference);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ node = xmlCopyNode(metadata, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(endpoint_reference, node);
+
+ return node;
+}
+
+xmlURI *soap_addressing_get_message_id(SoapEnv *envelope)
+{
+ xmlNodePtr id;
+
+ id = _soap_addressing_get_child_element(envelope->header, WSA_MESSAGE_ID);
+ if (id == NULL)
+ return NULL;
+
+ return _soap_addressing_extract_uri(id);
+}
+
+xmlNodePtr soap_addressing_set_message_id(SoapEnv *envelope, xmlURI *id)
+{
+ xmlNodePtr node;
+
+ node = _soap_addressing_get_child_element(envelope->header, WSA_MESSAGE_ID);
+ if (node == NULL)
+ node = _soap_addressing_add_node(envelope->header, WSA_MESSAGE_ID, NULL);
+
+ return _soap_addressing_set_content_uri(node, id);
+}
+
+xmlNodePtr soap_addressing_get_relates_to(SoapEnv *envelope)
+{
+ return _soap_addressing_get_child_element(envelope->header, WSA_RELATES_TO);
+}
+
+xmlNodePtr soap_addressing_add_relates_to(SoapEnv *envelope, xmlURI *id, xmlURI *type)
+{
+ xmlNodePtr node;
+
+ node = soap_addressing_get_relates_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ node = _soap_addressing_add_node(envelope->header, WSA_RELATES_TO, NULL);
+ _soap_addressing_set_content_uri(node, id);
+ _soap_addressing_set_property_uri(node, WSA_RELATIONSHIP_TYPE, type);
+
+ return node;
+}
+
+xmlNodePtr soap_addressing_get_reply_to(SoapEnv *envelope)
+{
+ return _soap_addressing_get_child_element(envelope->header, WSA_REPLY_TO);
+}
+
+xmlNodePtr soap_addressing_set_reply_to(SoapEnv *envelope, xmlNodePtr address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_reply_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_REPLY_TO, NULL);
+ node = xmlCopyNode(address, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(ret, node);
+
+ return ret;
+}
+
+xmlURI *soap_addressing_get_reply_to_address(SoapEnv *envelope)
+{
+ xmlNodePtr reply_to;
+
+ reply_to = soap_addressing_get_reply_to(envelope);
+ if (reply_to == NULL)
+ return NULL;
+
+ return soap_addressing_get_address(reply_to);
+}
+
+xmlNodePtr soap_addressing_set_reply_to_address(SoapEnv *envelope, xmlURI *address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_reply_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_REPLY_TO, NULL);
+ soap_addressing_set_address(ret, address);
+
+ return ret;
+}
+
+xmlNodePtr soap_addressing_get_from(SoapEnv *envelope)
+{
+ return _soap_addressing_get_child_element(envelope->header, WSA_FROM);
+}
+
+xmlNodePtr soap_addressing_set_from(SoapEnv *envelope, xmlNodePtr address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_from(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_FROM, NULL);
+ node = xmlCopyNode(address, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(ret, node);
+
+ return ret;
+}
+
+xmlURI *soap_addressing_get_from_address(SoapEnv *envelope)
+{
+ xmlNodePtr from;
+
+ from = soap_addressing_get_from(envelope);
+ if (from == NULL)
+ return NULL;
+
+ return soap_addressing_get_address(from);
+}
+
+xmlNodePtr soap_addressing_set_from_address(SoapEnv *envelope, xmlURI *address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_from(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_FROM, NULL);
+ soap_addressing_set_address(ret, address);
+
+ return ret;
+}
+
+xmlNodePtr soap_addressing_get_fault_to(SoapEnv *envelope)
+{
+ return _soap_addressing_get_child_element(envelope->header, WSA_FAULT_TO);
+}
+
+xmlNodePtr soap_addressing_set_fault_to(SoapEnv *envelope, xmlNodePtr address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_fault_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_FAULT_TO, NULL);
+ node = xmlCopyNode(address, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(ret, node);
+
+ return ret;
+}
+
+xmlURI *soap_addressing_get_fault_to_address(SoapEnv *envelope)
+{
+ xmlNodePtr fault_to;
+
+ fault_to = soap_addressing_get_fault_to(envelope);
+ if (fault_to == NULL)
+ return NULL;
+
+ return soap_addressing_get_address(fault_to);
+}
+
+xmlNodePtr soap_addressing_set_fault_to_address(SoapEnv *envelope, xmlURI *address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_fault_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_FAULT_TO, NULL);
+ soap_addressing_set_address(ret, address);
+
+ return ret;
+}
+
+xmlNodePtr soap_addressing_get_to(SoapEnv *envelope)
+{
+ return _soap_addressing_get_child_element(envelope->header, WSA_TO);
+}
+
+xmlNodePtr soap_addressing_set_to(SoapEnv *envelope, xmlNodePtr address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_TO, NULL);
+ node = xmlCopyNode(address, 1);
+ xmlUnlinkNode(node);
+ xmlAddChild(ret, node);
+
+ return ret;
+}
+
+xmlURI *soap_addressing_get_to_address(SoapEnv *envelope)
+{
+ xmlNodePtr to;
+
+ to = soap_addressing_get_to(envelope);
+ if (to == NULL)
+ return NULL;
+
+ return soap_addressing_get_address(to);
+}
+
+xmlNodePtr soap_addressing_set_to_address(SoapEnv *envelope, xmlURI *address)
+{
+ xmlNodePtr ret;
+ xmlNodePtr node;
+
+ node = soap_addressing_get_to(envelope);
+ if (node != NULL)
+ {
+ xmlUnlinkNode(node);
+ xmlFreeNode(node);
+ }
+
+ ret = _soap_addressing_add_node(envelope->header, WSA_TO, NULL);
+ soap_addressing_set_address(ret, address);
+
+ return ret;
+}
+
+xmlURI *soap_addressing_get_action(SoapEnv *envelope)
+{
+ xmlNodePtr action;
+
+ action = _soap_addressing_get_child_element(envelope->header, WSA_ACTION);
+ if (action == NULL)
+ return NULL;
+
+ return _soap_addressing_extract_uri(action);
+}
+
+xmlNodePtr soap_addressing_set_action(SoapEnv *envelope, xmlURI *action)
+{
+ xmlNodePtr node;
+
+ node = _soap_addressing_get_child_element(envelope->header, WSA_ACTION);
+ if (node == NULL)
+ node = _soap_addressing_add_node(envelope->header, WSA_ACTION, NULL);
+
+ return _soap_addressing_set_content_uri(node, action);
+}
diff --git a/libcsoap/soap-addressing.h b/libcsoap/soap-addressing.h
new file mode 100644
index 0000000..8ffbd41
--- /dev/null
+++ b/libcsoap/soap-addressing.h
@@ -0,0 +1,236 @@
+/******************************************************************
+ * $Id: soap-addressing.h,v 1.1 2006/11/21 08:34:34 m0gg Exp $
+ *
+ * CSOAP Project: A SOAP client/server library in C
+ * Copyright (C) 2006 Heiko Ronsdorf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Email: hero@persua.de
+ ******************************************************************/
+#ifndef __csoap_addressing_h
+#define __csoap_addressing_h
+
+/**
+ *
+ * WS-Addressing provides transport-neutral mechanisms to address Web services
+ * and messages. Specifically, this specification defines XML [XML 1.0, XML
+ * Namespaces] elements to identify Web service endpoints and to secure
+ * end-to-end endpoint identification in messages. This specification enables
+ * messaging systems to support message transmission through networks that
+ * include processing nodes such as endpoint managers, firewalls, and gateways
+ * in a transport-neutral manner.
+ *
+ * @author H. Ronsdorf
+ * @version $Revision: 1.1 $
+ * @see http://www.w3.org/TR/ws-addr-core/
+ *
+ */
+#define WSA_NAMESPACE "http://www.w3.org/2005/08/addressing"
+#define WSA_NAMESPACE_PREFIX "wsa"
+
+/**
+ *
+ * Some endpoints cannot be located with a meaningful IRI; this URI is used to
+ * allow such endpoints to send and receive messages. The precise meaning of
+ * this URI is defined by the binding of Addressing to a specific protocol
+ * and/or the context in which the EPR is used.
+ *
+ */
+#define WSA_ANONYMOUS WSA_NAMESPACE "/anonymous"
+
+/**
+ *
+ * Messages sent to EPRs whose [address] is this value MUST be discarded (i.e.
+ * not sent). This URI is typically used in EPRs that designate a reply or fault
+ * endpoint (see section 3.1 Abstract Property Definitions) to indicate that no
+ * reply or fault message should be sent.
+ *
+ */
+#define WSA_NONE WSA_NAMESPACE "/none"
+
+/**
+ *
+ * Indicates that this is a reply to the message identified by the [message id]
+ * IRI.
+ *
+ */
+#define WSA_REPLY WSA_NAMESPACE "/reply"
+
+/**
+ *
+ * The wsa:EndpointReferenceType type is used wherever a Web service endpoint is
+ * referenced.
+ *
+ */
+#define WSA_ENDPOINT_REFERENCE_TYPE "EndpointReferenceType"
+
+/**
+ *
+ * This represents some element of type wsa:EndpointReferenceType. Any element
+ * of type wsa:EndpointReferenceType may be used. There is an extensibility
+ * mechanism to allow additional elements to be specified.
+ *
+ */
+#define WSA_ENDPOINT_REFERENCE "EndpointReference"
+
+/**
+ *
+ * This OPTIONAL element contains the elements that convey the [reference
+ * properties] of the reference. Each child element of ReferenceProperties
+ * represents an individual [reference property].
+ *
+ */
+#define WSA_REFERENCE_PROPERTIES "ReferenceProperties"
+
+/**
+ *
+ * This OPTIONAL element may contain elements from any namespace. Such elements
+ * form the metadata that is relevant to the interaction with the endpoint.
+ *
+ */
+#define WSA_METADATA "Metadata"
+
+/**
+ *
+ * This OPTIONAL element (of type xs:anyURI) conveys the [message id] property.
+ * This element MUST be present if wsa:ReplyTo or wsa:FaultTo is present.
+ *
+ */
+#define WSA_MESSAGE_ID "MessageID"
+
+/**
+ *
+ * This OPTIONAL (repeating) element information item contributes one abstract
+ * [relationship] property value, in the form of a (URI, QName) pair. The
+ * [children] property of this element (which is of type xs:anyURI) conveys the
+ * [message id] of the related message. This element MUST be present if the
+ * message is a reply.
+ *
+ */
+#define WSA_RELATES_TO "RelatesTo"
+
+/**
+ *
+ * This OPTIONAL attribute of <wsa:RelatesTo> (of type xs:QName) conveys the
+ * relationship type as a QName. When absent, the implied value of this attribute
+ * is wsa:Reply.
+ *
+ */
+#define WSA_RELATIONSHIP_TYPE "RelationshipType"
+
+
+/**
+ *
+ * This OPTIONAL element (of type wsa:EndpointReferenceType) provides the value
+ * for the [reply endpoint] property. This element MUST be present if a reply is
+ * expected. If this element is present, wsa:MessageID MUST be present.
+ *
+ */
+#define WSA_REPLY_TO "ReplyTo"
+
+/**
+ *
+ * This OPTIONAL element (of type wsa:EndpointReferenceType) provides the value
+ * for the [source endpoint] property.
+ *
+ */
+#define WSA_FROM "From"
+
+/**
+ *
+ * This OPTIONAL element (of type wsa:EndpointReferenceType) provides the value
+ * for the [fault endpoint] property. If this element is present, wsa:MessageID
+ * MUST be present.
+ *
+ */
+#define WSA_FAULT_TO "FaultTo"
+
+/**
+ *
+ * This REQUIRED element (of type xs:anyURI) provides the value for the
+ * [destination] property.
+ *
+ */
+#define WSA_TO "To"
+
+/**
+ *
+ * This REQUIRED element of type xs:anyURI conveys the [action] property. The
+ * [children] of this element convey the value of this property.
+ *
+ */
+#define WSA_ACTION "Action"
+
+/**
+ *
+ * An address URI that identifies the endpoint. This may be a network address or
+ * a logical address.
+ *
+ */
+#define WSA_ADDRESS "Address"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+xmlURI *soap_addressing_get_address(xmlNodePtr endpoint_reference);
+xmlNodePtr soap_addressing_set_address(xmlNodePtr endpoint_reference, xmlURI *address);
+
+xmlNodePtr soap_addressing_get_reference_properties(xmlNodePtr endpoint_reference);
+xmlNodePtr soap_addressing_set_reference_properties(xmlNodePtr endpoint_reference, xmlNodePtr property);
+
+xmlNodePtr soap_addressing_get_metadata(xmlNodePtr endpoint_reference);
+xmlNodePtr soap_addressing_set_metadata(xmlNodePtr endpoint_reference, xmlNodePtr parameter);
+
+xmlURI *soap_addressing_get_message_id(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_message_id(SoapEnv *envelope, xmlURI *id);
+
+xmlNodePtr soap_addressing_get_relates_to(SoapEnv *envelope);
+xmlNodePtr soap_addressing_add_relates_to(SoapEnv *envelope, xmlURI *id, xmlURI *type);
+
+xmlNodePtr soap_addressing_get_reply_to(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_reply_to(SoapEnv *envelope, xmlNodePtr address);
+
+xmlURI *soap_addressing_get_reply_to_address(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_reply_to_address(SoapEnv *envelope, xmlURI *address);
+
+xmlNodePtr soap_addressing_get_from(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_from(SoapEnv *envelope, xmlNodePtr address);
+
+xmlURI *soap_addressing_get_from_address(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_from_address(SoapEnv *envelope, xmlURI *address);
+
+xmlNodePtr soap_addressing_get_fault_to(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_fault_to(SoapEnv *envelope, xmlNodePtr address);
+
+xmlURI *soap_addressing_get_fault_to_address(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_fault_to_address(SoapEnv *envelope, xmlURI *address);
+
+xmlNodePtr soap_addressing_get_to(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_to(SoapEnv *envelope, xmlNodePtr address);
+
+xmlURI *soap_addressing_get_to_address(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_to_address(SoapEnv *envelope, xmlURI *address);
+
+xmlURI *soap_addressing_get_action(SoapEnv *envelope);
+xmlNodePtr soap_addressing_set_action(SoapEnv *envelope, xmlURI *action);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libcsoap/soap-env.c b/libcsoap/soap-env.c
index abff67e..dc64d98 100644
--- a/libcsoap/soap-env.c
+++ b/libcsoap/soap-env.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-env.c,v 1.21 2006/11/19 09:40:14 m0gg Exp $
+* $Id: soap-env.c,v 1.22 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -59,6 +59,7 @@
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-socket.h>
+#include <nanohttp/nanohttp-stream.h>
#include <nanohttp/nanohttp-logging.h>
#include "soap-xml.h"
diff --git a/libcsoap/soap-env.h b/libcsoap/soap-env.h
index 5440e78..53d8ce5 100644
--- a/libcsoap/soap-env.h
+++ b/libcsoap/soap-env.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-env.h,v 1.14 2006/03/06 13:37:38 m0gg Exp $
+ * $Id: soap-env.h,v 1.15 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -24,8 +24,6 @@
#ifndef cSOAP_ENV_H
#define cSOAP_ENV_H
-#include <nanohttp/nanohttp-stream.h>
-
#include <libcsoap/soap-xml.h>
#include <libcsoap/soap-fault.h>
diff --git a/libcsoap/soap-server.c b/libcsoap/soap-server.c
index e0297b3..638105f 100644
--- a/libcsoap/soap-server.c
+++ b/libcsoap/soap-server.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-server.c,v 1.27 2006/11/19 09:40:14 m0gg Exp $
+* $Id: soap-server.c,v 1.28 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -109,10 +109,13 @@ _soap_server_send_fault(httpd_conn_t * conn, const char *errmsg)
if (err != H_OK)
{
log_error1(herror_message(err));
- http_output_stream_write_string(conn->out, "<html><head></head><body>");
- http_output_stream_write_string(conn->out, "<h1>Error</h1><hr/>");
http_output_stream_write_string(conn->out,
- "Error while sending fault object:<br>Message: ");
+ "<html>"
+ "<head></head>"
+ "<body>"
+ "<h1>Error</h1><hr/>"
+ "Error while sending fault object:"
+ "<br />Message: ");
http_output_stream_write_string(conn->out, herror_message(err));
http_output_stream_write_string(conn->out, "<br />Function: ");
http_output_stream_write_string(conn->out, herror_func(err));
@@ -226,8 +229,8 @@ router_node_new(SoapRouter * router, const char *context, SoapRouterNode * next)
const char *noname = "/lost_found";
SoapRouterNode *node;
- if (!(node = (SoapRouterNode *) malloc(sizeof(SoapRouterNode)))) {
-
+ if (!(node = (SoapRouterNode *) malloc(sizeof(SoapRouterNode))))
+ {
log_error2("malloc failed (%s)", strerror(errno));
return NULL;
}
@@ -274,7 +277,6 @@ soap_server_entry(httpd_conn_t * conn, hrequest_t * req)
SoapEnv *env;
herror_t err;
-
if (!(router = soap_server_find_router(req->path)))
{
_soap_server_send_fault(conn, "Cannot find router");
@@ -296,7 +298,7 @@ soap_server_entry(httpd_conn_t * conn, hrequest_t * req)
"<body>"
"<h1>Sorry!</h1>"
"<hr />"
- "<div>I only speak with 'POST' method </div>"
+ "<div>I only speak with 'POST' method.</div>"
"</body>"
"</html>");
return;
diff --git a/libcsoap/soap-xml.h b/libcsoap/soap-xml.h
index ad578b1..801091d 100644
--- a/libcsoap/soap-xml.h
+++ b/libcsoap/soap-xml.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-xml.h,v 1.8 2006/03/06 13:37:38 m0gg Exp $
+ * $Id: soap-xml.h,v 1.9 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -34,6 +34,7 @@ static const char * const soap_env_enc = "http://schemas.xmlsoap.org/soap/encodi
static const char * const soap_xsi_ns = "http://www.w3.org/1999/XMLSchema-instance";
static const char * const soap_xsd_ns = "http://www.w3.org/1999/XMLSchema";
+
typedef int (*soap_xmlnode_callback) (xmlNodePtr, void *);
#ifdef __cplusplus
diff --git a/nanohttp/nanohttp-admin.c b/nanohttp/nanohttp-admin.c
index 33f9bc0..6ca9255 100644
--- a/nanohttp/nanohttp-admin.c
+++ b/nanohttp/nanohttp-admin.c
@@ -1,5 +1,5 @@
- /******************************************************************
-* $Id: nanohttp-admin.c,v 1.1 2006/11/19 09:40:14 m0gg Exp $
+/******************************************************************
+* $Id: nanohttp-admin.c,v 1.2 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -33,6 +33,14 @@
#include <stdio.h>
#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#endif
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -44,6 +52,7 @@
#include "nanohttp-server.h"
#include "nanohttp-admin.h"
+
static void
_httpd_admin_send_title(httpd_conn_t *conn, const char *title)
{
@@ -66,6 +75,7 @@ _httpd_admin_send_title(httpd_conn_t *conn, const char *title)
}
+static void
_httpd_admin_list_services(httpd_conn_t *conn)
{
char buffer[1024];
diff --git a/nanohttp/nanohttp-client.c b/nanohttp/nanohttp-client.c
index 10b16c2..a105b82 100644
--- a/nanohttp/nanohttp-client.c
+++ b/nanohttp/nanohttp-client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-client.c,v 1.42 2006/11/19 09:40:14 m0gg Exp $
+* $Id: nanohttp-client.c,v 1.43 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -49,6 +49,10 @@
#include <string.h>
#endif
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -128,7 +132,6 @@ httpc_free(httpc_conn_t * conn)
if (conn == NULL)
return;
-
while (conn->header != NULL)
{
tmp = conn->header;
diff --git a/nanohttp/nanohttp-mime.c b/nanohttp/nanohttp-mime.c
index cbea458..a853486 100755
--- a/nanohttp/nanohttp-mime.c
+++ b/nanohttp/nanohttp-mime.c
@@ -3,7 +3,7 @@
* | \/ | | | | \/ | | _/
* |_''_| |_| |_''_| |_'/ PARSER
*
-* $Id: nanohttp-mime.c,v 1.14 2006/11/19 09:40:14 m0gg Exp $
+* $Id: nanohttp-mime.c,v 1.15 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -33,6 +33,10 @@
#include <stdio.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#ifdef HAVE_STRING_H
#include <string.h>
#endif
diff --git a/nanohttp/nanohttp-request.c b/nanohttp/nanohttp-request.c
index c7d159b..449bb7a 100755
--- a/nanohttp/nanohttp-request.c
+++ b/nanohttp/nanohttp-request.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-request.c,v 1.15 2006/11/19 09:40:14 m0gg Exp $
+* $Id: nanohttp-request.c,v 1.16 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -49,8 +49,10 @@
#include "nanohttp-common.h"
#include "nanohttp-socket.h"
#include "nanohttp-stream.h"
+#include "nanohttp-mime.h"
#include "nanohttp-request.h"
+
static hrequest_t *
hrequest_new(void)
{
diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c
index d38056d..db2f897 100755
--- a/nanohttp/nanohttp-response.c
+++ b/nanohttp/nanohttp-response.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: nanohttp-response.c,v 1.12 2006/11/19 09:40:14 m0gg Exp $
+* $Id: nanohttp-response.c,v 1.13 2006/11/21 08:34:34 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -29,6 +29,10 @@
#include <stdio.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -45,6 +49,7 @@
#include "nanohttp-common.h"
#include "nanohttp-socket.h"
#include "nanohttp-stream.h"
+#include "nanohttp-mime.h"
#include "nanohttp-response.h"
static hresponse_t *