s_Step = 16;
46CSoapServerApplication::Storage::Storage(
void)
50m_Buffer =
newTWebMethod[m_Capacity];
52CSoapServerApplication::Storage::Storage(
constStorage& src)
54m_Capacity = src.m_Capacity;
55m_Current = src.m_Current;
56m_Buffer =
newTWebMethod[m_Capacity];
57memcpy( m_Buffer, src.m_Buffer, m_Capacity *
sizeof(TWebMethod));
59CSoapServerApplication::Storage::~Storage(
void)
63CSoapServerApplication::Storage::const_iterator
64CSoapServerApplication::Storage::begin(
void)
const 68CSoapServerApplication::Storage::const_iterator
69CSoapServerApplication::Storage::end(
void)
const 71 returnm_Buffer+m_Current;
73 voidCSoapServerApplication::Storage::push_back(TWebMethod
value)
75 if(m_Current >= m_Capacity) {
76TWebMethod* newbuf =
newTWebMethod[m_Capacity+s_Step];
77memcpy( newbuf, m_Buffer, m_Capacity *
sizeof(TWebMethod));
82*(m_Buffer + m_Current) =
value;
89 const string& wsdl_filename,
const string& namespace_name)
90:
CCgiApplication(), m_DefNamespace(namespace_name), m_Wsdl(wsdl_filename),
91m_OmitScopePrefixes(
false),
137 char*
buf=
new char[
len];
138ifstream iw(
m_Wsdl.c_str());
154 boolinput_ok=
true;
159vector< TTypeInfoGetter >::const_iterator types_in;
160 for(types_in =
m_Types.begin(); types_in !=
m_Types.end(); ++types_in) {
177 catch(exception& e) {
179fault_text = e.
what();
185fault_text =
"No input stream in CCgiRequest";
206 catch(exception& e) {
208fault_text = e.
what();
225TListeners::const_iterator it;
226 for(it = listeners->begin(); it != listeners->end(); ++it) {
228 if(!(this->*listener)(soap_out, soap_in)) {
243response.
SetStatus(500,
"Internal Server Error");
261CSoapMessage::TSoapContent::const_iterator
i;
262 for(
i= content.begin();
i!= content.end(); ++
i) {
263 stringname = (*i)->GetThisTypeInfo()->GetName();
264 stringns_name = (*i)->GetNamespaceName();
265 if(ns_name.empty() && (*i)->GetThisTypeInfo()->GetDataSpec() !=
EDataSpec::eXSD) {
273 for(
i= content.begin();
i!= content.end(); ++
i) {
277 stringname = obj->
GetName();
290 const string& namespace_name)
294 if((
l->second).first == namespace_name) {
295 return&((
l->second).second);
305 m_Types.push_back(type_getter);
311 const string& message_name,
312 const string& namespace_name)
314 stringns(namespace_name);
320listeners->push_back(listener);
323new_listeners.push_back(listener);
325pair<
string const, pair<string,TListeners> >(message_name,
326make_pair(ns,new_listeners)));
341fault->SetFaultstring(
"Server supports SOAP v1.1 only");
350fault->SetFaultstring(
"An immediate child element of the SOAP Header not understood");
359fault->SetFaultstring(
text);
368fault->SetFaultstring(
"Unsupported request type");
Serializable object that stores any combination of parsable data.
const TSoapContent & GetContent(EMessagePart source) const
void AddObject(const CSerialObject &obj, EMessagePart destination)
CSoapFault::ESoap_FaultcodeEnum GetFaultCode(void) const
void SetDefaultObjectNamespaceName(const string &ns_name)
void RegisterObjectType(TTypeInfoGetter type_getter)
vector< CConstRef< CSerialObject > > TSoapContent
TDiagPostFlags m_FaultPostFlags
const TListeners * x_FindListeners(const CSoapMessage &request)
void SetWsdlFilename(const string &wsdl_filename)
void x_FaultServer(CSoapMessage &response, const string &text) const
void x_FaultVersionMismatch(CSoapMessage &response) const
void SetOmitScopePrefixes(bool bOmit)
void AddMessageListener(TWebMethod listener, const string &message_name, const string &namespace_name=kEmptyStr)
vector< TTypeInfoGetter > m_Types
const string & GetDefaultNamespaceName(void) const
void SetDefaultNamespaceName(const string &namespace_name)
void x_FaultMustUnderstand(CSoapMessage &response) const
void x_FaultNoListeners(CSoapMessage &response) const
vector< TWebMethod > TListeners
multimap< string, pair< string, TListeners > > m_Listeners
bool x_ProcessWsdlRequest(CCgiResponse &response, const CCgiRequest &request) const
CSoapServerApplication(const string &wsdl_filename, const string &namespace_name)
bool(CSoapServerApplication::* TWebMethod)(CSoapMessage &response, const CSoapMessage &request)
void RegisterObjectType(TTypeInfoGetter type_getter)
bool x_ProcessSoapRequest(CCgiResponse &response, const CCgiRequest &request)
TListeners * x_FindListenersByName(const string &message_name, const string &namespace_name)
virtual int ProcessRequest(CCgiContext &ctx)
This is the method you should override.
container_type::const_iterator const_iterator
const_iterator find(const key_type &key) const
const_iterator end() const
iterator insert(const value_type &val)
std::ofstream out("events_result.xml")
main entry point for tests
const TCgiEntries & GetEntries(void) const
Get a set of entries(decoded) received from the client.
void Flush(void) const
Flush output stream.
CNcbiOstream & out(void) const
Get output stream. Throw exception if GetOutput() is NULL.
void SetStatus(unsigned int code, const string &reason=kEmptyStr)
void SetContentType(const string &type)
Set content type (text/html by default if not provided)
CNcbiOstream & WriteHeader(void) const
Write HTTP response header to the output stream.
CNcbiIstream * GetInputStream(void) const
Return pointer to the input stream.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
@ eDPF_Severity
Severity (default)
@ eDPF_Prefix
Prefix (default)
string ReportAll(TDiagPostFlags flags=eDPF_Exception) const
Report all exceptions.
virtual const char * what(void) const noexcept
Standard report (includes full backlog).
Int8 GetLength(void) const
Get size of file.
const string & GetNamespaceName(void) const
Get namespace name.
TTypeInfo(* TTypeInfoGetter)(void)
const string & GetName(void) const
Get local name.
@ eSerial_StdWhenDash
use std stream when filename is "-"
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static int CompareNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive compare of a substring with another string.
unsigned int
A callback function used to compare two keys in a database.
static void text(MDB_val *v)
const GenericPointer< typename T::ValueType > T2 value
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
static wxAcceleratorEntry entries[3]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4