KD SOAP: KDSoapServerRawXMLInterface Class Reference

| KD SOAP 1.9.1

Public Member Functions | List of all members
KDSoapServerRawXMLInterface Class Reference

`#include <KDSoapServerRawXMLInterface.h>`

## Public Member Functions
| KDSoapServerRawXMLInterface ()
virtual | ~KDSoapServerRawXMLInterface ()
virtual bool | newRequest (const QByteArray &requestType, const QMap< QByteArray, QByteArray > &httpHeaders)
virtual void | processXML (const QByteArray &xmlChunk)
virtual void | endRequest ()

## Detailed Description

Additional interface for processing incoming XML directly, without the use of KDSoapMessage.

In addition to deriving from KDSoapServerObjectInterface, you can derive from KDSoapServerRawXMLInterface in order to handle XML as it comes in.

Use Q_INTERFACES(KDSoapServerRawXMLInterface) in your derived class (under Q_OBJECT) so that Qt can discover the additional inheritance.

This can be useful for pre-processing invalid XML, or for handling very large requests (received in chunks) in an incremental way, saving memory compared to the usual buffering of the entire request.

KDSoapServer will receive all HTTP headers, call newRequest(), call processXML() for every chunk of XML, and finally call endRequest(). Use writeHTTP() or writeXML() (from KDSoapServerObjectInterface) to reply back.

Since
  1.5

## Constructor & Destructor Documentation

## ◆ KDSoapServerRawXMLInterface()

KDSoapServerRawXMLInterface::KDSoapServerRawXMLInterface | ( |  | ) |

Constructor

## ◆ ~KDSoapServerRawXMLInterface()

KDSoapServerRawXMLInterface::~KDSoapServerRawXMLInterface | ( |  | ) |
| virtual

Destructor

## Member Function Documentation

## ◆ newRequest()

virtual bool KDSoapServerRawXMLInterface::newRequest | ( | const QByteArray & | requestType,
|  | const QMap< QByteArray, QByteArray > & | httpHeaders
| ) |  |
| inlinevirtual

Called when starting to receive a new request.

Parameters

  requestType | GET or POST
  httpHeaders | the map of http headers (keys have been lowercased since they are case insensitive)

Returns
  true if you want this interface to handle the request, otherwise the usual processing via KDSoapServerObjectInterface::processRequest will happen.

## ◆ processXML()

virtual void KDSoapServerRawXMLInterface::processXML | ( | const QByteArray & | xmlChunk | ) |
| inlinevirtual

Called with the chunks of XML data as they come in

## ◆ endRequest()

virtual void KDSoapServerRawXMLInterface::endRequest | ( |  | ) |
| inlinevirtual

Called at the end of the request. Use writeHTTP() or writeXML() (from KDSoapServerObjectInterface) to reply back.

The documentation for this class was generated from the following files:

- src/KDSoapServer/KDSoapServerRawXMLInterface.h
- src/KDSoapServer/KDSoapServerRawXMLInterface.cpp

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/