Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

WsdlInvoker Class Reference

#include <WsdlInvoker.h>

Collaboration diagram for WsdlInvoker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setVerbose (bool f)
std::string errors ()
bool status () const
Constructors and Destructors
 WsdlInvoker (const std::string &url)
 WsdlInvoker ()
 ~WsdlInvoker ()
WSDL Inspection
bool setWSDLUri (const std::string &url)
int getOperations (std::vector< std::string > &operations)
 return names of operations (only for the SOAP binding portType)
std::string getOpDocumentaion (const std::string &n)
bool setOperation (const std::string &operation)
 set the operation to invoke
Simple Invocation usage
bool setValue (const std::string &param, void *val)
 sets the param value for an operation by name of the parameter
bool setValue (const std::string &param, void **values, unsigned int occur)
bool setValue (const std::string &param, std::string val)
bool setValue (const std::string &param, std::vector< std::string > values)
bool invoke ()
void * getValue (const std::string &param, Schema::Type &t)
A more complex but powerful usage
int getNextInput (std::string &param, Schema::Type &type, int &min, int &max)
bool setInputValue (const int param, void *val)
bool setInputValue (const int id, void **values, unsigned int occur)
bool setInputValue (const int param, std::string val)
bool setInputValue (const int param, std::vector< std::string > values)
bool getNextOutput (std::string &name, TypeContainer *&tc)
TypeContainergetOutput (const std::string &name)

Constructor & Destructor Documentation

WsdlInvoker::WsdlInvoker const std::string &  url  ) 
 

The default constructor for WsdlInvoker

Parameters:
wsdl url
stream for logging errors

WsdlInvoker::WsdlInvoker  ) 
 

WsdlInvoker::~WsdlInvoker  ) 
 


Member Function Documentation

bool WsdlInvoker::setWSDLUri const std::string &  url  )  [inline]
 

int WsdlInvoker::getOperations std::vector< std::string > &  operations  ) 
 

return names of operations (only for the SOAP binding portType)

getOperations

Parameters:
reference to vector<string>
Returns:
int ,number of operations

std::string WsdlInvoker::getOpDocumentaion const std::string &  n  ) 
 

bool WsdlInvoker::setOperation const std::string &  operation  ) 
 

set the operation to invoke

setOperation

Parameters:
operation name to invoke
Returns:
bool ,true if successful

bool WsdlInvoker::setValue const std::string &  param,
void *  val
 

sets the param value for an operation by name of the parameter

setValue

Parameters:
name of the operation's parameter
string/void* representation of the parameter
Returns:
true if successful,false if the values didnt match or occurrence constraint failed example invoker.setInputValue("symbol","ABC") or int zip = 94018; invoker.setInputValue("zip",(void*)(&zip)); Note that "symbol" or "zip" above can be a message part or a constituent particle in a complex type The API takes care of it.

bool WsdlInvoker::setValue const std::string &  param,
void **  values,
unsigned int  occur
 

bool WsdlInvoker::setValue const std::string &  param,
std::string  val
 

bool WsdlInvoker::setValue const std::string &  param,
std::vector< std::string >  values
 

bool WsdlInvoker::invoke  ) 
 

invoke invoke the web service operation

Returns:
true if successful,false otherwise

void * WsdlInvoker::getValue const std::string &  param,
Schema::Type t
 

getValue return the value of the output whose name is 'param'

Parameters:
type is set by reference to enable type casting in client code
Returns:
pointer to the value .0 if there is no simple type or part name whose name is 'param' in the web service output. example float * val = (int*) invoker.getOutput("Result",t);//stock quotes t would be Schema::FLOAT

int WsdlInvoker::getNextInput std::string &  param,
Schema::Type type,
int &  min,
int &  max
 

getNextInput Calling this method repeatedly informs the caller of the input types the web service operation expects. Each call returns a unique id which must be used while setting the value using setInputValue.This method exposes only atomic types.Even if a web service needs a complex type ,the api exposes only the constituent particles.The only exception is when a complex content model needs multiple occurrences which is still a TODO

Parameters:
ref:param name Name of the param
ref:Schema::Type,the schema type
ref: min and max (occurrences)
Returns:
unique id of this parameter

bool WsdlInvoker::setInputValue const int  param,
void *  val
 

setInputValue sets the param value for an operation only simple types can be set.

Parameters:
id return by getNextInput()
void ** pointer to array of pointers to the the values
Returns:
true if successful,false if the values didnt match or occurrence constraint failed

bool WsdlInvoker::setInputValue const int  id,
void **  values,
unsigned int  occur
 

bool WsdlInvoker::setInputValue const int  param,
std::string  val
 

setInputValue sets the param value for an operation only simple types can be set.

Parameters:
id return by getNextInput()
string representation of the parameter
Returns:
true if successful,false if the values didnt match or occurrence constraint failed

bool WsdlInvoker::setInputValue const int  param,
std::vector< std::string >  values
 

bool WsdlInvoker::getNextOutput std::string &  name,
TypeContainer *&  tc
 

getNextOutput return the part/elem name and type container

TypeContainer * WsdlInvoker::getOutput const std::string &  name  ) 
 

getOutput return the type container which stores the output for the output part/elem name

void WsdlInvoker::setVerbose bool  f  )  [inline]
 

std::string WsdlInvoker::errors  )  [inline]
 

bool WsdlInvoker::status  )  const [inline]
 


The documentation for this class was generated from the following files:
Generated on Sun Oct 16 10:11:52 2005 for wsdlpull by  doxygen 1.3.9.1