#include <Stub.hpp>
Public Member Functions | |
Stub (const char *pcEndPointURI, AXIS_PROTOCOL_TYPE eProtocol) | |
virtual | ~Stub () |
void AXISCALL | setEndPoint (const char *pcEndPointURI) |
void AXISCALL | setTrasportProperty (const char *pcKey, const char *pcValue) |
const char * | getFirstTrasportPropertyKey () |
const char * | getNextTrasportPropertyKey () |
const char * | getCurrentTrasportPropertyKey () |
const char * | getCurrentTrasportPropertyValue () |
void | deleteCurrentTrasportProperty () |
void | deleteTrasportProperty (char *pcKey, unsigned int uiOccurance=1) |
void AXISCALL | setTransportProperty (const char *pcKey, const char *pcValue) |
const char *AXISCALL | getTransportProperty (const char *key, bool response=true) |
const char * | getFirstTransportPropertyKey () |
const char * | getNextTransportPropertyKey () |
const char * | getCurrentTransportPropertyKey () |
const char * | getCurrentTransportPropertyValue () |
void | deleteCurrentTransportProperty () |
void | deleteTransportProperty (char *pcKey, unsigned int uiOccurance=1) |
void | setHandlerProperty (AxisChar *name, void *value, int len) |
IHeaderBlock *AXISCALL | createSOAPHeaderBlock (AxisChar *pachLocalName, AxisChar *pachUri) |
IHeaderBlock *AXISCALL | createSOAPHeaderBlock (AxisChar *pachLocalName, AxisChar *pachUri, AxisChar *pachPrefix) |
IHeaderBlock * | getFirstSOAPHeaderBlock () |
IHeaderBlock * | getNextSOAPHeaderBlock () |
IHeaderBlock * | getCurrentSOAPHeaderBlock () |
void | deleteCurrentSOAPHeaderBlock () |
void | deleteSOAPHeaderBlock (IHeaderBlock *pHeaderBlock) |
void | setProxy (const char *pcProxyHost, unsigned int uiProxyPort) |
void | setTransportTimeout (const long lSeconds) |
int | getStatus () |
void | setMaintainSession (bool bSession) |
void | setTransportProtocol (AXIS_PROTOCOL_TYPE eProtocol) |
AXIS_PROTOCOL_TYPE | getTransportProtocol () |
void | setUsername (const char *pcUsername) |
void | setPassword (const char *pcPassword) |
const char * | getUsername () |
const char * | getPassword () |
Call * | getCall () |
Protected Member Functions | |
void | applyUserPreferences () |
void | setSOAPHeaders () |
void | setSOAPMethodAttributes () |
void | setAuthorizationHeader () |
Protected Attributes | |
Call * | m_pCall |
vector< IHeaderBlock * > | m_vSOAPHeaderBlocks |
vector< IHeaderBlock * >::iterator | m_viCurrentSOAPHeaderBlock |
vector< IAttribute * > | m_vSOAPMethodAttributes |
vector< IAttribute * >::iterator | m_viCurrentSOAPMethodAttribute |
SOAPTransport * | m_pTransport |
char * | m_pcUsername |
char * | m_pcPassword |
Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
Susantha Kumara (susantha@opensource.lk, skumara@virtusa.com)
|
Constructor.
|
|
Destructor. |
|
Apply user set preferences to each call made on the Stub object. This method is required because Axis engine holds only part of the state with refereance to subsequent calls on the same Stub object. Foxing this approach would make the engine much more efficient. |
|
Create and add a SOAP header block to the Stub. This will create a header block that would look like the following when serialized: <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/"> </th:TestHeader> User must use the IHeaderBlock pointer returned and fill in the header structure. e.g. To make the SOAP header look like <SOAP-ENV:Header> <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/"> <credentials> <username>Test User</username> <password>Test Password</password> </credentials> </th:TestHeader> </SOAP-ENV:Header>the following code segment coule be used IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader", "http://ws.apache.org/axisCppTest/", "th"); //create parent node BasicNode *parentNode = phb->createChild(ELEMENT_NODE); parentNode->setLocalName("Credentials"); //create child node BasicNode *childNode = phb->createChild(ELEMENT_NODE); childNode->setLocalName("username"); //create char node for value BasicNode *valueNode = phb->createChild(CHARACTER_NODE); valueNode->setValue("Test User"); //buld node tree childNode->addChild(valueNode); parentNode->addChild(childNode);
//add another node set childNode = phb->createChild(ELEMENT_NODE); childNode->setLocalName("password");
valueNode = phb->createChild(CHARACTER_NODE); valueNode->setValue("Test Password");
childNode->addChild(valueNode); parentNode->addChild(childNode);
phb->addChild(parentNode);
|
|
Create and add a SOAP header block to the Stub. This will create a header block that would look like the following when serialized: <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/"> </th:TestHeader> User must use the IHeaderBlock pointer returned and fill in the header structure. e.g. To make the SOAP header look like <SOAP-ENV:Header> <th:TestHeader xmlns:th="http://ws.apache.org/axisCppTest/"> <credentials> <username>Test User</username> <password>Test Password</password> </credentials> </th:TestHeader> </SOAP-ENV:Header>the following code segment coule be used IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader", "http://ws.apache.org/axisCppTest/"); //Note: The prefix will be added automaticaly. //create parent node BasicNode *parentNode = phb->createChild(ELEMENT_NODE); parentNode->setLocalName("Credentials"); //create child node BasicNode *childNode = phb->createChild(ELEMENT_NODE); childNode->setLocalName("username"); //create char node for value BasicNode *valueNode = phb->createChild(CHARACTER_NODE); valueNode->setValue("Test User"); //buld node tree childNode->addChild(valueNode); parentNode->addChild(childNode);
//add another node set childNode = phb->createChild(ELEMENT_NODE); childNode->setLocalName("password");
valueNode = phb->createChild(CHARACTER_NODE); valueNode->setValue("Test Password");
childNode->addChild(valueNode); parentNode->addChild(childNode);
phb->addChild(parentNode);
|
|
Deletes the SOAP header block currently pointed to by the iterator. |
|
Deletes the transport property key:value pair currently pointed to by the iterator. |
|
|
|
Deletes the given SOAP header block pointer from the current list of SOAP header blocks. This method does a pointer comparison. It does not compare the contents within objects. Hence it is expected that either the pointer returned by the create method or by one of the iterator methods would be used with this method. This method does not advance the iterator in line with the deletes done. In case you want to access the SOAP header blocks after using this method, it is advisable to reinitialize the iterator using getFirstSOAPHeaderBlock(); However you can use this method despite where the iterator is pointing currently.
|
|
Deletes the given occerance of the transport property key:value pair corresponding to the given key. This method does not advance the iterator in line with the deletes done. In case you want to access the transport properties after using this method, it is advisable to reinitialize the iterator using getFirstTransportPropertyKey(); However you can use this method despite where the iterator is pointing currently.
|
|
This method does not advance the iterator in line with the deletes done. In case you want to access the transport properties after using this method, it is advisable to reinitialize the iterator using getFirstTransportPropertyKey(); However you can use this method despite where the iterator is pointing currently.
|
|
Call object of the Stub. This is the point of access to the internals of the Axis engine. |
|
Accessor for SOAP header blocks This method gives access to the SOAP header block pointer corresponding to the SOAP header block currently being pointed by SOAP header blocks iterator. getFirstSOAPHeaderBlock() method must have been called at least once before this method is called. If not behaviour is undefined. This method does not advance the iterator. Repeated calls always retuen the same key unless getNextSOAPHeaderBlock() is called in between.
|
|
Accessor for transport property keys. This method gives access to the key corresponding to the transport key currently being pointed by transport property key iterator. getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method does not advance the iterator. Repeated calls always retuen the same key unless getNextTransportPropertyKey() is called in between.
|
|
Accessor for transport property values. This method gives access to the value corresponding to the transport key currently being pointed by transport property key iterator. As keys and values are treated as paires, access to the value field is based on the access to the key field. getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method does not advance the iterator. Repeated calls always retuen the same value unless getNextTransportPropertyKey() is called in between.
|
|
This method gives access to the key corresponding to the transport key currently being pointed by transport property key iterator. getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method does not advance the iterator. Repeated calls always retuen the same key unless getNextTransportPropertyKey() is called in between.
|
|
This method gives access to the value corresponding to the transport key currently being pointed by transport property key iterator. As keys and values are treated as paires, access to the value field is based on the access to the key field. getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method does not advance the iterator. Repeated calls always retuen the same value unless getNextTransportPropertyKey() is called in between.
|
|
Iterator initiatior for SOAP header blocks This method must be called first to initiate access to the list of SOAP header blocks.
|
|
Iterator initiatior for transport property keys This method must be called first to initiate access to the list of transport property keys.
|
|
This method must be called first to initiate access to the list of transport property keys.
|
|
Iterator for SOAP header blocks getFirstSOAPHeaderBlock() method must have been called at least once before this method is called. If not behaviour is undefined. This method advances the iterator by one position. Repeated calls always retuen the next value.
|
|
Iterator for transport property keys getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method advances the iterator by one position. Repeated calls always retuen the next value.
|
|
getFirstTransportPropertyKey() method must have been called at least once before this method is called. If not behaviour is undefined. This method advances the iterator by one position. Repeated calls always retuen the next value.
|
|
Gets the password used for basic authentication |
|
Get the status of the stub to see any error situation |
|
Get a transport property. Returns the value of a transport property based on a key.
|
|
Get transport protocol being used by the transport.
|
|
Gets the username used for basic authentication |
|
Set Authorization header for basic authentication |
|
Set end point of service to connect to.
|
|
Sets a property that can be accessed from a handler.
|
|
Set whether to Maitain session with service ot not.
|
|
Sets the password to be used for basic authentication |
|
Set proxy server and port for transport.
|
|
Set SOAP Headers stored in m_vSOAPHeaderBlock vector. Called by applyUserPreferences for each and every method invocation. |
|
Set SOAP method attributes stored in m_vSOAPMethodAttributes vector. Called by applyUserPreferences for each and every method invocation. |
|
Set transport property. Handling the semantics of the headers is up to the user. The user has to make sure that the key:value paires passed to this method would make sense at transport level. The Stub class does not validate the key value paires to see if the properties make sense to the undelying transport.
Some example transport properties:
|
|
Set transport protocol to be used by the transport.
|
|
Set transport timeout.
|
|
Handling the semantics of the headers is up to the user. The user has to make sure that the key:value paires passed to this method would make sense at transport level. The Stub class does not validate the key value paires to see if the properties make sense to the undelying transport.
Some example transport properties:
|
|
Sets the username to be used for basic authentication |
|
Password |
|
Username |
|
Transport object |
|
Transport keys iterator |
|
Transport keys iterator |
|
Vector of Header Blok pointers |
|
List of SOAPMethod Attributes |