diff options
Diffstat (limited to 'libcsoap')
-rw-r--r-- | libcsoap/soap-client.c | 4 | ||||
-rw-r--r-- | libcsoap/soap-env.c | 20 | ||||
-rw-r--r-- | libcsoap/soap-env.h | 4 | ||||
-rw-r--r-- | libcsoap/soap-xml.c | 8 | ||||
-rw-r--r-- | libcsoap/soap-xml.h | 6 |
5 files changed, 31 insertions, 11 deletions
diff --git a/libcsoap/soap-client.c b/libcsoap/soap-client.c index f9e964f..39b001d 100644 --- a/libcsoap/soap-client.c +++ b/libcsoap/soap-client.c @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-client.c,v 1.1 2004/02/03 08:10:05 snowdrop Exp $ + * $Id: soap-client.c,v 1.2 2004/02/03 08:59:22 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -46,7 +46,7 @@ soap_client_invoke(SoapEnv *call, const char *url, const char *soap_action) /* Create buffer */ buffer = xmlBufferCreate(); - xmlNodeDump(buffer, call->root->doc,call->root, 1 ,2); + xmlNodeDump(buffer, call->root->doc,call->root, 1 ,0); content = (char*)xmlBufferContent(buffer); /* Transport via HTTP */ diff --git a/libcsoap/soap-env.c b/libcsoap/soap-env.c index f7c1449..265295b 100644 --- a/libcsoap/soap-env.c +++ b/libcsoap/soap-env.c @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-env.c,v 1.1 2004/02/03 08:10:05 snowdrop Exp $ + * $Id: soap-env.c,v 1.2 2004/02/03 08:59:22 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -280,6 +280,24 @@ soap_env_get_body(SoapEnv* env) xmlNodePtr +soap_env_get_method(SoapEnv* env) +{ + + xmlNodePtr body; + + body = soap_env_get_body(env); + if (body == NULL) { + log_verbose1("body is NULL"); + return NULL; + } + + /* mehtod is the first child */ + return soap_xml_get_children(body); + +} + + +xmlNodePtr _soap_env_get_body(SoapEnv* env) { xmlNodePtr node, body; diff --git a/libcsoap/soap-env.h b/libcsoap/soap-env.h index af969f3..e89f7b4 100644 --- a/libcsoap/soap-env.h +++ b/libcsoap/soap-env.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-env.h,v 1.1 2004/02/03 08:10:05 snowdrop Exp $ + * $Id: soap-env.h,v 1.2 2004/02/03 08:59:22 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -62,6 +62,8 @@ soap_env_pop_item(SoapEnv* env); xmlNodePtr soap_env_get_body(SoapEnv* env); xmlNodePtr +soap_env_get_method(SoapEnv* env); +xmlNodePtr soap_env_get_fault(SoapEnv* env); xmlNodePtr soap_env_get_header(SoapEnv* env); diff --git a/libcsoap/soap-xml.c b/libcsoap/soap-xml.c index 1fd23a1..cbedddd 100644 --- a/libcsoap/soap-xml.c +++ b/libcsoap/soap-xml.c @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-xml.c,v 1.2 2004/02/03 08:07:36 snowdrop Exp $ + * $Id: soap-xml.c,v 1.3 2004/02/03 08:59:22 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -78,7 +78,7 @@ soap_xpath_eval(xmlDocPtr doc, const char *xpath) int soap_xpath_foreach(xmlDocPtr doc, const char *xpath, - soap_xmlnode_callback cb) + soap_xmlnode_callback cb, void *userdata) { int i = 0; xmlNodeSetPtr nodeset; @@ -92,7 +92,7 @@ soap_xpath_foreach(xmlDocPtr doc, const char *xpath, if (!nodeset) return 0; for (i=0;i < nodeset->nodeNr; i++) { - if (!cb(nodeset->nodeTab[i])) + if (!cb(nodeset->nodeTab[i], userdata)) break; } @@ -119,7 +119,7 @@ void soap_xml_doc_print(xmlDocPtr doc) buffer = xmlBufferCreate(); - xmlNodeDump(buffer, doc, root, 1 ,1); + xmlNodeDump(buffer, doc, root, 1 ,0); puts( (const char*)xmlBufferContent(buffer)); xmlBufferFree(buffer); diff --git a/libcsoap/soap-xml.h b/libcsoap/soap-xml.h index e4ce1ef..7976a42 100644 --- a/libcsoap/soap-xml.h +++ b/libcsoap/soap-xml.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-xml.h,v 1.2 2004/02/03 08:07:36 snowdrop Exp $ + * $Id: soap-xml.h,v 1.3 2004/02/03 08:59:22 snowdrop Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -28,7 +28,7 @@ #include <nanohttp/nanohttp-common.h> -typedef int (*soap_xmlnode_callback)(xmlNodePtr); +typedef int (*soap_xmlnode_callback)(xmlNodePtr, void*); xmlNodePtr soap_xml_get_children(xmlNodePtr param); @@ -39,7 +39,7 @@ soap_xpath_eval(xmlDocPtr doc, const char *xpath); int soap_xpath_foreach(xmlDocPtr doc, const char *xpath, - soap_xmlnode_callback cb); + soap_xmlnode_callback cb, void* userdata); void soap_xml_doc_print(xmlDocPtr doc); |