Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Call Class Reference

RPC Dynamic Invocation interface. More...

#include <Call.hpp>

List of all members.

Public Types

enum  Mode { IN_PARAM, OUT_PARAM, IN_OUT_PARAM }
 Mode of the each parameter: This is not supported yet???, default is set as IN. More...


Public Methods

 Call ()
virtual ~Call ()
template<typename T> void AddParameter (const char *p_pchName, T &p_Value, Mode p_Mode)
 Adds specified parameter to the list of parameters for the operation associated with this Call object. More...

template<typename T> void AddParameter (T &value, Mode mode)
 Adds specified parameter without a name to the list of parameters for the operation associated with this Call object. More...

void* Invoke (const std::string &p_sNs, const std::string &p_sMethod)
 Invokes the operation associated with this Call object using the method name in namespace. More...

void* Invoke ()
 Invokes the operation associated with this Call object using info aready provided. More...

void SetTargetEndpointAddress (const char *p_pchUrl)
 Set romote address of the Web Service. More...

void SetMethodNamespaceURI (const char *p_pchOpNsURI)
 set the method namespace URI. More...

void SetOperationName (const char *p_pchOpName)
 Sets the operation name associated with this Call object. More...

void AddSerializerFactory (const std::string &p_sTypName, SerializerFactory *p_pSer)
 Set XML Mapping for user defined data types. More...

void SetEncodingStyle (const std::string &p_sNsURI)
 Sets the encoding style to the URL passed in. More...

void ClearAllParams ()
 Clears the list of parameters. More...


Private Methods

void Cleanup ()
 Clean up any memory associated with this call object. More...


Private Attributes

std::vector<Param*> m_vArgs
 Vectore of arguments. More...

std::string m_strOpName
 Operation/method name. More...

std::string m_strMethodNsURI
 Method namespace URI. More...

std::string m_ServerURL
 Remote address of the Web service. More...

std::string m_EncStyle
 Encoding style. More...

SOAPMsgContextm_pClientCtx
 SOAP Message handler. More...


Detailed Description

RPC Dynamic Invocation interface.

RPC Dynamic Invocation interface. This class should be used to actually invoke the Web Service from Client side. The stratergy of calling this interface is as follows: Set up & configure a object of this class with following informations:

Todo:
Support for WSDL document (on the constructor to the Service object)

Definition at line 98 of file Call.hpp.


Member Enumeration Documentation

enum Call::Mode
 

Mode of the each parameter: This is not supported yet???, default is set as IN.

Enumeration values:
IN_PARAM  
OUT_PARAM  
IN_OUT_PARAM  

Definition at line 103 of file Call.hpp.


Constructor & Destructor Documentation

Call::Call ( )
 

Create a Call object and initialize Message Context

Definition at line 79 of file Call.cpp.

Call::~Call ( ) [virtual]
 

Clean up the object for shutting down the Web service.

Definition at line 90 of file Call.cpp.


Member Function Documentation

template<typename T>
void Call::AddParameter ( T & value,
Mode mode ) [inline]
 

Adds specified parameter without a name to the list of parameters for the operation associated with this Call object.

Adds the specified parameter to the list of parameters for the operation associated with this Call object. This method should be called by the client to pass parameters on the method; call should be made on this according to the order of parameters that should be passed on the method.

Store each param in a vector as name-value pair with the data type Qualified name accord XML Schema Part 2 Datatype. Param name is generated like arg0, arg1 etc. accordingh to it place in the vectore.

Parameters:
p_Value   Value of the param, rpresented genericly by typename
p_Mode   one of IN_PARAM, OUT_PARAM, IN_OUT_PARAM

Definition at line 159 of file Call.hpp.

template<typename T>
void Call::AddParameter ( const char * p_pchName,
T & p_Value,
Mode p_Mode ) [inline]
 

Adds specified parameter to the list of parameters for the operation associated with this Call object.

Adds the specified parameter to the list of parameters for the operation associated with this Call object. This method should be called by the client to pass parameters on the method; call should be made on this according to the order of parameters that should be passed on the method.

Store each param in a vector as name-value pair with the data type Qualified name according to XML Schema Part 2 Datatype.

