SoapRequest Class Template Reference

SoapRequest, encapsulates a SOAP request. More...

List of all members.

Public Types

typedef boost::shared_ptr<
SoapResponse< Serializer,
SendObject, ReturnObject > > 
SoapResponsePtr
 Return type of the send function.

Public Member Functions

SoapResponsePtr send ()
 Sends the SoapRequest.
 SoapRequest (const std::string &host, const SmartUtil::tstring &postUrl, const SmartUtil::tstring &soapAction, int port, Serializer serializer, const SendObject &sendObject, unsigned int timeout=120)
 Constructor creating a SOAP request.


Detailed Description

template<class Serializer, class SendObject, class ReturnObject>
class SmartSOAP::SoapRequest< Serializer, SendObject, ReturnObject >

SoapRequest, encapsulates a SOAP request.

The equivalent to SOAP as HttpRequest is to HTTP Use this class to do a SOAP function calling.


Constructor & Destructor Documentation

SoapRequest ( const std::string &  host,
const SmartUtil::tstring &  postUrl,
const SmartUtil::tstring &  soapAction,
int  port,
Serializer  serializer,
const SendObject &  sendObject,
unsigned int  timeout = 120 
)

Constructor creating a SOAP request.

The host should be e.g. "www.google.com" or "localhost". The postUrl should be e.g. "/MyApplication/default.asmx". The port should (normally) be 80. The serializer is a class which must expose two functions: SmartUtil::tstring serialize( const SendObject & request ); ReturnObject deserialize( SmartXML::XmlDocument::XmlDocumentPtr xmlDocument ) const; Those functions will be called by the framework when needed and the serialize function is responsible for building up a string which will serve as the HTTP content of the request and must be in XML format while the deserialize function must parse the returned XML value from the SOAP response and return an object of type ReturnObject. The timeout defines how long time the framework will wait after submitting the SOAP request for the response before raising an exception.


Member Function Documentation

SoapRequest< Serializer, SendObject, ReturnObject >::SoapResponsePtr send (  ) 

Sends the SoapRequest.

Returns a SoapResponse object after sending the SOAP request

Back to SmartWin website
SourceForge.net Logo