#include <Pt/Soap/HttpClient.h>
A client for SOAP via HTTP.
Inherits Client, and Connectable.
|
|
| HttpClient (ServiceDeclaration &service) |
| | Constructor.
|
|
| HttpClient (ServiceDeclaration &service, System::EventLoop &loop) |
| | Construct with EventLoop used for I/O.
|
|
virtual | ~HttpClient () |
| | Destructor.
|
|
void | setActive (System::EventLoop &loop) |
| | Sets the EventLoop to use for I/O.
|
|
System::EventLoop * | loop () const |
| | Gets the used EventLoop.
|
|
void | setSecure (Ssl::Context &ctx) |
| | Sets SSL context.
|
|
void | setPeerName (const std::string &peer) |
| | Set expected SSL peer name.
|
|
void | setKeepAlive () |
| | Enables HTTP keep-alive.
|
|
void | setTimeout (std::size_t timeout) |
| | Sets timeout for I/O operations.
|
|
void | setTarget (const Net::Endpoint &ep, const std::string &url) |
| | Sets target host and service URL.
|
|
void | setTarget (const Net::Endpoint &ep, const Net::TcpSocketOptions &opts, const std::string &url) |
| | Sets target host and service URL.
|
|
void | setHost (const Net::Endpoint &ep) |
| | Sets host to connect.
|
|
void | setHost (const Net::Endpoint &ep, const Net::TcpSocketOptions &opts) |
| | Sets host to connect.
|
|
void | setServiceUrl (const std::string &url) |
| | Sets the service URL.
|
|
void | setServiceUrl (const char *url) |
| | Sets the service URL.
|
|
const Net::Endpoint & | host () const |
| | Returns target host.
|
|
void | close () |
| | Closes the connection.
|
|
void | reset (ServiceDeclaration &service) |
| | Resets the client.
|
|
const RemoteCall * | activeProcedure () const |
| | The currently executing procedure.
|
|
void | cancel () |
| | Cancels the currently executing procedure.
|
|
|
virtual bool | isFailed () const |
| | Indicates if the procedure has failed.
|
| virtual void | onBeginInvoke () |
| | An asynchronous remote procedure is invoked.
|
| virtual void | onInvoke () |
| | A synchronous remote procedure is called.
|
| virtual void | onCancel () |
| | Cancels the remote procedure call.
|
| void | beginMessage (std::ostream &os) |
| | Formats the XML-RPC message.
|
| bool | advanceMessage () |
| | Formats the XML-RPC message.
|
| void | finishMessage () |
| | Formats the XML-RPC message.
|
| void | beginResult (std::istream &is) |
| | Parses the XML-RPC result.
|
| bool | parseResult () |
| | Parses the XML-RPC result.
|
| void | processResult (std::istream &is) |
| | Parses the XML-RPC result.
|
| void | setFault (int rc, const char *msg) |
| | Fails the current procedure.
|
| void | setReady () |
| | Parses the XML-RPC result.
|
◆ onBeginInvoke()
| virtual void onBeginInvoke |
( |
| ) |
|
|
protectedvirtual |
Derived Clients implement this method to format and send a message to the service.
Implements Client.
◆ onInvoke()
| virtual void onInvoke |
( |
| ) |
|
|
protectedvirtual |
Derived Clients implement this method to format and send a message to the service and receive and parse the result.
Implements Client.
◆ onCancel()
| virtual void onCancel |
( |
| ) |
|
|
protectedvirtual |
Derived Clients implement this method to cancel the remote procedure call.
Reimplemented from Client.
◆ beginMessage()
| void beginMessage |
( |
std::ostream & | os | ) |
|
|
protectedinherited |
This method is used by derived Clients in onInvoke() and onCall() to begin formatting a XML-RPC message to a std::ostream.
◆ advanceMessage()
This method is used by derived Clients in onInvoke() and onCall() to format a XML-RPC message. Each call generates a chunk of the message and returns true if the message is complete.
◆ finishMessage()
This method is used by derived Clients in onInvoke() and onCall() to format the end of a XML-RPC message. It is called after advanceMessage() returns true.
◆ beginResult()
| void beginResult |
( |
std::istream & | is | ) |
|
|
protectedinherited |
This method is used by derived Clients to begin parsing a XML-RPC result from a std::istream.
◆ parseResult()
This method is used by derived Clients to parse a XML-RPC result Each call consumes the available data from the std::istream set with beginResult() and returns true if the result is complete.
◆ processResult()
| void processResult |
( |
std::istream & | is | ) |
|
|
protectedinherited |
This method is used by derived Clients in in onCall() to parse a XML-RPC result from a std::istream.
◆ setFault()
| void setFault |
( |
int | rc, |
|
|
const char * | msg ) |
|
protectedinherited |
This method is used by derived Clients before calling finishResult() so that the RemoteProcedure throws a Fault when the result is processed.
◆ setReady()
This method is used by derived Clients after the XML-RPC result has been parsed by parseResult(). The current RemoteProcedure will receive completion notification to process the result.