diff options
author | m0gg | 2007-01-01 18:58:05 +0000 |
---|---|---|
committer | m0gg | 2007-01-01 18:58:05 +0000 |
commit | 23629635c0d544c4fbbc0bd5d01dd75413942a3f (patch) | |
tree | 1a4dfb3e289e05f5eea6daff090a69a03ee9f122 /libcsoap | |
parent | fbfd56fb7c1ce480d15682652d9c5f43aa16e0b1 (diff) | |
download | csoap-23629635c0d544c4fbbc0bd5d01dd75413942a3f.tar.gz csoap-23629635c0d544c4fbbc0bd5d01dd75413942a3f.tar.bz2 |
WSDL via HTTP GET re-enabled
Diffstat (limited to 'libcsoap')
-rw-r--r-- | libcsoap/soap-nhttp.c | 30 | ||||
-rw-r--r-- | libcsoap/soap-server.h | 33 |
2 files changed, 45 insertions, 18 deletions
diff --git a/libcsoap/soap-nhttp.c b/libcsoap/soap-nhttp.c index d43de46..833b78f 100644 --- a/libcsoap/soap-nhttp.c +++ b/libcsoap/soap-nhttp.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: soap-nhttp.c,v 1.11 2006/12/16 16:09:45 m0gg Exp $ +* $Id: soap-nhttp.c,v 1.12 2007/01/01 18:58:05 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -59,6 +59,8 @@ #include "soap-transport.h" #include "soap-addressing.h" #include "soap-xml.h" +#include "soap-router.h" +#include "soap-server.h" #include "soap-admin.h" #include "soap-wsil.h" @@ -146,25 +148,21 @@ soap_nhttp_process(httpd_conn_t * conn, struct hrequest_t * req) struct SoapCtx *response; herror_t err; - /* if (req->method == HTTP_REQUEST_GET && router->wsdl) + if (req->method == HTTP_REQUEST_GET) { - _soap_nhttp_send_document(conn, router->wsdl); - return; - } */ + struct SoapRouter *router; + + router = soap_server_find_router(req->path); + if (router && router->description) + { + _soap_nhttp_send_document(conn, router->description); + return; + } + } if (req->method != HTTP_REQUEST_POST) { - 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>I only speak with 'POST' method.</div>" - "</body>" - "</html>"); + httpd_send_not_implemented(conn, "I only speak with 'POST' method."); return; } diff --git a/libcsoap/soap-server.h b/libcsoap/soap-server.h index 2b3d9c0..359458d 100644 --- a/libcsoap/soap-server.h +++ b/libcsoap/soap-server.h @@ -1,5 +1,5 @@ /****************************************************************** - * $Id: soap-server.h,v 1.24 2006/12/13 08:18:53 m0gg Exp $ + * $Id: soap-server.h,v 1.25 2007/01/01 18:58:05 m0gg Exp $ * * CSOAP Project: A SOAP client/server library in C * Copyright (C) 2003 Ferhat Ayaz @@ -113,7 +113,22 @@ /** @page csoap_page cSOAP * - * T.B.D. + * @section csoap_sec cSOAP + * + * cSOAP is a C-based implementation of the Simple Object Access Protocol (SOAP) + * version 1.1. + * + * SOAP is a lightweight protocol for exchange of information in a decentralized, + * distributed environment. It is an XML based protocol that consists of three + * parts: + * - an envelope that defines a framework for describing what is in a message and + * how to process it, + * - a set of encoding rules for expressing instances of application-defined + * datatypes, + * - and a convention for representing remote procedure calls and responses. + * SOAP can potentially be used in combination with a variety of other protocols; + * however, the only bindings defined in this document describe how to use SOAP + * in combination with HTTP and HTTP Extension Framework. * * @section soap_howto_sec HOWTOs and coding examples * @@ -121,6 +136,16 @@ * - @subpage csoap_server_page * - @subpage csoap_mime_page * + * @version 1.2 + * + * @author Ferhat Ayaz + * @author Michael Rans + * @author Matt Campbell + * @author Heiko Ronsdorf + * + * @see http://www.w3.org/TR/soap/ + * @see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ + * */ /** @page csoap_server_page Howto write a SOAP server @@ -137,6 +162,10 @@ * @section soap_server_init_sec Server initialization * * @code + * static const char const *url = "/csoapserver"; + * static const char const *urn = "urn:examples"; + * static const char const *method = "sayHello"; + * * int main(int argc, char **argv) * { * herror_t err; |