Library: Remoting/SoapLite
Package: SoapLite
Header: Poco/Remoting/SoapLite/Transport.h
The SoapLite Transport implementation.
The SoapLite Transport uses the SOAP 1.1 protocol over HTTP (or HTTPS). SOAP messages exchanged over the network are formtted according to the SOAP 1.1 Document/Literal message format.
The following requirements must be met, so that one can use SoapLite as transport: On the server side one must:
Example:
Poco::Remoting::SoapLite::TransportFactory::registerFactory(); Poco::Remoting::ORB::instance().registerListener( new Poco::Remoting::SoapLite::Listener(10001) ); MyProject::MyClassHelper::registerObject( new MyProject::MyClass, "MyObject", 10001, Poco::Remoting::SoapLite::Transport::ID );
On the client side, requirements are similar:
Example:
Poco::Remoting::SoapLite::TransportFactory::registerFactory(); MyProject::IMyClass::Ptr ptrObj = MyProject::MyClassHelper::findObject( hostName, "MyObject", 10001, Poco::Remoting::SoapLite::Transport::ID );
Direct Base Classes: Poco::Remoting::Transport
All Base Classes: Poco::Remoting::Transport
Member Functions: connect, connected, disconnect, doExecute, doExecuteOneWay, endExecute, endPoint, getDeserializer, getSerializer, prepareExecute, prepareExecuteOneWay
Inherited Functions: connect, connected, disconnect, doExecute, doExecuteOneWay, endExecute, endPoint, getDeserializer, getSerializer, prepareExecute, prepareExecuteOneWay
Transport(
bool enableSOAP,
bool keepAlive,
bool prettyPrint = false
);
Creates the Transport, using the given parameters.
~Transport();
Destroys the Transport.
void connect(
const std::string & endPoint
);
The endpoint must be in URI parsable format, e.g.: remoting://www.xyz.org:666/path, or remotings://...
See also: Poco::Remoting::Transport::connect()
bool connected() const;
Returns the connection status.
See also: Poco::Remoting::Transport::connected()
void disconnect();
Disconnects the transport.
See also: Poco::Remoting::Transport::disconnect()
void doExecute(
const Poco::Remoting::Identifiable::ObjectId & oId,
const Poco::Remoting::Identifiable::TypeId & tid,
const std::string & methodName
);
Send the request.
void doExecuteOneWay(
const Poco::Remoting::Identifiable::ObjectId & oId,
const Poco::Remoting::Identifiable::TypeId & tid,
const std::string & methodName
);
Send the request and forget about it. No response checking.
std::istream & endExecute(
const Poco::Remoting::Identifiable::ObjectId & oId,
const Poco::Remoting::Identifiable::TypeId & tid,
const std::string & methodName
);
Get the response. Note that even void methods will return at least an empty response except when the method has been flagged as oneway! But in that case the code generator will use doExecuteOneWay instead of doExecute and endExecute.
const std::string & endPoint() const;
Returns the endpoint this transport is connected to or an empty string if it is not connected.
See also: Poco::Remoting::Transport::endPoint()
Poco::Remoting::Deserializer & getDeserializer();
Returns an Xml deserializer.
Poco::Remoting::Serializer & getSerializer();
Returns an Xml serializer.
std::ostream & prepareExecute(
const Poco::Remoting::Identifiable::ObjectId & oId,
const Poco::Remoting::Identifiable::TypeId & tid,
const std::string & methodName
);
Build a request and return the ouputstream so that the serializer classes can append their information to the request.
std::ostream & prepareExecuteOneWay(
const Poco::Remoting::Identifiable::ObjectId & oId,
const Poco::Remoting::Identifiable::TypeId & tid,
const std::string & methodName
);
Build a one-way request and return the outputstream so that the serializer classes can append their information to the request.
static const std::string CONTENT_TYPE;
static const std::string EXCEPTION_TAG;
static const std::string ID;
static const std::string MESSAGE_TAG;
static const std::string SOAPACTION;
static const std::string TYPE_TAG;