summaryrefslogtreecommitdiffstats
path: root/libcsoap
diff options
context:
space:
mode:
authorGravatar m0gg2007-11-03 22:40:09 +0000
committerGravatar m0gg2007-11-03 22:40:09 +0000
commit8a6946b18003fae6400a137389f0cb13d0ac4bd6 (patch)
tree1fb0e6f58de5596f8dae00998da18472fb4952a1 /libcsoap
parentc1a7b2dabdc691139b744f0d4750f3b797b69073 (diff)
downloadcsoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.gz
csoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.bz2
Split nanoHTTP and cSOAP logging
Diffstat (limited to 'libcsoap')
-rw-r--r--libcsoap/Makefile.am40
-rw-r--r--libcsoap/Makefile.in171
-rw-r--r--libcsoap/soap-addressing.c20
-rw-r--r--libcsoap/soap-admin.c74
-rw-r--r--libcsoap/soap-admin.h24
-rw-r--r--libcsoap/soap-client.c34
-rwxr-xr-xlibcsoap/soap-ctx.c6
-rw-r--r--libcsoap/soap-env.c120
-rw-r--r--libcsoap/soap-fault.c18
-rw-r--r--libcsoap/soap-logging.c150
-rw-r--r--libcsoap/soap-logging.h150
-rw-r--r--libcsoap/soap-nhttp.c33
-rw-r--r--libcsoap/soap-nudp.c34
-rw-r--r--libcsoap/soap-router.c26
-rw-r--r--libcsoap/soap-server.c36
-rw-r--r--libcsoap/soap-server.h83
-rw-r--r--libcsoap/soap-service.c12
-rw-r--r--libcsoap/soap-transport.c42
-rw-r--r--libcsoap/soap-transport.h6
-rw-r--r--libcsoap/soap-xml.c33
-rw-r--r--libcsoap/soap-xml.h20
-rw-r--r--libcsoap/soap-xmlsec.c116
-rw-r--r--libcsoap/soap-xmlsec.h170
23 files changed, 839 insertions, 579 deletions
diff --git a/libcsoap/Makefile.am b/libcsoap/Makefile.am
index abcde74..a19775f 100644
--- a/libcsoap/Makefile.am
+++ b/libcsoap/Makefile.am
@@ -1,19 +1,41 @@
#
-# $Revision: 1.15 $
+# $Revision: 1.16 $
#
lib_LTLIBRARIES=libcsoap.la
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-addressing.c soap-transport.c \
- soap-nudp.c soap-nhttp.c soap-wsil.c
+libcsoap_la_SOURCES=soap-addressing.c \
+ soap-admin.c \
+ soap-client.c \
+ soap-ctx.c \
+ soap-env.c \
+ soap-fault.c \
+ soap-logging.c \
+ soap-nhttp.c \
+ soap-nudp.c \
+ soap-router.c \
+ soap-service.c \
+ soap-server.c \
+ soap-transport.c \
+ soap-wsil.c \
+ soap-xml.c
-libcsoap_la_HEADERS=soap-fault.h soap-env.h soap-service.h soap-router.h \
- soap-client.h soap-server.h soap-ctx.h soap-addressing.h \
- soap-transport.h soap-admin.h soap-wsil.h soap-nudp.h \
- soap-nhttp.h soap-xml.h
+libcsoap_la_HEADERS=soap-addressing.h \
+ soap-admin.h \
+ soap-client.h \
+ soap-ctx.h \
+ soap-env.h \
+ soap-fault.h \
+ soap-logging.h \
+ soap-nhttp.h \
+ soap-nudp.h \
+ soap-router.h \
+ soap-service.h \
+ soap-server.h \
+ soap-transport.h \
+ soap-wsil.h \
+ soap-xml.h
if BUILD_WITH_XMLSEC1
libcsoap_la_SOURCES+=soap-xmlsec.c
diff --git a/libcsoap/Makefile.in b/libcsoap/Makefile.in
index 093f5f6..1408cbb 100644
--- a/libcsoap/Makefile.in
+++ b/libcsoap/Makefile.in
@@ -59,19 +59,21 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libcsoap_ladir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libcsoap_la_LIBADD =
-am__libcsoap_la_SOURCES_DIST = 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-addressing.c soap-transport.c \
- soap-nudp.c soap-nhttp.c soap-wsil.c soap-xmlsec.c
+am__libcsoap_la_SOURCES_DIST = soap-addressing.c soap-admin.c \
+ soap-client.c soap-ctx.c soap-env.c soap-fault.c \
+ soap-logging.c soap-nhttp.c soap-nudp.c soap-router.c \
+ soap-service.c soap-server.c soap-transport.c soap-wsil.c \
+ soap-xml.c soap-xmlsec.c
@BUILD_WITH_XMLSEC1_TRUE@am__objects_1 = libcsoap_la-soap-xmlsec.lo
-am_libcsoap_la_OBJECTS = libcsoap_la-soap-xml.lo \
- libcsoap_la-soap-fault.lo libcsoap_la-soap-env.lo \
- libcsoap_la-soap-service.lo libcsoap_la-soap-router.lo \
- libcsoap_la-soap-client.lo libcsoap_la-soap-server.lo \
- libcsoap_la-soap-ctx.lo libcsoap_la-soap-admin.lo \
- libcsoap_la-soap-addressing.lo libcsoap_la-soap-transport.lo \
- libcsoap_la-soap-nudp.lo libcsoap_la-soap-nhttp.lo \
- libcsoap_la-soap-wsil.lo $(am__objects_1)
+am_libcsoap_la_OBJECTS = libcsoap_la-soap-addressing.lo \
+ libcsoap_la-soap-admin.lo libcsoap_la-soap-client.lo \
+ libcsoap_la-soap-ctx.lo libcsoap_la-soap-env.lo \
+ libcsoap_la-soap-fault.lo libcsoap_la-soap-logging.lo \
+ libcsoap_la-soap-nhttp.lo libcsoap_la-soap-nudp.lo \
+ libcsoap_la-soap-router.lo libcsoap_la-soap-service.lo \
+ libcsoap_la-soap-server.lo libcsoap_la-soap-transport.lo \
+ libcsoap_la-soap-wsil.lo libcsoap_la-soap-xml.lo \
+ $(am__objects_1)
libcsoap_la_OBJECTS = $(am_libcsoap_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -86,10 +88,11 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libcsoap_la_SOURCES)
DIST_SOURCES = $(am__libcsoap_la_SOURCES_DIST)
-am__libcsoap_la_HEADERS_DIST = soap-fault.h soap-env.h soap-service.h \
- soap-router.h soap-client.h soap-server.h soap-ctx.h \
- soap-addressing.h soap-transport.h soap-admin.h soap-wsil.h \
- soap-nudp.h soap-nhttp.h soap-xml.h soap-xmlsec.h
+am__libcsoap_la_HEADERS_DIST = soap-addressing.h soap-admin.h \
+ soap-client.h soap-ctx.h soap-env.h soap-fault.h \
+ soap-logging.h soap-nhttp.h soap-nudp.h soap-router.h \
+ soap-service.h soap-server.h soap-transport.h soap-wsil.h \
+ soap-xml.h soap-xmlsec.h
libcsoap_laHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(libcsoap_la_HEADERS)
ETAGS = etags
@@ -217,18 +220,18 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
#
-# $Revision: 1.1 $
+# $Revision: 1.2 $
#
lib_LTLIBRARIES = libcsoap.la
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-addressing.c soap-transport.c \
- soap-nudp.c soap-nhttp.c soap-wsil.c $(am__append_1)
-libcsoap_la_HEADERS = soap-fault.h soap-env.h soap-service.h \
- soap-router.h soap-client.h soap-server.h soap-ctx.h \
- soap-addressing.h soap-transport.h soap-admin.h soap-wsil.h \
- soap-nudp.h soap-nhttp.h soap-xml.h $(am__append_2)
+libcsoap_la_SOURCES = soap-addressing.c soap-admin.c soap-client.c \
+ soap-ctx.c soap-env.c soap-fault.c soap-logging.c soap-nhttp.c \
+ soap-nudp.c soap-router.c soap-service.c soap-server.c \
+ soap-transport.c soap-wsil.c soap-xml.c $(am__append_1)
+libcsoap_la_HEADERS = soap-addressing.h soap-admin.h soap-client.h \
+ soap-ctx.h soap-env.h soap-fault.h soap-logging.h soap-nhttp.h \
+ soap-nudp.h soap-router.h soap-service.h soap-server.h \
+ soap-transport.h soap-wsil.h soap-xml.h $(am__append_2)
libcsoap_la_LDFLAGS = -version-info @csoap_version@ -release @csoap_release@
libcsoap_la_CFLAGS = -I${top_srcdir} -D__CSOAP_INTERNAL=1
all: all-am
@@ -306,6 +309,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-ctx.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-env.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-fault.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-logging.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-nhttp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-nudp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsoap_la-soap-router.Plo@am__quote@
@@ -337,19 +341,33 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libcsoap_la-soap-xml.lo: soap-xml.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-xml.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-xml.Tpo" -c -o libcsoap_la-soap-xml.lo `test -f 'soap-xml.c' || echo '$(srcdir)/'`soap-xml.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-xml.Tpo" "$(DEPDIR)/libcsoap_la-soap-xml.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-xml.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-xml.c' object='libcsoap_la-soap-xml.lo' libtool=yes @AMDEPBACKSLASH@
+libcsoap_la-soap-addressing.lo: soap-addressing.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-addressing.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo" -c -o libcsoap_la-soap-addressing.lo `test -f 'soap-addressing.c' || echo '$(srcdir)/'`soap-addressing.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo" "$(DEPDIR)/libcsoap_la-soap-addressing.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-addressing.c' object='libcsoap_la-soap-addressing.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-xml.lo `test -f 'soap-xml.c' || echo '$(srcdir)/'`soap-xml.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-addressing.lo `test -f 'soap-addressing.c' || echo '$(srcdir)/'`soap-addressing.c
-libcsoap_la-soap-fault.lo: soap-fault.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-fault.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-fault.Tpo" -c -o libcsoap_la-soap-fault.lo `test -f 'soap-fault.c' || echo '$(srcdir)/'`soap-fault.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-fault.Tpo" "$(DEPDIR)/libcsoap_la-soap-fault.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-fault.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-fault.c' object='libcsoap_la-soap-fault.lo' libtool=yes @AMDEPBACKSLASH@
+libcsoap_la-soap-admin.lo: soap-admin.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-admin.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-admin.Tpo" -c -o libcsoap_la-soap-admin.lo `test -f 'soap-admin.c' || echo '$(srcdir)/'`soap-admin.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-admin.Tpo" "$(DEPDIR)/libcsoap_la-soap-admin.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-admin.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-admin.c' object='libcsoap_la-soap-admin.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-fault.lo `test -f 'soap-fault.c' || echo '$(srcdir)/'`soap-fault.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-admin.lo `test -f 'soap-admin.c' || echo '$(srcdir)/'`soap-admin.c
+
+libcsoap_la-soap-client.lo: soap-client.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-client.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-client.Tpo" -c -o libcsoap_la-soap-client.lo `test -f 'soap-client.c' || echo '$(srcdir)/'`soap-client.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-client.Tpo" "$(DEPDIR)/libcsoap_la-soap-client.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-client.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-client.c' object='libcsoap_la-soap-client.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-client.lo `test -f 'soap-client.c' || echo '$(srcdir)/'`soap-client.c
+
+libcsoap_la-soap-ctx.lo: soap-ctx.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-ctx.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo" -c -o libcsoap_la-soap-ctx.lo `test -f 'soap-ctx.c' || echo '$(srcdir)/'`soap-ctx.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo" "$(DEPDIR)/libcsoap_la-soap-ctx.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-ctx.c' object='libcsoap_la-soap-ctx.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-ctx.lo `test -f 'soap-ctx.c' || echo '$(srcdir)/'`soap-ctx.c
libcsoap_la-soap-env.lo: soap-env.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-env.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-env.Tpo" -c -o libcsoap_la-soap-env.lo `test -f 'soap-env.c' || echo '$(srcdir)/'`soap-env.c; \
@@ -358,12 +376,33 @@ libcsoap_la-soap-env.lo: soap-env.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-env.lo `test -f 'soap-env.c' || echo '$(srcdir)/'`soap-env.c
-libcsoap_la-soap-service.lo: soap-service.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-service.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-service.Tpo" -c -o libcsoap_la-soap-service.lo `test -f 'soap-service.c' || echo '$(srcdir)/'`soap-service.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-service.Tpo" "$(DEPDIR)/libcsoap_la-soap-service.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-service.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-service.c' object='libcsoap_la-soap-service.lo' libtool=yes @AMDEPBACKSLASH@
+libcsoap_la-soap-fault.lo: soap-fault.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-fault.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-fault.Tpo" -c -o libcsoap_la-soap-fault.lo `test -f 'soap-fault.c' || echo '$(srcdir)/'`soap-fault.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-fault.Tpo" "$(DEPDIR)/libcsoap_la-soap-fault.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-fault.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-fault.c' object='libcsoap_la-soap-fault.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-service.lo `test -f 'soap-service.c' || echo '$(srcdir)/'`soap-service.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-fault.lo `test -f 'soap-fault.c' || echo '$(srcdir)/'`soap-fault.c
+
+libcsoap_la-soap-logging.lo: soap-logging.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-logging.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-logging.Tpo" -c -o libcsoap_la-soap-logging.lo `test -f 'soap-logging.c' || echo '$(srcdir)/'`soap-logging.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-logging.Tpo" "$(DEPDIR)/libcsoap_la-soap-logging.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-logging.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-logging.c' object='libcsoap_la-soap-logging.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-logging.lo `test -f 'soap-logging.c' || echo '$(srcdir)/'`soap-logging.c
+
+libcsoap_la-soap-nhttp.lo: soap-nhttp.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-nhttp.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo" -c -o libcsoap_la-soap-nhttp.lo `test -f 'soap-nhttp.c' || echo '$(srcdir)/'`soap-nhttp.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo" "$(DEPDIR)/libcsoap_la-soap-nhttp.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-nhttp.c' object='libcsoap_la-soap-nhttp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-nhttp.lo `test -f 'soap-nhttp.c' || echo '$(srcdir)/'`soap-nhttp.c
+
+libcsoap_la-soap-nudp.lo: soap-nudp.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-nudp.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo" -c -o libcsoap_la-soap-nudp.lo `test -f 'soap-nudp.c' || echo '$(srcdir)/'`soap-nudp.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo" "$(DEPDIR)/libcsoap_la-soap-nudp.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-nudp.c' object='libcsoap_la-soap-nudp.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-nudp.lo `test -f 'soap-nudp.c' || echo '$(srcdir)/'`soap-nudp.c
libcsoap_la-soap-router.lo: soap-router.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-router.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-router.Tpo" -c -o libcsoap_la-soap-router.lo `test -f 'soap-router.c' || echo '$(srcdir)/'`soap-router.c; \
@@ -372,12 +411,12 @@ libcsoap_la-soap-router.lo: soap-router.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-router.lo `test -f 'soap-router.c' || echo '$(srcdir)/'`soap-router.c
-libcsoap_la-soap-client.lo: soap-client.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-client.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-client.Tpo" -c -o libcsoap_la-soap-client.lo `test -f 'soap-client.c' || echo '$(srcdir)/'`soap-client.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-client.Tpo" "$(DEPDIR)/libcsoap_la-soap-client.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-client.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-client.c' object='libcsoap_la-soap-client.lo' libtool=yes @AMDEPBACKSLASH@
+libcsoap_la-soap-service.lo: soap-service.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-service.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-service.Tpo" -c -o libcsoap_la-soap-service.lo `test -f 'soap-service.c' || echo '$(srcdir)/'`soap-service.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-service.Tpo" "$(DEPDIR)/libcsoap_la-soap-service.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-service.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-service.c' object='libcsoap_la-soap-service.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-client.lo `test -f 'soap-client.c' || echo '$(srcdir)/'`soap-client.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-service.lo `test -f 'soap-service.c' || echo '$(srcdir)/'`soap-service.c
libcsoap_la-soap-server.lo: soap-server.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-server.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-server.Tpo" -c -o libcsoap_la-soap-server.lo `test -f 'soap-server.c' || echo '$(srcdir)/'`soap-server.c; \
@@ -386,27 +425,6 @@ libcsoap_la-soap-server.lo: soap-server.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-server.lo `test -f 'soap-server.c' || echo '$(srcdir)/'`soap-server.c
-libcsoap_la-soap-ctx.lo: soap-ctx.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-ctx.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo" -c -o libcsoap_la-soap-ctx.lo `test -f 'soap-ctx.c' || echo '$(srcdir)/'`soap-ctx.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo" "$(DEPDIR)/libcsoap_la-soap-ctx.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-ctx.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-ctx.c' object='libcsoap_la-soap-ctx.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-ctx.lo `test -f 'soap-ctx.c' || echo '$(srcdir)/'`soap-ctx.c
-
-libcsoap_la-soap-admin.lo: soap-admin.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-admin.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-admin.Tpo" -c -o libcsoap_la-soap-admin.lo `test -f 'soap-admin.c' || echo '$(srcdir)/'`soap-admin.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-admin.Tpo" "$(DEPDIR)/libcsoap_la-soap-admin.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-admin.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-admin.c' object='libcsoap_la-soap-admin.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-admin.lo `test -f 'soap-admin.c' || echo '$(srcdir)/'`soap-admin.c
-
-libcsoap_la-soap-addressing.lo: soap-addressing.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-addressing.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo" -c -o libcsoap_la-soap-addressing.lo `test -f 'soap-addressing.c' || echo '$(srcdir)/'`soap-addressing.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo" "$(DEPDIR)/libcsoap_la-soap-addressing.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-addressing.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-addressing.c' object='libcsoap_la-soap-addressing.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-addressing.lo `test -f 'soap-addressing.c' || echo '$(srcdir)/'`soap-addressing.c
-
libcsoap_la-soap-transport.lo: soap-transport.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-transport.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-transport.Tpo" -c -o libcsoap_la-soap-transport.lo `test -f 'soap-transport.c' || echo '$(srcdir)/'`soap-transport.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-transport.Tpo" "$(DEPDIR)/libcsoap_la-soap-transport.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-transport.Tpo"; exit 1; fi
@@ -414,20 +432,6 @@ libcsoap_la-soap-transport.lo: soap-transport.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-transport.lo `test -f 'soap-transport.c' || echo '$(srcdir)/'`soap-transport.c
-libcsoap_la-soap-nudp.lo: soap-nudp.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-nudp.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo" -c -o libcsoap_la-soap-nudp.lo `test -f 'soap-nudp.c' || echo '$(srcdir)/'`soap-nudp.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo" "$(DEPDIR)/libcsoap_la-soap-nudp.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-nudp.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-nudp.c' object='libcsoap_la-soap-nudp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-nudp.lo `test -f 'soap-nudp.c' || echo '$(srcdir)/'`soap-nudp.c
-
-libcsoap_la-soap-nhttp.lo: soap-nhttp.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-nhttp.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo" -c -o libcsoap_la-soap-nhttp.lo `test -f 'soap-nhttp.c' || echo '$(srcdir)/'`soap-nhttp.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo" "$(DEPDIR)/libcsoap_la-soap-nhttp.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-nhttp.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-nhttp.c' object='libcsoap_la-soap-nhttp.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-nhttp.lo `test -f 'soap-nhttp.c' || echo '$(srcdir)/'`soap-nhttp.c
-
libcsoap_la-soap-wsil.lo: soap-wsil.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-wsil.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-wsil.Tpo" -c -o libcsoap_la-soap-wsil.lo `test -f 'soap-wsil.c' || echo '$(srcdir)/'`soap-wsil.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-wsil.Tpo" "$(DEPDIR)/libcsoap_la-soap-wsil.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-wsil.Tpo"; exit 1; fi
@@ -435,6 +439,13 @@ libcsoap_la-soap-wsil.lo: soap-wsil.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-wsil.lo `test -f 'soap-wsil.c' || echo '$(srcdir)/'`soap-wsil.c
+libcsoap_la-soap-xml.lo: soap-xml.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-xml.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-xml.Tpo" -c -o libcsoap_la-soap-xml.lo `test -f 'soap-xml.c' || echo '$(srcdir)/'`soap-xml.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-xml.Tpo" "$(DEPDIR)/libcsoap_la-soap-xml.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-xml.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='soap-xml.c' object='libcsoap_la-soap-xml.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -c -o libcsoap_la-soap-xml.lo `test -f 'soap-xml.c' || echo '$(srcdir)/'`soap-xml.c
+
libcsoap_la-soap-xmlsec.lo: soap-xmlsec.c
@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcsoap_la_CFLAGS) $(CFLAGS) -MT libcsoap_la-soap-xmlsec.lo -MD -MP -MF "$(DEPDIR)/libcsoap_la-soap-xmlsec.Tpo" -c -o libcsoap_la-soap-xmlsec.lo `test -f 'soap-xmlsec.c' || echo '$(srcdir)/'`soap-xmlsec.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcsoap_la-soap-xmlsec.Tpo" "$(DEPDIR)/libcsoap_la-soap-xmlsec.Plo"; else rm -f "$(DEPDIR)/libcsoap_la-soap-xmlsec.Tpo"; exit 1; fi
diff --git a/libcsoap/soap-addressing.c b/libcsoap/soap-addressing.c
index 6e894f1..53ec0b4 100644
--- a/libcsoap/soap-addressing.c
+++ b/libcsoap/soap-addressing.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-addressing.c,v 1.11 2006/12/14 19:39:05 m0gg Exp $
+* $Id: soap-addressing.c,v 1.12 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2006 Heiko Ronsdorf
@@ -58,15 +58,15 @@
#endif
#include <libxml/tree.h>
-#include <libxml/xpath.h>
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-xml.h"
#include "soap-fault.h"
#include "soap-env.h"
+#include "soap-ctx.h"
#include "soap-server.h"
#include "soap-addressing.h"
@@ -81,7 +81,7 @@ _soap_addressing_uuid_error(uint32_t status)
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) ??? */
+ /** @todo: From FreeBSD 6.2 UUID(3), replace with app. msg! */
return "The meaning of the code escaped the writers mind";
default:
return "Unkown error during UUID creation";
@@ -98,20 +98,20 @@ _soap_addressing_generate_id(void)
uuid_create(&uuid, &status);
if (status != uuid_s_ok)
{
- log_error2("uuidcreate failed (%s)", _soap_addressing_uuid_error(status));
+ log_error("uuidcreate failed (%s)", _soap_addressing_uuid_error(status));
return NULL;
}
uuid_to_string(&uuid, &buf, &status);
if (status != uuid_s_ok)
{
- log_error2("uuid_to_string failed (%s)", _soap_addressing_uuid_error(status));
+ log_error("uuid_to_string failed (%s)", _soap_addressing_uuid_error(status));
return NULL;
}
if (!(ret = (char *)malloc(128)))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
free(buf);
return NULL;
}
@@ -132,7 +132,7 @@ _soap_addressing_generate_id(void)
if (!(ret = (char *)malloc(128)))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
@@ -192,7 +192,7 @@ _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))
+ for (walker = soap_xml_get_children(parent); walker; walker = soap_xml_get_next_element(walker))
{
if (!xmlStrcmp(walker->name, name) && !xmlStrcmp(walker->ns->href, WSA_NAMESPACE))
return walker;
@@ -338,7 +338,7 @@ soap_addressing_set_message_id_string(struct SoapEnv *envelope, xmlChar *id)
else
tmp = id;
- log_verbose2("setting message id = \"%s\"", tmp);
+ log_verbose("setting message id = \"%s\"", tmp);
node = _soap_addressing_get_child_element(envelope->header, WSA_MESSAGE_ID);
if (node == NULL)
diff --git a/libcsoap/soap-admin.c b/libcsoap/soap-admin.c
index efc9651..2e6853d 100644
--- a/libcsoap/soap-admin.c
+++ b/libcsoap/soap-admin.c
@@ -1,5 +1,6 @@
+/** @file soap-admin.c SOAP administrator application */
/******************************************************************
-* $Id: soap-admin.c,v 1.11 2006/12/31 17:24:22 m0gg Exp $
+* $Id: soap-admin.c,v 1.12 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -44,8 +45,8 @@
#include <libxml/tree.h>
#include <libxml/uri.h>
-#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-common.h>
+#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-stream.h>
#include <nanohttp/nanohttp-request.h>
#include <nanohttp/nanohttp-server.h>
@@ -68,31 +69,31 @@ _soap_admin_send_title(httpd_conn_t *conn, const char *title)
"<head>");
http_output_stream_write_string(conn->out,
- "<style>"
- ".logo {"
- " color: #005177;"
- " background-color: transparent;"
- " font-family: Calligraphic, arial, sans-serif;"
- " font-size: 36px;"
- "}"
- "</style>");
+ "<style>"
+ ".logo {"
+ " color: #005177;"
+ " background-color: transparent;"
+ " font-family: Calligraphic, arial, sans-serif;"
+ " font-size: 36px;"
+ "}"
+ "</style>"
+ "</head>"
+ "<body>"
+ "<span class=\"logo\">csoap</span> ");
- http_output_stream_write_string(conn->out,
- "</head>"
- "<body>"
- "<span class=\"logo\">csoap</span> ");
http_output_stream_write_string(conn->out, title);
http_output_stream_write_string(conn->out, "<hr />");
-
- return;
}
static inline void
_soap_admin_send_footer(httpd_conn_t *conn)
{
- http_output_stream_write_string(conn->out, "</body></html>");
-
- return;
+ http_output_stream_write_string(conn->out,
+ "<hr />"
+ "<a href=\"" CSOAP_ADMIN_CONTEXT "\">Admin page</a> "
+ "<a href=\"http://csoap.sf.net/\">cSOAP Home</a>"
+ "</body>"
+ "</html>");
}
static void
@@ -118,8 +119,6 @@ _soap_admin_list_routers(httpd_conn_t *conn)
http_output_stream_write_string(conn->out, "</ul>");
_soap_admin_send_footer(conn);
-
- return;
}
static void
@@ -136,7 +135,7 @@ _soap_admin_list_services(httpd_conn_t *conn, const char *routername)
if (!router)
{
http_output_stream_write_string(conn->out, "Router not found!");
- http_output_stream_write_string(conn->out, "</body></html>");
+ _soap_admin_send_footer(conn);
return;
}
@@ -174,8 +173,6 @@ _soap_admin_list_services(httpd_conn_t *conn, const char *routername)
http_output_stream_write_string(conn->out, "</ul>");
_soap_admin_send_footer(conn);
-
- return;
}
static void
@@ -211,16 +208,13 @@ _soap_admin_handle_get(httpd_conn_t * conn, struct hrequest_t * req)
"<ul>"
"<li><a href=\"?" CSOAP_ADMIN_QUERY_ROUTERS "\">Routers</a></li>"
"<li><a href=\"../inspection.wsil\">inspection.wsil</a> (try: -CSOAPwsil)</li>"
- "<li><a href=\"../nhttp\">nanoHTTP</a></li>"
+ "<li><a href=\"" NHTTPD_ADMIN_CONTEXT "\">nanoHTTP</a> (try: -NHTTPDadmin)</li>"
"</ul>");
_soap_admin_send_footer(conn);
}
-
- return;
}
-
static void
_soap_admin_entry(httpd_conn_t * conn, struct hrequest_t * req)
{
@@ -232,21 +226,18 @@ _soap_admin_entry(httpd_conn_t * conn, struct hrequest_t * req)
{
httpd_send_header(conn, 200, HTTP_STATUS_200_REASON_PHRASE);
http_output_stream_write_string(conn->out,
- "<html>"
- "<head>"
- "</head>"
- "<body>"
- "<h1>Sorry!</h1>"
- "<hr />"
- "<div>POST Service is not implemented now. Use your browser</div>"
- "</body>"
- "</html>");
+ "<html>"
+ "<head>"
+ "</head>"
+ "<body>"
+ "<h1>Sorry!</h1>"
+ "<hr />"
+ "<div>Only GET method is implemented now. Use your browser.</div>"
+ "</body>"
+ "</html>");
}
-
- return;
}
-
herror_t
soap_admin_init_args(int argc, char **argv)
{
@@ -256,10 +247,9 @@ soap_admin_init_args(int argc, char **argv)
if (!strcmp(argv[i], CSOAP_ENABLE_ADMIN)) {
- httpd_register("/csoap", _soap_admin_entry);
+ httpd_register(CSOAP_ADMIN_CONTEXT, _soap_admin_entry);
break;
}
}
-
return H_OK;
}
diff --git a/libcsoap/soap-admin.h b/libcsoap/soap-admin.h
index 2e0ca80..838a75b 100644
--- a/libcsoap/soap-admin.h
+++ b/libcsoap/soap-admin.h
@@ -1,8 +1,9 @@
/******************************************************************
- * $Id: soap-admin.h,v 1.5 2006/12/31 17:24:22 m0gg Exp $
+ * $Id: soap-admin.h,v 1.6 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
- * Copyright (C) 2003 Ferhat Ayaz
+ * Copyright (C) 2003-2006 Ferhat Ayaz
+ * Copyright (C) 2007 Heiko Ronsdorf
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -24,6 +25,13 @@
#ifndef __csoap_admin_h
#define __csoap_admin_h
+/** @file soap-admin.h HTTP administrator interface
+ *
+ * @defgroup CSOAP_ADMIN
+ * @ingroup CSOAP
+ */
+/**@{*/
+
#define CSOAP_ENABLE_ADMIN "-CSOAPadmin"
#define CSOAP_ADMIN_QUERY_ROUTERS "routers"
@@ -36,19 +44,19 @@
#define CSOAP_ADMIN_URN "urn"
#define CSOAP_ADMIN_METHOD "method"
+#define CSOAP_ADMIN_CONTEXT "csoap"
+
#ifdef __cplusplus
extern "C" {
#endif
-/**
- *
- * Initializes the soap admin HTTP interface with commandline arguments.
+/** This function initializes the cSOAP admin HTTP interface with
+ * commandline arguments.
*
* @param argc commandline arg count
* @param argv commandline arg vector
*
- * @returns 1 if success, 0 otherwise
- *
+ * @returns H_OK on success.
*/
extern herror_t soap_admin_init_args(int argc, char **argv);
@@ -56,4 +64,6 @@ extern herror_t soap_admin_init_args(int argc, char **argv);
}
#endif
+/**@}*/
+
#endif
diff --git a/libcsoap/soap-client.c b/libcsoap/soap-client.c
index cf2479f..65e21f4 100644
--- a/libcsoap/soap-client.c
+++ b/libcsoap/soap-client.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-client.c,v 1.33 2006/11/29 11:04:24 m0gg Exp $
+* $Id: soap-client.c,v 1.34 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -33,8 +33,8 @@
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -91,14 +91,14 @@ soap_client_init_args(int argc, char **argv)
if ((status = soap_xmlsec_client_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_xmlsec_client_init_args failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_client_init_args failed (%s)", herror_message(status));
return status;
}
#endif
if ((status = soap_transport_client_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_transport_client_init_args failed (%s)", herror_message(status));
+ log_error("soap_transport_client_init_args failed (%s)", herror_message(status));
return status;
}
@@ -119,71 +119,71 @@ soap_client_invoke(struct SoapCtx *req, struct SoapCtx **res, const char *url, c
herror_t status;
char *id;
- log_verbose2("action = \"%s\"", action);
+ log_verbose("action = \"%s\"", action);
soap_addressing_set_action_string(req->env, action);
- log_verbose2("url = \"%s\"", url);
+ log_verbose("url = \"%s\"", url);
soap_addressing_set_to_address_string(req->env, url);
- log_verbose2("from = \"%s\"", soap_transport_get_name());
+ log_verbose("from = \"%s\"", soap_transport_get_name());
soap_addressing_set_from_address_string(req->env, soap_transport_get_name());
soap_addressing_set_message_id_string(req->env, NULL);
id = soap_addressing_get_message_id_string(req->env);
- log_verbose2("generated message id = \"%s\"", id);
+ log_verbose("generated message id = \"%s\"", id);
free(id);
#ifdef HAVE_XMLSEC1
if ((status = soap_xmlsec_encrypt(req)) != H_OK)
{
- log_error2("soap_xmlsec_encrypt failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_encrypt failed (%s)", herror_message(status));
if (_soap_client_force_encrypt)
return status;
}
else
{
- log_verbose1("soap_xmlsec_encrypt succeed");
+ log_verbose("soap_xmlsec_encrypt succeed");
}
if ((status = soap_xmlsec_sign(req)) != H_OK)
{
- log_error2("soap_xmlsec_sign failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_sign failed (%s)", herror_message(status));
if (_soap_client_force_sign)
return status;
}
else
{
- log_verbose1("soap_xmlsec_encrypt succeed");
+ log_verbose("soap_xmlsec_encrypt succeed");
}
#endif
if ((status = soap_transport_client_invoke(req, res)) != H_OK)
{
- log_error2("soap_transport_client_invoke failed (%s)", herror_message(status));
+ log_error("soap_transport_client_invoke failed (%s)", herror_message(status));
return status;
}
#ifdef HAVE_XMLSEC1
if ((status = soap_xmlsec_verify(*res)) != H_OK)
{
- log_error2("soap_xmlsec_verify failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_verify failed (%s)", herror_message(status));
if (_soap_client_force_verify)
return status;
}
else
{
- log_verbose1("soap_xmlsec_verify succeed");
+ log_verbose("soap_xmlsec_verify succeed");
}
if ((status = soap_xmlsec_decrypt(*res)) != H_OK)
{
- log_error2("soap_xmlsec_decrypt failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_decrypt failed (%s)", herror_message(status));
if (_soap_client_force_decrypt)
return status;
}
else
{
- log_verbose1("soap_xmlsec_decrypt succeed");
+ log_verbose("soap_xmlsec_decrypt succeed");
}
#endif
diff --git a/libcsoap/soap-ctx.c b/libcsoap/soap-ctx.c
index 4d595f4..3adbc5e 100755
--- a/libcsoap/soap-ctx.c
+++ b/libcsoap/soap-ctx.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-ctx.c,v 1.14 2006/11/25 15:06:57 m0gg Exp $
+ * $Id: soap-ctx.c,v 1.15 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -45,8 +45,8 @@
#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-common.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -58,7 +58,7 @@ soap_ctx_new(struct SoapEnv * env) /* should only be used internally */
if (!(ctx = (struct SoapCtx *) malloc(sizeof(struct SoapCtx))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
diff --git a/libcsoap/soap-env.c b/libcsoap/soap-env.c
index 99cf3ba..09386c4 100644
--- a/libcsoap/soap-env.c
+++ b/libcsoap/soap-env.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-env.c,v 1.27 2006/11/26 20:13:05 m0gg Exp $
+* $Id: soap-env.c,v 1.28 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -50,12 +50,11 @@
#endif
#include <libxml/tree.h>
-#include <libxml/xpath.h>
#include <libxml/xmlstring.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-xml.h"
#include "soap-fault.h"
#include "soap-env.h"
@@ -172,7 +171,7 @@ soap_env_new_from_doc(xmlDocPtr doc, struct SoapEnv ** out)
if (doc == NULL)
{
- log_error1("Cannot create XML document!");
+ log_error("Cannot create XML document!");
return herror_new("soap_env_new_from_doc",
GENERAL_INVALID_PARAM,
"XML Document (xmlDocPtr) is NULL");
@@ -180,14 +179,14 @@ soap_env_new_from_doc(xmlDocPtr doc, struct SoapEnv ** out)
if (!(root = xmlDocGetRootElement(doc)))
{
- log_error1("XML document is empty!");
+ log_error("XML document is empty!");
return herror_new("soap_env_new_from_doc",
XML_ERROR_EMPTY_DOCUMENT, "XML Document is empty!");
}
if (!(env = (struct SoapEnv *) malloc(sizeof(struct SoapEnv))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return herror_new("soap_env_from_doc", GENERAL_INVALID_PARAM, "malloc failed (%s)", strerror(errno));
}
@@ -294,8 +293,8 @@ soap_env_new_with_method(const char *urn, const char *method, struct SoapEnv **
xmlDocPtr env;
xmlChar buffer[1054];
- log_verbose2("URN = '%s'", urn);
- log_verbose2("Method = '%s'", method);
+ log_verbose("URN = '%s'", urn);
+ log_verbose("Method = '%s'", method);
if (!strcmp(urn, ""))
{
@@ -327,7 +326,7 @@ soap_env_add_item(struct SoapEnv * call, const char *type, const char *name, con
if (newNode == NULL)
{
- log_error1("Can not create new XML node");
+ log_error("Can not create new XML node");
return NULL;
}
@@ -335,7 +334,7 @@ soap_env_add_item(struct SoapEnv * call, const char *type, const char *name, con
{
if (!xmlNewProp(newNode, BAD_CAST "xsi:type", BAD_CAST type))
{
- log_error1("Can not create new XML attribute");
+ log_error("Can not create new XML attribute");
return NULL;
}
}
@@ -368,7 +367,7 @@ soap_env_add_attachment(struct SoapEnv * call, const char *name, const char *hre
if (newNode == NULL)
{
- log_error1("Can not create new xml node");
+ log_error("Can not create new xml node");
return NULL;
}
@@ -376,7 +375,7 @@ soap_env_add_attachment(struct SoapEnv * call, const char *name, const char *hre
{
if (!xmlNewProp(newNode, BAD_CAST "href", BAD_CAST href))
{
- log_error1("Can not create new xml attribute");
+ log_error("Can not create new xml attribute");
return NULL;
}
}
@@ -437,7 +436,6 @@ soap_env_free(struct SoapEnv * env)
return;
}
-
xmlNodePtr
soap_env_get_body(struct SoapEnv * env)
{
@@ -445,24 +443,24 @@ soap_env_get_body(struct SoapEnv * env)
if (env == NULL)
{
- log_error1("SOAP envelope is NULL");
+ log_error("SOAP envelope is NULL");
return NULL;
}
if (env->root == NULL)
{
- log_error1("SOAP envelope contains no XML");
+ log_error("SOAP envelope contains no XML");
return NULL;
}
- for (node = soap_xml_get_children(env->root); node; node = soap_xml_get_next(node))
+ for (node = soap_xml_get_children(env->root); node; node = soap_xml_get_next_element(node))
{
if (!xmlStrcmp(node->name, BAD_CAST "Body")
&& !xmlStrcmp(node->ns->href, BAD_CAST soap_env_ns))
return node;
}
- log_error1("Body tag not found!");
+ log_error("Body tag not found!");
return NULL;
}
@@ -474,17 +472,17 @@ soap_env_get_header(struct SoapEnv *env)
if (!env)
{
- log_error1("SoapEnv is NULL");
+ log_error("SoapEnv is NULL");
return NULL;
}
if (!env->root)
{
- log_error1("SoapEnv contains no document");
+ log_error("SoapEnv contains no document");
return NULL;
}
- for (node = soap_xml_get_children(env->root); node; node = soap_xml_get_next(node))
+ for (node = soap_xml_get_children(env->root); node; node = soap_xml_get_next_element(node))
{
if (!xmlStrcmp(node->name, BAD_CAST "Header")
&& !xmlStrcmp(node->ns->href, BAD_CAST soap_env_ns))
@@ -500,19 +498,19 @@ soap_env_get_fault(struct SoapEnv * env)
{
xmlNodePtr node;
- node = soap_env_get_body(env);
-
- if (!node)
+ if (!(node = soap_env_get_body(env)))
+ {
return NULL;
+ }
while (node != NULL)
{
if (!xmlStrcmp(node->name, BAD_CAST "Fault"))
return node;
- node = soap_xml_get_next(node);
+ node = soap_xml_get_next_element(node);
}
-/* log_warn1 ("Node Fault tag found!");*/
+/* log_warn("Node Fault tag found!");*/
return NULL;
}
@@ -524,65 +522,15 @@ soap_env_get_method(struct SoapEnv * env)
if (!(body = soap_env_get_body(env)))
{
- log_verbose1("SoapEnv contains no Body element");
+ log_verbose("SoapEnv contains no Body element");
return NULL;
}
- /* method is the first child */
+ /* The method element has to be the first child element */
return soap_xml_get_children(body);
}
-/* XXX: unused function? */
-xmlNodePtr
-_soap_env_get_body(struct SoapEnv * env)
-{
- xmlNodePtr body;
- xmlNodeSetPtr nodeset;
- xmlXPathObjectPtr xpathobj;
-
- if (env == NULL)
- {
- log_error1("struct SoapEnv is NULL");
- return NULL;
- }
-
- if (env->root == NULL)
- {
- log_error1("struct SoapEnv contains no XML document");
- return NULL;
- }
-
- /*
- find <Body> tag find out namespace xpath: //Envelope/Body/ */
- xpathobj = soap_xpath_eval(env->root->doc, "//Envelope/Body");
-
- if (!xpathobj)
- {
- log_error1("No Body (xpathobj)!");
- return NULL;
- }
-
- if (!(nodeset = xpathobj->nodesetval))
- {
- log_error1("No Body (nodeset)!");
- xmlXPathFreeObject(xpathobj);
- return NULL;
- }
-
- if (nodeset->nodeNr < 1)
- {
- log_error1("No Body (nodeNr)!");
- xmlXPathFreeObject(xpathobj);
- return NULL;
- }
-
- body = nodeset->nodeTab[0]; /* body is <Body> */
- xmlXPathFreeObject(xpathobj);
- return body;
-}
-
-
const char *
soap_env_find_urn(struct SoapEnv * env)
{
@@ -591,14 +539,14 @@ soap_env_find_urn(struct SoapEnv * env)
if (!(body = soap_env_get_body(env)))
{
- log_verbose1("body is NULL");
+ log_verbose("body is NULL");
return NULL;
}
/* node is the first child */
if (!(node = soap_xml_get_children(body)))
{
- log_error1("No namespace found");
+ log_error("No namespace found");
return NULL;
}
@@ -613,8 +561,8 @@ soap_env_find_urn(struct SoapEnv * env)
}
else
{
- static char *empty = "";
- log_warn1("No namespace found");
+ static const char *empty = "";
+ log_warn("No namespace found");
return(empty);
}
@@ -630,19 +578,17 @@ soap_env_find_methodname(struct SoapEnv * env)
if (!(body = soap_env_get_body(env)))
return NULL;
- node = soap_xml_get_children(body); /* node is the first child */
-
- if (node == NULL)
+ /* node is the first child */
+ if (!(node = soap_xml_get_children(body)))
{
- log_error1("No method found");
+ log_error("No method found");
return NULL;
}
if (node->name == NULL)
{
- log_error1("No methodname found");
+ log_error("No methodname found");
return NULL;
-
}
return ((char *) node->name);
diff --git a/libcsoap/soap-fault.c b/libcsoap/soap-fault.c
index 3341f7a..ab56979 100644
--- a/libcsoap/soap-fault.c
+++ b/libcsoap/soap-fault.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-fault.c,v 1.16 2006/12/14 19:36:49 m0gg Exp $
+* $Id: soap-fault.c,v 1.17 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -33,11 +33,11 @@
#include <errno.h>
#endif
-#include <libxml/xpath.h>
-
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include <libxml/tree.h>
+
+#include "soap-logging.h"
#include "soap-xml.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -91,7 +91,7 @@ soap_fault_build(int fault_code, const char *fault_string, const char *fault_act
char *buffer;
xmlDocPtr fault; /* result */
- log_verbose1("Build fault");
+ log_verbose("Build fault");
switch (fault_code)
{
@@ -121,10 +121,10 @@ soap_fault_build(int fault_code, const char *fault_string, const char *fault_act
if (detail)
bufferlen += strlen(detail);
- log_verbose2("Creating buffer with %d bytes", bufferlen);
+ log_verbose("Creating buffer with %d bytes", bufferlen);
if (!(buffer = (char *) malloc(bufferlen)))
{
- log_error2("malloc failed (%s)", errno);
+ log_error("malloc failed (%s)", errno);
return NULL;
}
@@ -139,11 +139,11 @@ soap_fault_build(int fault_code, const char *fault_string, const char *fault_act
if (fault == NULL)
{
- log_error1("Cannot create XML document!");
+ log_error("Cannot create XML document!");
return soap_fault_build(fault_code, "Cannot create fault object in XML", soap_server_get_name(), NULL);
}
- log_verbose2("Returning fault (%p)", fault);
+ log_verbose("Returning fault (%p)", fault);
return fault;
}
diff --git a/libcsoap/soap-logging.c b/libcsoap/soap-logging.c
new file mode 100644
index 0000000..1fd0eef
--- /dev/null
+++ b/libcsoap/soap-logging.c
@@ -0,0 +1,150 @@
+/******************************************************************
+* $Id: soap-logging.c,v 1.1 2007/11/03 22:40:09 m0gg Exp $
+*
+* CSOAP Project: A http client/server library in C
+* Copyright (C) 2003 Ferhat Ayaz
+*
+* 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: ayaz@jprogrammer.net
+******************************************************************/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_STDARG_H
+#include <stdarg.h>
+#endif
+
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+#include "soap-logging.h"
+
+static int _soap_logtype = SOAP_LOG_FOREGROUND;
+static soap_loglevel_t _soap_loglevel = SOAP_LOG_DEBUG;
+static char *_soap_log_logfile = NULL;
+
+soap_loglevel_t
+soap_log_set_loglevel(soap_loglevel_t level)
+{
+ soap_loglevel_t old = _soap_loglevel;
+ _soap_loglevel = level;
+ return old;
+}
+
+soap_loglevel_t
+soap_log_get_loglevel(void)
+{
+ return _soap_loglevel;
+}
+
+int
+soap_log_set_logtype(int type)
+{
+ int old;
+
+ old = _soap_logtype;
+ _soap_logtype = type;
+
+ return old;
+}
+
+const char *
+soap_log_get_logfile(void)
+{
+ return _soap_log_logfile;
+}
+
+void
+soap_log_set_logfile(const char *filename)
+{
+ if (_soap_log_logfile)
+ free(_soap_log_logfile);
+
+ if (filename)
+ _soap_log_logfile = strdup(filename);
+}
+
+void
+_soap_log_printf(soap_loglevel_t level, const char *format, ...)
+{
+ const char *filename;
+ va_list ap;
+
+ if (level < _soap_loglevel)
+ return;
+
+ va_start(ap, format);
+
+ if (_soap_logtype & SOAP_LOG_FOREGROUND)
+ vfprintf(stdout, format, ap);
+
+#ifdef HAVE_SYSLOG_H
+ if (_nanohttp_logtype & SOAP_LOG_SYSLOG)
+ {
+ int syslog_level;
+
+ switch (level)
+ {
+ case SOAP_LOGLEVEL_VERBOSE:
+ case SOAP_LOGLEVEL_DEBUG:
+ syslog_level = LOG_DEBUG;
+ break;
+ case SOAP_LOGLEVEL_INFO:
+ syslog_level = LOG_INFO;
+ break;
+ case SOAP_LOGLEVEL_WARN:
+ syslog_level = LOG_WARNING;
+ break;
+ case SOAP_LOGLEVEL_ERROR:
+ syslog_level = LOG_ERR;
+ break;
+ case SOAP_LOGLEVEL_FATAL:
+ syslog_level = LOG_CRIT;
+ break;
+ }
+ vsyslog(syslog_level, format, ap);
+ }
+#endif
+
+ if ((filename = soap_log_get_logfile()))
+ {
+ FILE *fp;
+
+ if (!(fp = fopen(filename, "a")))
+ fp = fopen(filename, "w");
+
+ if (fp)
+ {
+ vfprintf(fp, format, ap);
+ fflush(fp);
+ fclose(fp);
+ }
+ }
+
+ va_end(ap);
+}
+
diff --git a/libcsoap/soap-logging.h b/libcsoap/soap-logging.h
new file mode 100644
index 0000000..68c9728
--- /dev/null
+++ b/libcsoap/soap-logging.h
@@ -0,0 +1,150 @@
+/******************************************************************
+ * $Id: soap-logging.h,v 1.1 2007/11/03 22:40:09 m0gg Exp $
+ *
+ * CSOAP Project: A http client/server library in C
+ * Copyright (C) 2003-2006 Ferhat Ayaz
+ * Copyright (C) 2007 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 __soap_logging_h
+#define __soap_logging_h
+
+/** @file soap-logging.h Logging definitions and prototypes
+ *
+ * @defgrpoup CSOAP_LOGGING Logging interface
+ * @ingroup CSOAP
+ */
+/**@{*/
+
+/** @defgroup CSOAP_CDMLINE_LOGGING Commandline flags
+ * @ingroup CSOAP_CMDLINE
+ */
+/**@{*/
+#define CSOAP_ARG_LOGFILE "-CSOAPlog"
+#define CSOAP_ARG_LOGLEVEL "-CSOAPloglevel"
+/**@}*/
+
+/** Loglevel definition */
+typedef enum soap_loglevel
+{
+ SOAP_LOG_OFF, /**< Logging completely turned off (use at your own
+ risk). */
+ SOAP_LOG_VERBOSE, /**< Debugging messages thath may overlfow the
+ log */
+ SOAP_LOG_DEBUG, /**< Messages that contain information normallu of
+ use only when debugging the library. */
+ SOAP_LOG_INFO, /**< Infmormational messages */
+ SOAP_LOG_WARN, /**< Warning messages. */
+ SOAP_LOG_ERROR, /**< A condition that should be corrected
+ immediately, such as a broken network
+ connection. */
+ SOAP_LOG_FATAL /**< A panic condition. */
+} soap_loglevel_t;
+
+#define SOAP_LOG_LEVEL_OFF_STRING "OFF"
+#define SOAP_LOG_LEVEL_VERBOSE_STRING "VERBOSE"
+#define SOAP_LOG_LEVEL_DEBUG_STRING "DEBUG"
+#define SOAP_LOG_LEVEL_INFO_STRING "INFO"
+#define SOAP_LOG_LEVEL_WARN_STRING "WARN"
+#define SOAP_LOG_LEVEL_ERROR_STRING "ERROR"
+#define SOAP_LOG_LEVEL_FATAL_STRING "FATAL"
+#define SOAP_LOG_LEVEL_UNKNOWN_STRING "UNKNWON"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Set the loglevel.
+ *
+ * @param level The new loglevel.
+ *
+ * @return The old loglevel.
+ */
+extern soap_loglevel_t soap_set_loglevel(soap_loglevel_t loglevel);
+
+/** Get the loglevel.
+ *
+ * @return The current loglevel.
+ */
+extern soap_loglevel_t soap_get_loglevel(void);
+
+/** Set the logfile.
+ *
+ * @param filename The filename of the logfile.
+ */
+extern void soap_set_logfile(const char *filename);
+
+/** Get the filename of the logfile.
+ *
+ * @return Pointer to the filename or null otherwise.
+ */
+extern char *soap_get_logfile(void);
+
+#define SOAP_LOG_DISABLED 0x00 /**< Logging disabled */
+#define SOAP_LOG_FOREGROUND 0x01 /**< Logging to stdout enabled */
+#define SOAP_LOG_SYSLOG 0x02 /**< Syslog logging enabled */
+
+/** This function sets the type of logging.
+ *
+ * @return The old logtype.
+ *
+ * @see - SOAP_LOG_DISABLED
+ * - SOAP_LOG_FOREGROUND
+ * - SOAP_LOG_SYSLOG
+ */
+extern int soap_log_set_logtype(int type);
+
+#ifdef WIN32
+#if defined(_MSC_VER) && _MSC_VER <= 1200
+extern char *VisualC_funcname(const char *file, int line); /* not thread safe! */
+#define __FUNCTION__ VisualC_funcname(__FILE__, __LINE__)
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define log_verbose(fmt, ...) _nanohttp_log_printf(SOAP_LOG_VERBOSE, \
+ SOAP_LOG_LEVEL_VERBOSE_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+#define log_debug(fmt, ...) _nanohttp_log_printf(SOAP_LOG_DEBUG, \
+ SOAP_LOG_LEVEL_DEBUG_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+#define log_info(fmt, ...) _nanohttp_log_printf(SOAP_LOG_INFO, \
+ SOAP_LOG_LEVEL_INFO_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+#define log_warn(fmt, ...) _nanohttp_log_printf(SOAP_LOG_WARN, \
+ SOAP_LOG_LEVEL_WARN_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+#define log_error(fmt, ...) _nanohttp_log_printf(SOAP_LOG_ERROR, \
+ SOAP_LOG_LEVEL_ERROR_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+#define log_fatal(fmt, ...) _nanohttp_log_printf(SOAP_LOG_FATAL, \
+ SOAP_LOG_LEVEL_FATAL_STRING " %s: " fmt "\n", \
+ __FUNCTION__, ## __VA_ARGS__)
+
+/**@}*/
+
+#endif
diff --git a/libcsoap/soap-nhttp.c b/libcsoap/soap-nhttp.c
index 833b78f..1637754 100644
--- a/libcsoap/soap-nhttp.c
+++ b/libcsoap/soap-nhttp.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-nhttp.c,v 1.12 2007/01/01 18:58:05 m0gg Exp $
+* $Id: soap-nhttp.c,v 1.13 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -19,7 +19,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
-* Email: ayaz@jprogrammer.net
+* Email: hero@persua.de
******************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -39,11 +39,9 @@
#include <libxml/tree.h>
#include <libxml/uri.h>
-#include <libxml/xpath.h>
#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-common.h>
-#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-stream.h>
#include <nanohttp/nanohttp-request.h>
#include <nanohttp/nanohttp-response.h>
@@ -51,6 +49,7 @@
#include <nanohttp/nanohttp-client.h>
#include <nanohttp/nanohttp-server.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -109,10 +108,14 @@ _soap_nhttp_xml_io_read(void *ctx, char *buffer, int len)
in = (struct http_input_stream_t *)ctx;
if (!http_input_stream_is_ready(in))
+ {
return 0;
+ }
if ((ret = http_input_stream_read(in, buffer, len)) == -1)
+ {
return 0;
+ }
return ret;
}
@@ -211,19 +214,19 @@ soap_nhttp_server_init_args(int argc, char **argv)
if ((err = httpd_init(argc, argv)) != H_OK)
{
- log_error2("httpd_init failed (%s)", herror_message(err));
+ log_error("httpd_init failed (%s)", herror_message(err));
return err;
}
if ((err = soap_wsil_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_wsil_init_args failed (%s)", herror_message(err));
+ log_error("soap_wsil_init_args failed (%s)", herror_message(err));
return err;
}
if ((err = soap_admin_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_admin_init_args failed (%s)", herror_message(err));
+ log_error("soap_admin_init_args failed (%s)", herror_message(err));
return err;
}
@@ -233,7 +236,7 @@ soap_nhttp_server_init_args(int argc, char **argv)
static herror_t
_soap_nhttp_client_build_result(hresponse_t * res, struct SoapEnv ** env)
{
- log_verbose2("Building result (%p)", res);
+ log_verbose("Building result (%p)", res);
if (res == NULL)
return herror_new("_soap_client_build_result",
@@ -275,7 +278,7 @@ _soap_nhttp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx
/* for copy attachments */
char href[MAX_HREF_SIZE];
- /* log_verbose1("nanohttp client"); */
+ /* log_verbose("nanohttp client"); */
xmlDocDumpMemory(request->env->root->doc, &buffer, &size);
@@ -291,14 +294,14 @@ _soap_nhttp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx
httpc_set_header(conn, SOAP_NHTTP_SOAP_ACTION, action);
else
httpc_set_header(conn, SOAP_NHTTP_SOAP_ACTION, "");
- log_verbose2("action is \"%s\"", action);
+ log_verbose("action is \"%s\"", action);
free(action);
httpc_set_header(conn, HEADER_CONNECTION, "Close");
if (!(url = soap_addressing_get_to_address_string(request->env)))
return herror_new("soap_nhttp_client_invoke", 0, "Missing client URL");
- log_verbose2("url is \"%s\"", url);
+ log_verbose("url is \"%s\"", url);
if (!request->attachments)
{
@@ -359,7 +362,7 @@ _soap_nhttp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx
{
if ((status = httpc_mime_send_file(conn, part->id, part->content_type, part->transfer_encoding, part->filename)) != H_OK)
{
- log_error2("httpc_mime_send_file failed (%s)", herror_message(status));
+ log_error("httpc_mime_send_file failed (%s)", herror_message(status));
httpc_close_free(conn);
xmlFree(buffer);
return status;
@@ -401,7 +404,7 @@ _soap_nhttp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx
hresponse_free(res);
httpc_close_free(conn);
- /* log_verbose1("done"); */
+ /* log_verbose("done"); */
return H_OK;
}
@@ -413,7 +416,7 @@ soap_nhttp_client_init_args(int argc, char **argv)
if ((status = httpc_init(argc, argv)) != H_OK)
{
- log_error2("httpc_init failed (%s)", herror_message(status));
+ log_error("httpc_init failed (%s)", herror_message(status));
return status;
}
@@ -430,7 +433,7 @@ soap_nhttp_register(const char *context)
if ((status = httpd_register(context, soap_nhttp_process)) != H_OK)
{
- log_error2("httpd_register_secure failed (%s)", herror_message(status));
+ log_error("httpd_register_secure failed (%s)", herror_message(status));
return status;
}
diff --git a/libcsoap/soap-nudp.c b/libcsoap/soap-nudp.c
index e7f4dc1..2e5ab83 100644
--- a/libcsoap/soap-nudp.c
+++ b/libcsoap/soap-nudp.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-nudp.c,v 1.9 2006/12/16 15:55:24 m0gg Exp $
+* $Id: soap-nudp.c,v 1.10 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2006 Heiko Ronsdorf
@@ -73,8 +73,8 @@
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -98,7 +98,7 @@ _soap_nudp_server_set_port(void)
if (!(entry = getservbyname("soap", "udp")))
{
- log_warn1("getservbyname(\"soap\", \"udp\") returned NULL, please edit services database");
+ log_warn("getservbyname(\"soap\", \"udp\") returned NULL, please edit services database");
_soap_nudp_port = NUDP_DEFAULT_PORT;
}
else
@@ -121,7 +121,7 @@ _soap_nudp_server_parse_arguments(int argc, char **argv)
}
}
- log_verbose2("socket bind to port \"%d\"", _soap_nudp_port);
+ log_verbose("socket bind to port \"%d\"", _soap_nudp_port);
return;
}
@@ -139,7 +139,7 @@ _soap_nudp_send_document(int socket, xmlDocPtr doc, const struct sockaddr *addr,
xmlDocDumpMemory(doc, &buf, &size);
if ((sent = sendto(socket, buf, size, 0, addr, addr_len)) == -1)
{
- log_error2("sendto failed (%s)", strerror(errno));
+ log_error("sendto failed (%s)", strerror(errno));
ret = herror_new("soap_nudp_client_invoke", 0, "Cannot send message");
}
@@ -157,14 +157,14 @@ _soap_nudp_receive_document(int socket, xmlDocPtr *doc, struct sockaddr *addr, s
/** @todo: use a timeout ??? */
if ((cnt = recvfrom(socket, buf, 4095, 0, addr, addr_len)) < 0)
{
- log_error2("recvfrom failed (%s)", strerror(errno));
+ log_error("recvfrom failed (%s)", strerror(errno));
return herror_new("_soap_nudp_receive_document", 0, "Receiving document failed");
}
buf[cnt] = '\0';
if (!(*doc = xmlReadDoc(buf, NULL, NULL, XML_PARSE_NONET)))
{
- log_error1("xmlReadDoc failed");
+ log_error("xmlReadDoc failed");
return herror_new("_soap_nudp_receive_document", 0, "Cannot parse received data");
}
@@ -184,7 +184,7 @@ _soap_nudp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx *
if (!(to = soap_addressing_get_to_address(request->env)))
{
- log_error1("soap_addressing_get_to_address returned NULL");
+ log_error("soap_addressing_get_to_address returned NULL");
return herror_new("soap_nudp_client_invoke", 0, "Destination address is missing");
}
@@ -197,13 +197,13 @@ _soap_nudp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx *
if (inet_pton(AF_INET, "127.0.0.1", &addr.sin_addr) != 1)
{
- log_error2("inet_pton failed (%s)", strerror(errno));
+ log_error("inet_pton failed (%s)", strerror(errno));
return herror_new("soap_nudp_client_invoke", 0, "Cannot resolve destination address");
}
if ((sd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
{
- log_error2("socket failed (%s)", strerror(errno));
+ log_error("socket failed (%s)", strerror(errno));
return herror_new("soap_nudp_client_invoke", 0, "Cannot create socket");
}
@@ -212,14 +212,14 @@ _soap_nudp_client_invoke(void *unused, struct SoapCtx *request, struct SoapCtx *
saddr_len = sizeof(struct sockaddr);
if ((status = _soap_nudp_receive_document(sd, &doc, &saddr, &saddr_len)) != H_OK)
{
- log_error2("_soap_nudp_receive_document failed (%s)", herror_message(status));
+ log_error("_soap_nudp_receive_document failed (%s)", herror_message(status));
return status;
}
*response = soap_ctx_new(NULL);
if ((status = soap_env_new_from_doc(doc, &(*response)->env)) != H_OK)
{
- log_error2("soap_env_new_from_doc failed (%s)", herror_message(status));
+ log_error("soap_env_new_from_doc failed (%s)", herror_message(status));
return status;
}
@@ -239,7 +239,7 @@ soap_nudp_server_init_args(int argc, char **argv)
if ((_soap_nudp_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
{
- log_error2("socket failed (%s)", strerror(errno));
+ log_error("socket failed (%s)", strerror(errno));
return herror_new("soap_nudp_server_init_args", 0, "Cannot create socket (%s)", strerror(errno));
}
@@ -250,7 +250,7 @@ soap_nudp_server_init_args(int argc, char **argv)
if (bind(_soap_nudp_socket, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0)
{
- log_error2("bind failed (%s)", strerror(errno));
+ log_error("bind failed (%s)", strerror(errno));
return herror_new("soap_nudp_server_init_args", 0, "Cannot bind socket (%s)", strerror(errno));
}
@@ -281,12 +281,12 @@ soap_nudp_server_run(void *unused)
addr_len = sizeof(struct sockaddr);
if (_soap_nudp_receive_document(_soap_nudp_socket, &doc, &addr, &addr_len) != H_OK)
{
- log_error2("_soap_nudp_receive_document failed (%s)", herror_message(status));
+ log_error("_soap_nudp_receive_document failed (%s)", herror_message(status));
herror_release(status);
continue;
}
- /* log_error1(__FUNCTION__);
+ /* log_error(__FUNCTION__);
xmlDocFormatDump(stdout, doc, 1); */
req = soap_ctx_new(NULL);
@@ -324,7 +324,7 @@ soap_nudp_server_run_threaded(void)
if ((err = pthread_create(&_soap_nudp_thread, &_soap_nudp_attr, soap_nudp_server_run, NULL)) < 0)
{
- log_error2("pthread_create failed (%s)", strerror(err));
+ log_error("pthread_create failed (%s)", strerror(err));
return herror_new("soap_nudp_server_run_threaded", 0, "pthread_create failed (%s)", strerror(err));
}
diff --git a/libcsoap/soap-router.c b/libcsoap/soap-router.c
index cc443ca..1d1be64 100644
--- a/libcsoap/soap-router.c
+++ b/libcsoap/soap-router.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-router.c,v 1.14 2006/11/25 15:06:57 m0gg Exp $
+* $Id: soap-router.c,v 1.15 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -40,8 +40,8 @@
#include <libxml/tree.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-ctx.h"
#include "soap-service.h"
@@ -55,7 +55,7 @@ soap_router_new(void)
if (!(router = (struct SoapRouter *) malloc(sizeof(struct SoapRouter))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
memset(router, 0, sizeof(struct SoapRouter));
@@ -68,7 +68,7 @@ soap_router_register_service(struct SoapRouter *router, SoapServiceFunc func, co
{
SoapService *service;
- log_verbose4("registering service (router=%p, method=\"%s\", urn=\"%s\")", router, method, urn);
+ log_verbose("registering service (router=%p, method=\"%s\", urn=\"%s\")", router, method, urn);
if (!(service = soap_service_new(urn, method, func)))
return herror_new("soap_router_register_service", 0, "soap_service_new failed");
@@ -136,24 +136,24 @@ soap_router_find_service(struct SoapRouter *router, const char *urn, const char
if (router == NULL)
{
- log_verbose1("router is null");
+ log_verbose("router is null");
return NULL;
}
if (urn == NULL)
{
- log_verbose1("URN is null");
+ log_verbose("URN is null");
return NULL;
}
if (method == NULL)
{
- log_verbose1("method is null");
+ log_verbose("method is null");
return NULL;
}
- log_verbose2("router = %p", router);
- log_verbose2("router->service_head = %p", router->service_head);
+ log_verbose("router = %p", router);
+ log_verbose("router->service_head = %p", router->service_head);
node = router->service_head;
@@ -161,7 +161,7 @@ soap_router_find_service(struct SoapRouter *router, const char *urn, const char
{
if (node->service && node->service->urn && node->service->method)
{
- log_verbose4("checking service (node=%p, method=\"%s\", urn=\"%s\")", node->service, node->service->method, node->service->urn);
+ log_verbose("checking service (node=%p, method=\"%s\", urn=\"%s\")", node->service, node->service->method, node->service->urn);
if (!strcmp(node->service->urn, urn) && !strcmp(node->service->method, method))
return node->service;
}
@@ -174,7 +174,7 @@ void
soap_router_free(struct SoapRouter * router)
{
SoapServiceNode *node;
- log_verbose2("enter: router=%p", router);
+ log_verbose("enter: router=%p", router);
if (!router)
return;
@@ -182,7 +182,7 @@ soap_router_free(struct SoapRouter * router)
while (router->service_head)
{
node = router->service_head->next;
- /* log_verbose2("soap_service_free(%p)\n",
+ /* log_verbose("soap_service_free(%p)\n",
router->service_head->service); */
soap_service_free(router->service_head->service);
free(router->service_head);
@@ -192,7 +192,7 @@ soap_router_free(struct SoapRouter * router)
xmlFreeDoc(router->description);
free(router);
- log_verbose1("leave with success");
+ log_verbose("leave with success");
return;
}
diff --git a/libcsoap/soap-server.c b/libcsoap/soap-server.c
index 34b053f..5b23b8c 100644
--- a/libcsoap/soap-server.c
+++ b/libcsoap/soap-server.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-server.c,v 1.36 2006/12/31 17:24:22 m0gg Exp $
+* $Id: soap-server.c,v 1.37 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -41,8 +41,8 @@
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -66,7 +66,7 @@ router_node_new(struct SoapRouter * router, const char *context, SoapRouterNode
if (!(node = (SoapRouterNode *) malloc(sizeof(SoapRouterNode))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
@@ -76,7 +76,7 @@ router_node_new(struct SoapRouter * router, const char *context, SoapRouterNode
}
else
{
- log_warn2("context is null, using '%s'", noname);
+ log_warn("context is null, using '%s'", noname);
node->context = strdup(noname);
}
@@ -97,7 +97,7 @@ _soap_server_fillup_header(struct SoapEnv *envelope)
{
xmlURI *uri;
- log_verbose1(__FUNCTION__);
+ log_verbose("");
if (!(uri = soap_addressing_get_message_id(envelope)))
soap_addressing_set_message_id_string(envelope, NULL);
@@ -139,16 +139,16 @@ soap_server_process(struct SoapCtx *request, struct SoapCtx **response)
SoapService *service;
herror_t err;
- log_verbose1("**** processing ****");
+ log_verbose("**** processing ****");
xmlDocDump(stdout, request->env->root->doc);
- log_verbose1("********************");
+ log_verbose("********************");
*response = soap_ctx_new(NULL);
#ifdef HAVE_XMLSEC1
if ((err = soap_xmlsec_verify(request)) != H_OK)
{
- log_error2("soap_xmlsec_verify failed (%s)", herror_message(err));
+ log_error("soap_xmlsec_verify failed (%s)", herror_message(err));
sprintf(buffer, "Verification of message signature failed (%s)", herror_message(err));
_soap_server_env_new_with_fault("Internal server error", buffer, &((*response)->env));
@@ -157,7 +157,7 @@ soap_server_process(struct SoapCtx *request, struct SoapCtx **response)
if ((err = soap_xmlsec_decrypt(request)) != H_OK)
{
- log_error2("soap_xmlsec_decrypt failed (%s)", herror_message(err));
+ log_error("soap_xmlsec_decrypt failed (%s)", herror_message(err));
sprintf(buffer, "Decryption of message body failed (%s)", herror_message(err));
_soap_server_env_new_with_fault("Internal server error", buffer, &((*response)->env));
return H_OK;
@@ -166,19 +166,19 @@ soap_server_process(struct SoapCtx *request, struct SoapCtx **response)
if ((method = soap_env_find_methodname(request->env)))
{
- log_verbose2("method: \"%s\"", method);
+ log_verbose("method: \"%s\"", method);
if ((urn = soap_env_find_urn(request->env)))
{
- log_verbose2("urn: \"%s\"", urn);
+ log_verbose("urn: \"%s\"", urn);
if ((uri = soap_addressing_get_to_address(request->env)))
{
- log_verbose2("searching router for \"%s\"", uri->path);
+ log_verbose("searching router for \"%s\"", uri->path);
if ((router = soap_server_find_router(uri->path)))
{
- log_verbose2("router: %p", router);
+ log_verbose("router: %p", router);
if ((service = soap_router_find_service(router, urn, method)))
{
- log_verbose3("service (%p) found, function (%p)", service, service->func);
+ log_verbose("service (%p) found, function (%p)", service, service->func);
switch (service->status)
{
case CSOAP_SERVICE_UP:
@@ -251,14 +251,14 @@ soap_server_init_args(int argc, char **argv)
if ((status = soap_transport_server_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_transport_server_init_args failed (%s)", herror_message(status));
+ log_error("soap_transport_server_init_args failed (%s)", herror_message(status));
return status;
}
#ifdef HAVE_XMLSEC1
if ((status = soap_xmlsec_server_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_xmlsec_server_init_args failed (%s)", herror_message(status));
+ log_error("soap_xmlsec_server_init_args failed (%s)", herror_message(status));
return status;
}
#endif
@@ -279,7 +279,7 @@ soap_server_register_router(struct SoapRouter *router, const char *context)
if ((status = soap_transport_register(context)) != H_OK)
{
- log_error2("soap_transport_register failed (%s)", herror_message(status));
+ log_error("soap_transport_register failed (%s)", herror_message(status));
return status;
}
@@ -322,7 +322,7 @@ soap_server_destroy(void)
while (node != NULL)
{
tmp = node->next;
- log_verbose2("soap_router_free(%p)", node->router);
+ log_verbose("soap_router_free(%p)", node->router);
soap_router_free(node->router);
free(node->context);
free(node);
diff --git a/libcsoap/soap-server.h b/libcsoap/soap-server.h
index a97da1c..f2cebe5 100644
--- a/libcsoap/soap-server.h
+++ b/libcsoap/soap-server.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-server.h,v 1.27 2007/01/25 10:28:30 m0gg Exp $
+ * $Id: soap-server.h,v 1.28 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -279,80 +279,79 @@
*
*/
+/** @file soap-server.h SOAP server interface
+ *
+ * @defgroup CSOAP cSOAP
+ */
+
+/** @defgroup CSOAP_SERVER Server
+ * @ingroup CSOAP */
+/**@{*/
+
+typedef struct _SoapRouterNode
+{
+ char *context;
+ struct SoapRouter *router;
+ struct _SoapRouterNode *next;
+
+} SoapRouterNode;
+
#ifdef __cplusplus
extern "C" {
#endif
-/**
- *
- * Initializes the soap server with commandline arguments.
+/** This function initializes the soap server with commandline
+ * arguments.
*
* @param argc commandline arg count
* @param argv commandline arg vector
*
- * @returns H_OK on success
- *
- * @see httpd_init_args
- * @see udpd_init_args
+ * @return H_OK on success.
*
+ * @see httpd_init_args()
+ * @see udpd_init_args()
*/
herror_t soap_server_init_args(int argc, char **argv);
-/**
+/** This function registers a router to the SOAP server.
*
- * Register a router to the SOAP server.
- *
- * <p><i>scheme</i>://<i>host</i>:<i>port</i>/<b>[context]</b>
+ @verbatim
+ scheme://host:port/[context]
+ @endverbatim
*
* @param router The router to register
* @param context the url context
*
- * @returns H_OK on success
+ * @return H_OK on success.
*
- * @see soap_router_new
- * @see soap_router_register_service
- *
+ * @see soap_router_new()
+ * @see soap_router_register_service()
*/
extern herror_t soap_server_register_router(struct SoapRouter * router, const char *context);
-/**
- *
- * Returns an URI name of the server.
- *
+/** This function returns an URI name of the server.
*/
extern const char *soap_server_get_name(void);
-/**
- *
- * Enters the server loop and starts to listen to incoming requests.
- *
- * @see httpd_run
- * @see udpd_run
- * @see smptd_run
+/** This function enters the server loop and starts to listen to
+ * incoming requests.
*
+ * @see httpd_run()
+ * @see udpd_run()
+ * @see smptd_run()
*/
extern herror_t soap_server_run(void);
-/**
- *
- * Frees the SOAP server.
- *
- * @see httpd_destroy
- * @see udpd_destroy
+/** This function frees the SOAP server.
*
+ * @see httpd_destroy()
+ * @see udpd_destroy()
+ * @see smtpd_destroy()
*/
extern void soap_server_destroy(void);
#ifdef __CSOAP_INTERNAL
-typedef struct _SoapRouterNode
-{
- char *context;
- struct SoapRouter *router;
- struct _SoapRouterNode *next;
-
-} SoapRouterNode;
-
extern struct SoapRouter *soap_server_find_router(const char *context);
extern SoapRouterNode * soap_server_get_routers(void);
@@ -365,4 +364,6 @@ extern herror_t soap_server_process(struct SoapCtx *request, struct SoapCtx **re
}
#endif
+/**@}*/
+
#endif
diff --git a/libcsoap/soap-service.c b/libcsoap/soap-service.c
index b731d76..813ca5b 100644
--- a/libcsoap/soap-service.c
+++ b/libcsoap/soap-service.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-service.c,v 1.13 2006/12/31 17:24:22 m0gg Exp $
+* $Id: soap-service.c,v 1.14 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -49,8 +49,8 @@
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -64,7 +64,7 @@ soap_service_node_new(SoapService * service, SoapServiceNode * next)
if (!(node = (SoapServiceNode *) malloc(sizeof(SoapServiceNode)))) {
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
node->service = service;
@@ -80,7 +80,7 @@ soap_service_new(const char *urn, const char *method, SoapServiceFunc f)
if (!(service = (SoapService *) malloc(sizeof(SoapService)))) {
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
@@ -88,14 +88,14 @@ soap_service_new(const char *urn, const char *method, SoapServiceFunc f)
if (urn == NULL) {
- log_warn1("urn is NULL");
+ log_warn("urn is NULL");
urn = "";
}
service->urn = strdup(urn);
if (method == NULL) {
- log_warn1("method is NULL");
+ log_warn("method is NULL");
method = "";
}
service->method = strdup(method);
diff --git a/libcsoap/soap-transport.c b/libcsoap/soap-transport.c
index 765fa8f..cce1272 100644
--- a/libcsoap/soap-transport.c
+++ b/libcsoap/soap-transport.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-transport.c,v 1.9 2006/12/14 19:36:49 m0gg Exp $
+* $Id: soap-transport.c,v 1.10 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2007 Heiko Ronsdorf
@@ -45,8 +45,8 @@
#include <libxml/uri.h>
#include <nanohttp/nanohttp-error.h>
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-fault.h"
#include "soap-env.h"
#include "soap-ctx.h"
@@ -78,7 +78,7 @@ _soap_transport_new(const char *scheme, void *data, msg_exchange invoke)
if (!(ret = (struct soap_transport *)malloc(sizeof(struct soap_transport))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
@@ -88,7 +88,7 @@ _soap_transport_new(const char *scheme, void *data, msg_exchange invoke)
ret->data = data;
ret->invoke = invoke;
- log_verbose4("scheme=\"%s\", data=%p, invoke=%p", ret->scheme, ret->data, ret->invoke);
+ log_verbose("scheme=\"%s\", data=%p, invoke=%p", ret->scheme, ret->data, ret->invoke);
return ret;
}
@@ -138,19 +138,19 @@ soap_transport_server_init_args(int argc, char **argv)
if ((status = soap_nhttp_server_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_nhttp_server_init_args failed (%s)", herror_message(status));
+ log_error("soap_nhttp_server_init_args failed (%s)", herror_message(status));
return status;
}
if ((status = soap_nudp_server_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_nudp_server_init_args failed (%s)", herror_message(status));
+ log_error("soap_nudp_server_init_args failed (%s)", herror_message(status));
return status;
}
if ((status = _soap_transport_set_name()) != H_OK)
{
- log_error2("_soap_transport_set_name failed (%s)", herror_message(status));
+ log_error("_soap_transport_set_name failed (%s)", herror_message(status));
return status;
}
@@ -164,13 +164,13 @@ soap_transport_register(const void *data)
if ((status = soap_nhttp_register(data)) != H_OK)
{
- log_error2("soap_nhttp_register failed (%s)", herror_message(status));
+ log_error("soap_nhttp_register failed (%s)", herror_message(status));
return status;
}
if ((status = soap_nudp_register(data)) != H_OK)
{
- log_error2("soap_nudp_register failed (%s)", herror_message(status));
+ log_error("soap_nudp_register failed (%s)", herror_message(status));
return status;
}
@@ -185,7 +185,7 @@ soap_transport_add(const char *scheme, void *data, msg_exchange invoke)
if (!(transport = _soap_transport_new(scheme, data, invoke)))
{
- log_error1("_soap_transport_new failed");
+ log_error("_soap_transport_new failed");
return herror_new("soap_transport_add", 0, "_soap_transport_new failed");
}
@@ -209,14 +209,14 @@ soap_transport_server_run(void)
if ((status = soap_nudp_server_run_threaded()) != H_OK)
{
- log_error2("soap_nudp_server_run failed (%s)", herror_message(status));
+ log_error("soap_nudp_server_run failed (%s)", herror_message(status));
return status;
}
/* nanoHTTP blocks in this call */
if ((status = soap_nhttp_server_run()) != H_OK)
{
- log_error2("soap_nhttp_server_run failed (%s)", herror_message(status));
+ log_error("soap_nhttp_server_run failed (%s)", herror_message(status));
return status;
}
@@ -246,19 +246,19 @@ soap_transport_client_init_args(int argc, char **argv)
if ((status = soap_nhttp_client_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_nhttp_client_init_args failed (%s)", herror_message(status));
+ log_error("soap_nhttp_client_init_args failed (%s)", herror_message(status));
return status;
}
if ((status = soap_nudp_client_init_args(argc, argv)) != H_OK)
{
- log_error2("soap_nudp_client_init_args failed (%s)", herror_message(status));
+ log_error("soap_nudp_client_init_args failed (%s)", herror_message(status));
return status;
}
if ((status = _soap_transport_set_name()) != H_OK)
{
- log_error2("_soap_transport_set_name failed (%s)", herror_message(status));
+ log_error("_soap_transport_set_name failed (%s)", herror_message(status));
return status;
}
@@ -272,29 +272,29 @@ soap_transport_client_invoke(struct SoapCtx *request, struct SoapCtx **response)
herror_t ret;
xmlURI *dest;
- /* log_verbose1(__FUNCTION__);
+ /* log_verbose(__FUNCTION__);
xmlDocFormatDump(stdout, request->env->root->doc, 1); */
if (!(dest = soap_addressing_get_to_address(request->env)))
{
- log_verbose1("soap_addressing_get_to_address failed");
+ log_verbose("soap_addressing_get_to_address failed");
return herror_new("soap_transport_client_invoke", 0, "cannot find to address in SOAP envelope");
}
if (!dest->scheme)
{
- log_verbose1("missing scheme (protocol) in to address");
+ log_verbose("missing scheme (protocol) in to address");
return herror_new("soap_transport_client_invoke", 0, "cannot find protocol in destination address");
}
- log_verbose2("trying to contact \"%s\"", soap_addressing_get_to_address_string(request->env));
+ log_verbose("trying to contact \"%s\"", soap_addressing_get_to_address_string(request->env));
for (walker=head; walker; walker=walker->next)
{
- log_verbose3("testing transport server \"%s\" for \"%s\"", walker->scheme, dest->scheme);
+ log_verbose("testing transport server \"%s\" for \"%s\"", walker->scheme, dest->scheme);
if (!strcmp(walker->scheme, dest->scheme))
{
- log_verbose3("found transport layer for \"%s\" (%p)", dest->scheme, walker->invoke);
+ log_verbose("found transport layer for \"%s\" (%p)", dest->scheme, walker->invoke);
ret = walker->invoke(walker->data, request, response);
xmlFreeURI(dest);
return ret;
diff --git a/libcsoap/soap-transport.h b/libcsoap/soap-transport.h
index 5cc3e68..18501fa 100644
--- a/libcsoap/soap-transport.h
+++ b/libcsoap/soap-transport.h
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-transport.h,v 1.2 2006/11/23 15:27:33 m0gg Exp $
+* $Id: soap-transport.h,v 1.3 2007/11/03 22:40:09 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2007 Heiko Ronsdorf
@@ -25,6 +25,10 @@
#define __csoap_transport_h
#ifdef __CSOAP_INTERNAL
+#pragma You should not include this file...
+#endif
+
+#ifdef __CSOAP_INTERNAL
typedef herror_t (*msg_exchange)(void *data, struct SoapCtx *request, struct SoapCtx **response);
#ifdef __cplusplus
diff --git a/libcsoap/soap-xml.c b/libcsoap/soap-xml.c
index f718faf..ffbfbec 100644
--- a/libcsoap/soap-xml.c
+++ b/libcsoap/soap-xml.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-xml.c,v 1.13 2006/11/26 20:13:05 m0gg Exp $
+* $Id: soap-xml.c,v 1.14 2007/11/03 22:40:10 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -26,11 +26,8 @@
#endif
#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
-
-#include <nanohttp/nanohttp-logging.h>
+#include "soap-logging.h"
#include "soap-xml.h"
xmlNodePtr
@@ -40,26 +37,28 @@ soap_xml_get_children(xmlNodePtr node)
if (node == NULL)
{
- log_error1("Invalid node (null)");
+ log_error("Invalid node (null)");
return NULL;
}
for (child = node->children; child; child=child->next)
{
if (child->type == XML_ELEMENT_NODE)
+ {
return child;
+ }
}
return NULL;
}
xmlNodePtr
-soap_xml_get_next(xmlNodePtr param)
+soap_xml_get_next_element(xmlNodePtr param)
{
if (param == NULL)
{
- log_error1("Invalid node (null)");
+ log_error("Invalid node (null)");
return NULL;
}
@@ -76,24 +75,6 @@ soap_xml_get_next(xmlNodePtr param)
return node;
}
-xmlXPathObjectPtr
-soap_xpath_eval(xmlDocPtr doc, const char *xpath)
-{
- xmlXPathContextPtr context;
- xmlXPathObjectPtr result;
-
- context = xmlXPathNewContext(doc);
- result = xmlXPathEvalExpression(BAD_CAST xpath, context);
- if (xmlXPathNodeSetIsEmpty(result->nodesetval))
- {
- /* no result */
- return NULL;
- }
-
- xmlXPathFreeContext(context);
- return result;
-}
-
char *
soap_xml_get_text(xmlNodePtr node)
{
diff --git a/libcsoap/soap-xml.h b/libcsoap/soap-xml.h
index c03c6ea..1136e38 100644
--- a/libcsoap/soap-xml.h
+++ b/libcsoap/soap-xml.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-xml.h,v 1.12 2006/12/03 17:30:57 m0gg Exp $
+ * $Id: soap-xml.h,v 1.13 2007/11/03 22:40:10 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -24,14 +24,21 @@
#ifndef __csoap_xml_h
#define __csoap_xml_h
-/**
- *
- * XML Errors
+/** @file soap-xml.h SOAP XML functions
*
+ * @defgroup CSOAP_XML XML handling
+ * @ingroup CSOAP
+ */
+/**@{*/
+
+/** @defgroup CSOAP_XML_ERRORS XML errors
+ * @ingroup CSOAP_ERRORS
*/
+/**@{*/
#define XML_ERROR 1600
#define XML_ERROR_EMPTY_DOCUMENT (XML_ERROR + 1)
#define XML_ERROR_PARSE (XML_ERROR + 2)
+/**@}*/
static const char * const soap_env_enc = "http://schemas.xmlsoap.org/soap/encoding/";
static const char * const soap_xsi_ns = "http://www.w3.org/1999/XMLSchema-instance";
@@ -42,9 +49,8 @@ extern "C" {
#endif
extern xmlNodePtr soap_xml_get_children(xmlNodePtr param);
-extern xmlNodePtr soap_xml_get_next(xmlNodePtr param);
-extern xmlXPathObjectPtr soap_xpath_eval(xmlDocPtr doc, const char *xpath);
+extern xmlNodePtr soap_xml_get_next_element(xmlNodePtr param);
extern char *soap_xml_get_text(xmlNodePtr node);
@@ -52,4 +58,6 @@ extern char *soap_xml_get_text(xmlNodePtr node);
}
#endif
+/**@}*/
+
#endif
diff --git a/libcsoap/soap-xmlsec.c b/libcsoap/soap-xmlsec.c
index 01e5ae0..df04e28 100644
--- a/libcsoap/soap-xmlsec.c
+++ b/libcsoap/soap-xmlsec.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-xmlsec.c,v 1.8 2006/12/14 19:36:49 m0gg Exp $
+* $Id: soap-xmlsec.c,v 1.9 2007/11/03 22:40:10 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -70,8 +70,6 @@
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlstring.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
#ifndef XMLSEC_NO_XSLT
#include <libxslt/xslt.h>
@@ -85,7 +83,6 @@
#include <xmlsec/crypto.h>
#include <xmlsec/errors.h>
-#include <nanohttp/nanohttp-logging.h>
#include <nanohttp/nanohttp-error.h>
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-stream.h>
@@ -94,6 +91,7 @@
#include <nanohttp/nanohttp-client.h>
#include <nanohttp/nanohttp-server.h>
+#include "soap-logging.h"
#include "soap-env.h"
#include "soap-ctx.h"
#include "soap-service.h"
@@ -115,7 +113,7 @@ static xmlSecKeyPtr _soap_xmlsec_key = NULL;
static void _soap_xmlsec_error_callback(const char *file, int line, const char *func, const char *errorObject, const char *errorSubject, int reason, const char *msg)
{
- log_error5("xmlsec error func=\"%s\" obj=\"%s\" sub=\"%s\" %s", func, errorObject, errorSubject, msg);
+ log_error("xmlsec error func=\"%s\" obj=\"%s\" sub=\"%s\" %s", func, errorObject, errorSubject, msg);
return;
}
@@ -139,7 +137,7 @@ _soap_xmlsec_files_keys_store_find_key(xmlSecKeyStorePtr store, const xmlChar *
xmlURI *uri;
char *file;
- log_verbose2("trying to find key \"%s\"\n", name);
+ log_verbose("trying to find key \"%s\"\n", name);
/*
* it's possible to do not have the key name or desired key type but we could
@@ -205,7 +203,7 @@ _soap_xmlsec_files_keys_store_find_key(xmlSecKeyStorePtr store, const xmlChar *
if ((status = (httpc_get(conn, &res, name))) != H_OK)
{
- log_error2("httpc_get failed (%s)", herror_message(status));
+ log_error("httpc_get failed (%s)", herror_message(status));
herror_release(status);
return NULL;
}
@@ -254,7 +252,7 @@ _soap_xmlsec_files_keys_store_find_key(xmlSecKeyStorePtr store, const xmlChar *
if (unlink(file) < 0)
{
- log_error2("unlink file failed (%s)", strerror(errno));
+ log_error("unlink file failed (%s)", strerror(errno));
}
free(file);
@@ -289,14 +287,14 @@ _soap_xmlsec_create_key_manager(void)
keysStore = xmlSecKeyStoreCreate(_soap_xmlsec_files_keys_store_get_klass());
if (keysStore == NULL)
{
- log_error1("failed to create keys store");
+ log_error("failed to create keys store");
return herror_new("_soap_xmlxec_create_key_manager", XMLSEC_ERROR_KEYSTORE, "failed to create keys store");
}
/* create keys manager */
if ((_soap_xmlsec_key_manager = xmlSecKeysMngrCreate()) == NULL)
{
- log_error1("failed to create keys manager");
+ log_error("failed to create keys manager");
xmlSecKeyStoreDestroy(keysStore);
return herror_new("_soap_xmlsec_key_manager", XMLSEC_ERROR_KEYMANAGER, "failed to create keys manager");
}
@@ -307,7 +305,7 @@ _soap_xmlsec_create_key_manager(void)
*/
if (xmlSecKeysMngrAdoptKeysStore(_soap_xmlsec_key_manager, keysStore) < 0)
{
- log_error1("failed to add keys store to keys manager");
+ log_error("failed to add keys store to keys manager");
xmlSecKeyStoreDestroy(keysStore);
xmlSecKeysMngrDestroy(_soap_xmlsec_key_manager);
_soap_xmlsec_key_manager = NULL;
@@ -317,7 +315,7 @@ _soap_xmlsec_create_key_manager(void)
/* initialize crypto library specific data in keys manager */
if (xmlSecCryptoKeysMngrInit(_soap_xmlsec_key_manager) < 0)
{
- log_error1("failed to initialize crypto data in keys manager");
+ log_error("failed to initialize crypto data in keys manager");
xmlSecKeysMngrDestroy(_soap_xmlsec_key_manager);
_soap_xmlsec_key_manager = NULL;
return herror_new("_soap_xmlsec_create_key_manager", XMLSEC_ERROR_KEYMANAGER, "failed to initialize crypto data in keys manager");
@@ -337,7 +335,7 @@ _soap_xmlsec_load_key(void)
if ((_soap_xmlsec_key = xmlSecCryptoAppKeyLoad(_soap_xmlsec_keyfile, xmlSecKeyDataFormatPem, _soap_xmlsec_password, NULL, NULL)) == NULL)
{
- log_error2("xmlSecCryptoAppKeyLoad(\"%s\") failed", _soap_xmlsec_keyfile);
+ log_error("xmlSecCryptoAppKeyLoad(\"%s\") failed", _soap_xmlsec_keyfile);
return herror_new("_soap_xmlsec_load_key", XMLSEC_ERROR_KEY, "xmlSecCryptoAppKeyLoad(\"%s\") failed", _soap_xmlsec_keyfile);
}
@@ -345,18 +343,18 @@ _soap_xmlsec_load_key(void)
{
if (xmlSecCryptoAppKeyCertLoad(_soap_xmlsec_key, _soap_xmlsec_certfile, xmlSecKeyDataFormatPem) < 0)
{
- log_error2("xmlSecCryptoAppKeyCertLoad(\"%s\") failed", _soap_xmlsec_certfile);
+ log_error("xmlSecCryptoAppKeyCertLoad(\"%s\") failed", _soap_xmlsec_certfile);
xmlSecKeyDestroy(_soap_xmlsec_key);
return herror_new("_soap_xmlsec_load_key", XMLSEC_ERROR_CERTIFICATE, "xmlSecCryptoAppKeyCertLoad(\"%s\") failed", _soap_xmlsec_certfile);
}
}
xmlStrPrintf(keyName, 256, "%s/key.pem", soap_server_get_name());
- log_error2("keyName is \"%s\"", keyName);
+ log_error("keyName is \"%s\"", keyName);
if ((err = xmlSecKeySetName(_soap_xmlsec_key, keyName)) < 0)
{
xmlSecKeyDestroy(_soap_xmlsec_key);
- log_error3("xmlSecKeySetName(\"%s\") failed (%i)", keyName, err);
+ log_error("xmlSecKeySetName(\"%s\") failed (%i)", keyName, err);
return herror_new("_soap_xmlsec_load_key", XMLSEC_ERROR_KEY, "xmlSecKeySetName(\"%s\") failed (%i)", keyName, err);
}
@@ -397,7 +395,7 @@ _soap_xmlsec_publish_key(void)
if ((status = httpd_register("/key.pem", _soap_xmlsec_key_service)) != H_OK)
{
- log_error2("Cannot register key service (%s)", herror_message(status));
+ log_error("Cannot register key service (%s)", herror_message(status));
return status;
}
@@ -441,59 +439,59 @@ _soap_xmlsec_init(void)
if (initialized)
return H_OK;
- log_info1("initializing xmlsec1");
+ log_info("initializing xmlsec1");
xmlSecErrorsDefaultCallbackEnableOutput(1);
xmlSecErrorsSetCallback(_soap_xmlsec_error_callback);
if (xmlSecInit() < 0)
{
- log_error1("xmlSecInit failed");
+ log_error("xmlSecInit failed");
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_INIT, "xmlSecInit failed");
}
if (xmlSecCheckVersion() != 1)
{
- log_error1("xmlSecCheckVersion failed, wrong xmlsec version");
+ log_error("xmlSecCheckVersion failed, wrong xmlsec version");
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_VERSION, "Wrong xmlsec version");
}
#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
- log_verbose2("loading \"%s\" dynamic", XMLSEC_CRYPTO);
+ log_verbose("loading \"%s\" dynamic", XMLSEC_CRYPTO);
if (xmlSecCryptoDLLoadLibrary(BAD_CAST XMLSEC_CRYPTO) < 0)
{
- log_error1("xmlSecCryptoDLLoadLibrary failed");
+ log_error("xmlSecCryptoDLLoadLibrary failed");
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_DLLOAD, "xmlSecCryptoDLLoadLibrary failed");
}
#endif
if (xmlSecCryptoAppInit(NULL) < 0)
{
- log_error1("xmlSecCryptoAppInit failed");
+ log_error("xmlSecCryptoAppInit failed");
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_INIT, "xmlSecCryptoAppInit failed");
}
if (xmlSecCryptoInit() < 0)
{
- log_error1("xmlSecCryptoInit failed");
+ log_error("xmlSecCryptoInit failed");
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_INIT, "xmlSecCryptoInit failed");
}
if ((status = _soap_xmlsec_create_key_manager()) != H_OK)
{
- log_error2("_soap_xmlsec_create_key_manager failed (%s)", herror_message(status));
+ log_error("_soap_xmlsec_create_key_manager failed (%s)", herror_message(status));
return status;
}
if ((err = pthread_mutex_init(&_soap_xmlsec_lock, NULL)) < 0)
{
- log_error2("pthread_mutex_init failed (%s)", strerror(err));
+ log_error("pthread_mutex_init failed (%s)", strerror(err));
return herror_new("soap_xmlsec_init", XMLSEC_ERROR_INIT, "pthread_mutex_init failed (%s)", strerror(err));
}
if ((status = _soap_xmlsec_load_key()) != H_OK)
{
- log_error2("_soap_xmlsec_load_key failed (%s)", herror_message(status));
+ log_error("_soap_xmlsec_load_key failed (%s)", herror_message(status));
return status;
}
@@ -525,13 +523,13 @@ soap_xmlsec_server_init_args(int argc, char **argv)
if ((status = _soap_xmlsec_init()) != H_OK)
{
- log_error2("_soap_xmlsec_init failed (%s)", herror_message(status));
+ log_error("_soap_xmlsec_init failed (%s)", herror_message(status));
return status;
}
if ((status = _soap_xmlsec_publish_key()) != H_OK)
{
- log_error2("_soap_xmlsec_publish_key failed (%s)", herror_message(status));
+ log_error("_soap_xmlsec_publish_key failed (%s)", herror_message(status));
return status;
}
@@ -560,7 +558,7 @@ herror_t soap_xmlsec_sign(struct SoapCtx *context)
if (!(signNode = xmlSecTmplSignatureCreate(envelope->root->doc, xmlSecTransformExclC14NId, xmlSecTransformRsaSha1Id, NULL)))
{
- log_error1("xmlSecTmplSignatureCreate failed");
+ log_error("xmlSecTmplSignatureCreate failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN_INIT, "xmlSecTmplSignatureCreate failed");
goto out;
}
@@ -578,28 +576,28 @@ herror_t soap_xmlsec_sign(struct SoapCtx *context)
if (!(refNode = xmlSecTmplSignatureAddReference(signNode, xmlSecTransformSha1Id, "#Body", NULL, NULL)))
{
- log_error1("xmlSecTmplSignatureAddReference failed");
+ log_error("xmlSecTmplSignatureAddReference failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN_INIT, "xmlSecTmplSignatureAddReference failed");
goto out;
}
if (!(keyInfoNode = xmlSecTmplSignatureEnsureKeyInfo(signNode, NULL)))
{
- log_error1("xmlSecTmplSignatureEnsureKeyInfo failed");
+ log_error("xmlSecTmplSignatureEnsureKeyInfo failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN_INIT, "xmlSecTmplSignatureEnsureKeyInfo failed");
goto out;
}
if (xmlSecTmplKeyInfoAddKeyName(keyInfoNode, soap_server_get_name()) == NULL)
{
- log_error1("xmlSecTmplKeyInfoAddKeyName failed");
+ log_error("xmlSecTmplKeyInfoAddKeyName failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN_INIT, "xmlSecTmplKeyInfoAddKeyName failed");
goto out;
}
if (!(dsigCtx = xmlSecDSigCtxCreate(_soap_xmlsec_key_manager)))
{
- log_error1("xmlSecDSigCtxCreate failed");
+ log_error("xmlSecDSigCtxCreate failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN_INIT, "xmlSecDSigCtxCreate failed");
goto out;
}
@@ -608,7 +606,7 @@ herror_t soap_xmlsec_sign(struct SoapCtx *context)
if (xmlSecDSigCtxSign(dsigCtx, signNode) < 0)
{
- log_error1("xmlSecDSigCtxSign failed");
+ log_error("xmlSecDSigCtxSign failed");
ret = herror_new("soap_xmlsec_sign", XMLSEC_ERROR_SIGN, "xmlSecDSigCtxSign failed");
goto out;
}
@@ -651,14 +649,14 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
encDataNode = xmlSecTmplEncDataCreate(doc, xmlSecTransformDes3CbcId, NULL, xmlSecTypeEncElement, NULL, NULL);
if (encDataNode == NULL)
{
- log_error1("xmlSecTmplEnvDataCreate failed");
+ log_error("xmlSecTmplEnvDataCreate failed");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "xmlSecTmplEnvDataCreate failed");
goto out;
}
if (xmlSecTmplEncDataEnsureCipherValue(encDataNode) == NULL)
{
- log_error1("failed to add CipherValue node");
+ log_error("failed to add CipherValue node");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add CipherValue node");
goto out;
}
@@ -666,7 +664,7 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
keyInfoNode = xmlSecTmplEncDataEnsureKeyInfo(encDataNode, NULL);
if (keyInfoNode == NULL)
{
- log_error1("failed to add KeyInfo node");
+ log_error("failed to add KeyInfo node");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add KeyInfo node");
goto out;
}
@@ -674,14 +672,14 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
encKeyNode = xmlSecTmplKeyInfoAddEncryptedKey(keyInfoNode, xmlSecTransformRsaOaepId, NULL, NULL, NULL);
if (encKeyNode == NULL)
{
- log_error1("failed to add KeyInfo");
+ log_error("failed to add KeyInfo");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add KeyInfo");
goto out;
}
if (xmlSecTmplEncDataEnsureCipherValue(encKeyNode) == NULL)
{
- log_error1("failed to add CipherValue node");
+ log_error("failed to add CipherValue node");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add CipherValue node");
goto out;
}
@@ -689,24 +687,24 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
keyInfoNode2 = xmlSecTmplEncDataEnsureKeyInfo(encKeyNode, NULL);
if (keyInfoNode2 == NULL)
{
- log_error1("failed to add key info (2)\n");
+ log_error("failed to add key info (2)\n");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add key info (2)");
goto out;
}
if (!(to = soap_addressing_get_to_address(envelope)))
{
- log_error1("cannot get to address");
+ log_error("cannot get to address");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT, "cannot get to address");
goto out;
}
xmlStrPrintf(buf, 256, "http://%s:%i/key.pem", to->server, to->port);
- log_error2("adding key \"%s\"", buf);
+ log_error("adding key \"%s\"", buf);
xmlFreeURI(to);
if (xmlSecTmplKeyInfoAddKeyName(keyInfoNode2, buf) == NULL)
{
- log_error2("failed to add key name \"%s\"", buf);
+ log_error("failed to add key name \"%s\"", buf);
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to add key name \"%s\"", buf);
goto out;
}
@@ -714,7 +712,7 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
encCtx = xmlSecEncCtxCreate(_soap_xmlsec_key_manager);
if (encCtx == NULL)
{
- log_error1("failed to create encryption context");
+ log_error("failed to create encryption context");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to create encryption context");
goto out;
}
@@ -722,7 +720,7 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
encCtx->encKey = xmlSecKeyGenerate(xmlSecKeyDataDesId, 192, xmlSecKeyDataTypeSession);
if (encCtx->encKey == NULL)
{
- log_error1("failed to generate session key");
+ log_error("failed to generate session key");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT_INIT, "failed to generate session key");
goto out;
}
@@ -733,7 +731,7 @@ herror_t soap_xmlsec_encrypt(struct SoapCtx *context)
if (xmlSecEncCtxXmlEncrypt(encCtx, encDataNode, soap_env_get_method(envelope)) < 0)
{
- log_error1("encryption failed");
+ log_error("encryption failed");
ret = herror_new("soap_xmlsec_encrypt", XMLSEC_ERROR_ENCRYPT, "encryption failed");
goto out;
}
@@ -772,19 +770,19 @@ herror_t soap_xmlsec_decrypt(struct SoapCtx *context)
if (!(method = soap_env_get_method(envelope)))
{
- log_error1("cannot find messages method");
+ log_error("cannot find messages method");
return herror_new("soap_xmlsec_decrypt", 0, "cannot find message method");
}
if (xmlStrcmp(method->name, BAD_CAST "EncryptedData"))
{
- log_error2("message doesn't contain encrypted data (%s)", method->name);
+ log_error("message doesn't contain encrypted data (%s)", method->name);
return H_OK;
}
if (xmlStrcmp(method->ns->href, "http://www.w3.org/2001/04/xmlenc#"))
{
- log_error2("message encryption isn't understood (%s)", method->ns->href);
+ log_error("message encryption isn't understood (%s)", method->ns->href);
return herror_new("soap_xmlsec_decrypt", 0, "message encryption isn't understood (%s)", method->ns->href);
}
@@ -794,7 +792,7 @@ herror_t soap_xmlsec_decrypt(struct SoapCtx *context)
node = xmlSecFindNode(envelope->root, xmlSecNodeEncryptedData, xmlSecEncNs);
if (node == NULL)
{
- log_error1("start node not found");
+ log_error("start node not found");
ret = herror_new("soap_xmlsec_decrypt", 0, "start node not found");
goto done;
}
@@ -803,7 +801,7 @@ herror_t soap_xmlsec_decrypt(struct SoapCtx *context)
encCtx = xmlSecEncCtxCreate(_soap_xmlsec_key_manager);
if (encCtx == NULL)
{
- log_error1("failed to create encryption context");
+ log_error("failed to create encryption context");
ret = herror_new("soap_xmlsec_decrypt", 0, "failed to create encryption context");
goto done;
}
@@ -811,7 +809,7 @@ herror_t soap_xmlsec_decrypt(struct SoapCtx *context)
/* decrypt the data */
if ((xmlSecEncCtxDecrypt(encCtx, node) < 0) || (encCtx->result == NULL))
{
- log_error1("decryption failed");
+ log_error("decryption failed");
ret = herror_new("soap_xmlsec_decrypt", 0, "decryption failed");
goto done;
}
@@ -855,7 +853,7 @@ herror_t soap_xmlsec_verify(struct SoapCtx *context)
if (!envelope->header)
{
- log_error1("message doesn't contain a SOAP header");
+ log_error("message doesn't contain a SOAP header");
return herror_new("soap_xmlsec_verify", 0, "message doesn't contain a SOAP header");
}
@@ -873,20 +871,20 @@ herror_t soap_xmlsec_verify(struct SoapCtx *context)
node = xmlSecFindNode(envelope->root, xmlSecNodeSignature, xmlSecDSigNs);
if (node == NULL)
{
- log_error1("cannot find message signature");
+ log_error("cannot find message signature");
return herror_new("soap_xmlsec_verify", 0, "message signature wasn't found");
}
dsigCtx = xmlSecDSigCtxCreate(_soap_xmlsec_key_manager);
if (dsigCtx == NULL)
{
- log_error1("cannot create signature context");
+ log_error("cannot create signature context");
return herror_new("soap_xmlsec_verify", 0, "cannot create signatur context");
}
if (xmlSecDSigCtxVerify(dsigCtx, node) < 0)
{
- log_error1("xmlsecDSigCtxVerify failed");
+ log_error("xmlsecDSigCtxVerify failed");
return herror_new("soap_xmlsec_verify", 0, "verification failed");
}
@@ -896,13 +894,13 @@ herror_t soap_xmlsec_verify(struct SoapCtx *context)
}
else
{
- log_error1("signature invalid");
+ log_error("signature invalid");
return herror_new("soap_xmlsec_verify", 0, "signature invalid");
}
}
else
{
- log_error2("message signature isn't understood (%s)", walker->ns->href);
+ log_error("message signature isn't understood (%s)", walker->ns->href);
return herror_new("soap_xmlsec_verify", 0, "message signature isn't understood (%s)", walker->ns->href);
}
}
diff --git a/libcsoap/soap-xmlsec.h b/libcsoap/soap-xmlsec.h
index 2952368..89b00e7 100644
--- a/libcsoap/soap-xmlsec.h
+++ b/libcsoap/soap-xmlsec.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: soap-xmlsec.h,v 1.9 2007/01/25 10:28:30 m0gg Exp $
+ * $Id: soap-xmlsec.h,v 1.10 2007/11/03 22:40:10 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2006 Heiko Ronsdorf
@@ -49,57 +49,48 @@
*
* @see nanohttp_ssl_page
* @see http://www.aleksey.com/xmlsec/
- *
*/
-/** @file
+/** @file soap-xmlsec.h xmlsec wrapper
+ *
+ * @defgroup CSOAP_WSS Web Service Security
+ * @ingroup CSOAP
*
* @section soap_wss_sec Web Services Security
*
* This module is implemented using the xmlsec1 library.
*
* @author H. Ronsdorf
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*
* @see http://www.w3.org/TR/SOAP-dsig/
* @see http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss
* @see http://www.aleksey.com/xmlsec/
- *
*/
+/**@{*/
#define SOAP_SECURITY_NAMESPACE "http://schemas.xmlsoap.org/soap/security/2000-12"
#define SOAP_SECURITY_PREFIX "SOAP-SEC"
-/**
- *
- * Commandline argument to enable WS-Security.
- *
+/** Commandline argument to enable WS-Security.
*/
#define CSOAP_ENABLE_XMLSEC "-CSOAPxmlsec"
-/**
- *
- * Commandline argument to set the keyfile. If this argument is not specified, a
- * random key will be used.
- *
+/** Commandline argument to set the keyfile. If this argument is not
+ * specified, a random key will be used.
*/
#define CSOAP_XMLSEC_KEYFILE "-CSOAPkeyfile"
-/**
- *
- * Commandline argument to set the password of the key.
- *
+/** Commandline argument to set the password of the key.
*/
#define CSOAP_XMLSEC_PASSWORD "-CSOAPpassword"
-/**
- *
- * Commandline argument to set a file of certificates.
- *
+/** Commandline argument to set a file of certificates.
*/
#define CSOAP_XMLSEC_CERTFILE "-CSOAPcertfile"
-/** @defgroup xmlsec_errors XML-security errors
+/** @defgroup CSOAP_XMLSEC_ERRORS XML-security errors
+ * @ingroup CSOAP_ERRORS
*
* Various errors related to XML-security
*
@@ -124,123 +115,116 @@
extern "C" {
#endif
-/**
- *
- * Initializes the WS-Security subsystem.
+/** This function initializes the WS-Security subsystem for a SOAP
+ * server.
*
* @param argc commandline arg count
* @param argv commandline arg vector
*
- * @return H_OK on success
+ * @return H_OK on success.
*
+ * @see soap_xmlsec_destroy()
*/
extern herror_t soap_xmlsec_server_init_args(int argc, char **argv);
-/**
- *
- * Initializes the WS-Security subsystem.
+/** This function initializes the WS-Security subsystem for a SOAP
+ * client.
*
* @param argc commandline arg count
* @param argv commandline arg vector
*
- * @return H_OK on success
+ * @return H_OK on success.
*
+ * @see soap_xmlsec_destroy()
*/
extern herror_t soap_xmlsec_client_init_args(int argc, char **argv);
-/**
- *
- * Sign a XML document contained in a SOAP Envelope with the key specified on
- * the commandline. Our way to create a <SOAP-SEC:Signature> header entry is as
- * follows:
- *
- * - Prepare the target SOAP Envelope with the body and necessary headers.
- * - Create a template of a <ds:Signature> element. The template is assumed to
- * contain empty contents for <ds:DigestValue> or <ds:SignatureValue> elements,
- * but contains appropriate values for the elements such as
- * <ds:SignatureMethod> and <ds:Reference> required to calculate them.
- * - Create a new header entry <SOAP-SEC:Signature> and add the template to this
- * entry.
+/** This function signs an XML document contained in a SOAP Envelope
+ * with the key specified on the commandline. Our way to create a
+ * <SOAP-SEC:Signature> header entry is as follows:
+ *
+ * - Prepare the target SOAP Envelope with the body and necessary
+ * headers.
+ * - Create a template of a <ds:Signature> element. The template is
+ * assumed to contain empty contents for <ds:DigestValue> or
+ * <ds:SignatureValue> elements, but contains appropriate values for
+ * the elements such as <ds:SignatureMethod> and <ds:Reference>
+ * required to calculate them.
+ * - Create a new header entry <SOAP-SEC:Signature> and add the
+ * template to this entry.
* - Add the header entry <SOAP-SEC:Signature> to the SOAP Header.
- * - Add the SOAP "actor" and "mustUnderstand" attributes to the entry, if
- * necessary.
- * - Calculate the <ds:DigestValue> and <ds:SignatureValue> elements according
- * to the core generation of the XML-Signature specification.
- *
- * XPath filtering can be used to specify objects to be signed, as described in
- * the XML-Signature specification. However, since the SOAP message exchange
- * model allows intermediate applications to modify the Envelope (add or delete
- * a header entry, for example), XPath filtering does not always result in the
- * same objects after message delivery. Care should be taken in using XPath
- * filtering so that there is no subsequent validation failure due to such
- * modifications.
- *
- * The transform http://www.w3.org/2000/09/xmldsig#enveloped-signature defined
- * in the XML-Signature specification may be useful when signing the entire
- * Envelope including other header entries, if any.
+ * - Add the SOAP "actor" and "mustUnderstand" attributes to the entry,
+ * if necessary.
+ * - Calculate the <ds:DigestValue> and <ds:SignatureValue> elements
+ * according to the core generation of the XML-Signature specification.
+ *
+ * XPath filtering can be used to specify objects to be signed, as
+ * described in the XML-Signature specification. However, since the SOAP
+ * message exchange model allows intermediate applications to modify the
+ * Envelope (add or delete a header entry, for example), XPath filtering
+ * does not always result in the same objects after message delivery.
+ * Care should be taken in using XPath filtering so that there is no
+ * subsequent validation failure due to such modifications.
+ *
+ * The transform http://www.w3.org/2000/09/xmldsig#enveloped-signature
+ * defined in the XML-Signature specification may be useful when
+ * signing the entire Envelope including other header entries, if any.
*
* @param context The SOAP context to be signed.
*
- * @return H_OK on success
+ * @return H_OK on success.
*
* @see http://www.w3.org/TR/SOAP-dsig/
* @see http://www.w3.org/TR/xmldsig-core/
- *
*/
extern herror_t soap_xmlsec_sign(struct SoapCtx *context);
-/**
- *
- * Verify a XML documents signature contained in a SOAP Envelope. The validation
- * of a <SOAP-SEC:Signature> header entry fails if:
- *
- * - The syntax of the content of the header entry does not conform to SOAP
- * Security Extensions: Digital Signature specification, or
- * - The validation of the signature contained in the header entry fails
- * according to the core validation of the XML-Signature specification, or
- * - The receiving application program rejects the signature for some reason
- * (e.g., the signature is created by an untrusted key).
- *
- * If the validation of the signature header entry fails, applications MAY report
- * the failure to the sender. It is out of the scope of this library how to deal
- * with it.
+/** This function verifies an XML documents signature contained in a
+ * SOAP Envelope. The validation of a <SOAP-SEC:Signature> header entry
+ * fails if:
+ * - The syntax of the content of the header entry does not conform to
+ * SOAP Security Extensions: Digital Signature specification, or
+ * - the validation of the signature contained in the header entry fails
+ * according to the core validation of the XML-Signature
+ * specification, or
+ * - the receiving application program rejects the signature for some
+ * reason (e.g., the signature is created by an untrusted key).
+ *
+ * If the validation of the signature header entry fails, applications
+ * MAY report the failure to the sender. It is out of the scope of this
+ * library how to deal with it.
*
* @param context The SOAP context to be verified.
*
- * @return H_OK on success
+ * @return H_OK on success.
*
* @see http://www.w3.org/TR/SOAP-dsig/
* @see http://www.w3.org/TR/xmldsig-core/
- *
*/
extern herror_t soap_xmlsec_verify(struct SoapCtx *context);
-/**
- *
- * Encrypt a XML document contained in a SOAP envelope.
+/** This function encrypts an XML document contained in a SOAP
+ * envelope.
*
* @param context The SOAP context to be encrypted.
*
- * @return H_OK on success
- *
+ * @return H_OK on success.
*/
extern herror_t soap_xmlsec_encrypt(struct SoapCtx *context);
-/**
- *
- * Decrupt a XML document contained in a SOAP envelope.
+/** This function decrypts an XML document contained in a SOAP
+ * envelope.
*
* @param context The SOAP context to be decrypted.
*
- * @return H_OK on success
- *
+ * @return H_OK on success.
*/
extern herror_t soap_xmlsec_decrypt(struct SoapCtx *context);
-/**
- *
- * Frees the resources needed by the XML security subsystem.
+/** This function frees the resources needed by the XML security
+ * subsystem.
*
+ * @see soap_xmlsec_init()
*/
extern void soap_xmlsec_destroy(void);
@@ -248,4 +232,6 @@ extern void soap_xmlsec_destroy(void);
}
#endif
+/**@}*/
+
#endif