Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
SOAP.h File Reference
#include "Stroika/Frameworks/StroikaPreComp.h"
#include <functional>
#include <stdexcept>
#include "Stroika/Foundation/Characters/String.h"
#include "Stroika/Foundation/Common/KeyValuePair.h"
#include "Stroika/Foundation/Containers/Sequence.h"
#include "Stroika/Foundation/DataExchange/InternetMediaType.h"
#include "Stroika/Foundation/DataExchange/XML/Schema.h"
#include "Stroika/Foundation/Execution/Exceptions.h"
#include "Stroika/Foundation/IO/Network/Transfer/Connection.h"
#include "Stroika/Foundation/IO/Network/URI.h"
#include "Stroika/Foundation/Memory/BLOB.h"
#include "Stroika/Frameworks/WebServer/Message.h"

Go to the source code of this file.

Classes

struct  Stroika::Frameworks::WebService::SOAP::Request
 A call of a method (section 7.1): the Body's one element, named the method, in its namespace - its in arguments its elements. More...
 
struct  Stroika::Frameworks::WebService::SOAP::Response
 A call's answer, the method having been done (section 7.1): the Body's one element, named the method then Response. More...
 
struct  Stroika::Frameworks::WebService::SOAP::Fault
 A call's answer, the method having not been done: why not (section 4.4) - sent in an HTTP response whose status is 500 (section 6.2). More...
 
class  Stroika::Frameworks::WebService::SOAP::FaultException
 A Fault, thrown: Invoke throws the one a server answers with, and a HandleRequest handler throws one to answer with it. More...
 
struct  Stroika::Frameworks::WebService::SOAP::Options
 What SOAP must be told that has a sensible default - taken by Serialize and DeSerialize, defaulted, so a caller says only what it wants different. More...
 

Namespaces

namespace  Stroika::Frameworks::WebService::SOAP
 

Typedefs

using Stroika::Frameworks::WebService::SOAP::Arguments = Sequence< KeyValuePair< String, String > >
 

Enumerations

enum class  Stroika::Frameworks::WebService::SOAP::EncodingStyleAttribute
 Where Serialize writes SOAP's encodingStyle attribute (http://schemas.xmlsoap.org/soap/encoding/) - which SOAP 1.1's prose says MAY go on any element, and on which its schema, its examples and the WS-I Basic Profile disagree. More...
 

Functions

Memory::BLOB Stroika::Frameworks::WebService::SOAP::Serialize (const Request &request, const Options &options={})
 The SOAP message - its XML, UTF-8 - which sends it: a call, its answer, or a fault.
 
Memory::BLOB Stroika::Frameworks::WebService::SOAP::Serialize (const Response &response, const Options &options={})
 The SOAP message - its XML, UTF-8 - which sends it.
 
Memory::BLOB Stroika::Frameworks::WebService::SOAP::Serialize (const Fault &fault, const Options &options={})
 The SOAP message - its XML, UTF-8 - which sends it.
 
void Stroika::Frameworks::WebService::SOAP::DeSerialize (const Memory::BLOB &b, Request *request, const Options &options={})
 The SOAP message read: what Serialize writes, and any other's. Throws DataExchange::BadFormatException if it is not one - a Response read from a fault, say; and throws in a build with no XML parser.
 
void Stroika::Frameworks::WebService::SOAP::DeSerialize (const Memory::BLOB &b, Response *response, const Options &options={})
 The SOAP message read.
 
void Stroika::Frameworks::WebService::SOAP::DeSerialize (const Memory::BLOB &b, Fault *fault, const Options &options={})
 The SOAP message read.
 
Response Stroika::Frameworks::WebService::SOAP::Invoke (const URI &url, const String &soapAction, const Request &request, const Options &options={})
 Call a method: POST request to url, with soapAction (in quotes, as SOAPAction headers are: section 6.1.1) - and return its answer. Throws FaultException if answered with a fault; another failed HTTP response as IO::Network::Transfer::Exception; an answer that is not SOAP as DataExchange::BadFormatException.
 
Response Stroika::Frameworks::WebService::SOAP::Invoke (IO::Network::Transfer::Connection::Ptr connection, const URI &url, const String &soapAction, const Request &request, const Options &options={})
 Call a method, over the caller's connection.
 
void Stroika::Frameworks::WebService::SOAP::HandleRequest (WebServer::Message &m, const function< Response(const Request &)> &handler, const Options &options={})
 Answer a call, at its URL's route: 415 (Unsupported Media Type) if its body is not text/xml; else its Request read and answered with handler's Response - or, status 500, with the Fault handler throws (as FaultException), or a Client fault if the request is not a SOAP call (nor, with options.fValidateReadAgainst, a valid one).
 

Variables

const InternetMediaType Stroika::Frameworks::WebService::SOAP::kContentType {"text/xml; charset=\"utf-8\""sv}
 

Detailed Description

Note
Code-Status: Alpha

Definition in file SOAP.h.