Parameters:
p_pchName   Name that will be used for the parameter in the XML representation.
p_Value   Value of the param, rpresented genericly by typename
p_Mode   one of IN_PARAM, OUT_PARAM, IN_OUT_PARAM

Definition at line 129 of file Call.hpp.

void Call::AddSerializerFactory ( const std::string & p_sTypName,
SerializerFactory * p_pSer )
 

Set XML Mapping for user defined data types.

Map a type for XML serialization & deserialization

Parameters:
p_sTypName   Name that mapping is required as xsi:type QName of the associated XML type.
p_pSer   A SerializerFactory factory which can create serializer /deserializer instances for this type.

Definition at line 145 of file Call.cpp.

void Call::Cleanup ( ) [private]
 

Clean up any memory associated with this call object.

Clean up on an exception

Definition at line 255 of file Call.cpp.

Referenced by Invoke(), and ~Call().

void Call::ClearAllParams ( ) [inline]
 

Clears the list of parameters.

Clears the list of parameters.

Definition at line 199 of file Call.hpp.

void * Call::Invoke ( )
 

Invokes the operation associated with this Call object using info aready provided.

Invokes the operation associated with this Call object using the method name in method namespace already provided, Create RPCElements as body element using the vector of params (if any) for the method. All the exceptions of such calls are handle here; do we required to pass such exceptions to the Client????

Returns:
Result of the Invoke of remote method. The object handler is return as a void pinter which client required to explisitly cast in to the required data type. dynamic_cast<..> is strongly suggested. Client require to clean up any memory associated with this returned obj.

Todo:
Manupulation of other return values;

Definition at line 205 of file Call.cpp.

Referenced by Invoke().

void * Call::Invoke ( const std::string & p_sNs,
const std::string & p_sMethod )
 

Invokes the operation associated with this Call object using the method name in namespace.

Invokes the operation associated with this Call object using the Method namespace & method name provided as the arguments.

Parameters:
p_sNs   Method namespace URI
p_sMethod   Method name (required)

Returns:
Result of the Invoke of remote method. The object handler is return as a void pinter which client required to exlisitly cast in to the required data type.

Definition at line 179 of file Call.cpp.

void Call::SetEncodingStyle ( const std::string & p_sNsURI )
 

Sets the encoding style to the URL passed in.

Sets the encoding style to the URL passed in.

Parameters:
Namespace   URI of the encoding to use.

Definition at line 160 of file Call.cpp.

void Call::SetMethodNamespaceURI ( const char * p_pchOpNsURI )
 

set the method namespace URI.

Sets the operation name associated Namespace URI with this Call object. The validity of the operation namespace is not checked at this point.

Parameters:
p_pchOpNsURI   Namespace URI of the operation.

Definition at line 116 of file Call.cpp.

void Call::SetOperationName ( const char * p_pchOpName )
 

Sets the operation name associated with this Call object.

Sets the operation name associated with this Call object. The validity of the operation is not checked at this point.

Parameters:
p_pchOpName   Name of the operation.

Definition at line 102 of file Call.cpp.

void Call::SetTargetEndpointAddress ( const char * p_pchUrl )
 

Set romote address of the Web Service.

Sets the URL of the target Web Service.

Parameters:
p_pchUrl   of the target Web Service

Definition at line 129 of file Call.cpp.


Member Data Documentation

std::string Call::m_EncStyle [private]
 

Encoding style.

Definition at line 213 of file Call.hpp.

std::string Call::m_ServerURL [private]
 

Remote address of the Web service.

Definition at line 212 of file Call.hpp.

SOAPMsgContext * Call::m_pClientCtx [private]
 

SOAP Message handler.

Definition at line 215 of file Call.hpp.

std::string Call::m_strMethodNsURI [private]
 

Method namespace URI.

Definition at line 211 of file Call.hpp.

std::string Call::m_strOpName [private]
 

Operation/method name.

Definition at line 210 of file Call.hpp.

std::vector< Param *> Call::m_vArgs<Param*> [private]
 

Vectore of arguments.

Definition at line 209 of file Call.hpp.


The documentation for this class was generated from the following files: Axis C++ Client Lib - User's Guide

Copyright © 2001 SL_OpenSource XML Project. All Rights Reserved