SOAPMethod Class Reference

#include <SOAPMethod.h>

Inheritance diagram for SOAPMethod:

TestSOAP::MyData::Addition TestSOAP::MyData::Base64Test TestSOAP::MyData::Subtraction TestSOAPClient::SOAPMethodTable::CGenric List of all members.

Public Member Functions

 SOAPMethod ()
virtual ~SOAPMethod ()
virtual std::string methodName ()=0
virtual bool extractMethod (SOAPElement &theCall, SOAPElement &theMethod)
virtual std::string methodNameAttributes ()
virtual bool encode (SOAPEncoder &soapEncoder)=0
virtual bool execute (SOAPElement &theCall)
virtual SOAPFaultgetFault ()
void setFailed ()
bool succeeded ()
virtual bool isGeneric ()
 provide a run around the method encoding
virtual bool mustIUnderstand (SOAPElement &theCall)

Protected Member Functions

void unkownMethodFault (SOAPElement aMethod)
 provide a method for Unkown Method name Faults
void wrongNumberArgumentsFault (SOAPElement aMethod, const char *num)
 provide a method for Unkown Method name Faults
bool ImustUnderstand (SOAPElement aElement)
 provide a method to throw the understand fault

Protected Attributes

bool m_bSucceeded
std::auto_ptr< SOAPFaultm_pFault
 Stores a pointer to the fault data (if any).

Detailed Description

Definition at line 36 of file SOAPMethod.h.


Constructor & Destructor Documentation

SOAPMethod::SOAPMethod  ) 
 

SimpleSOAP Library: Implements a simplified version of SOAP (Simple Object Access Protocol).

Copyright (C) 2000 Scott Seely, scott@scottseely.com modifications by Gerard J. Cerchio gjpc@circlesoft.com

This library is public domain software

Definition at line 33 of file SOAPMethod.cpp.

SOAPMethod::~SOAPMethod  )  [virtual]
 

Definition at line 39 of file SOAPMethod.cpp.


Member Function Documentation

virtual bool SOAPMethod::encode SOAPEncoder soapEncoder  )  [pure virtual]
 

soapEncoder: Instance of the SOAPEncoder being used to, you guessed it, encode the response. Return Value: true: Succeeded in encoding the message. false: Failed to encode the message.

Implemented in TestSOAPClient::SOAPMethodTable::CGenric, TestSOAP::MyData::Addition, TestSOAP::MyData::Subtraction, and TestSOAP::MyData::Base64Test.

Referenced by SOAPEncoder::encodeMethod(), and SOAPEncoder::encodeMethodResonseContents().

bool SOAPMethod::execute SOAPElement theCall  )  [virtual]
 

Only to be called on the server by the dispatcher, this method executes the call and returns true if the call succeeded, false if it failed. SOAPMethods should keep any return data in a member variable. The information will be returned via a call to encode. Arugments: theCall: A SOAPElement (with possible embedded elements) that represents the call. Return Value: true: Call succeeded. false: Call failed.

Reimplemented in TestSOAP::MyData::Addition, TestSOAP::MyData::Subtraction, and TestSOAP::MyData::Base64Test.

Definition at line 111 of file SOAPMethod.cpp.

bool SOAPMethod::extractMethod SOAPElement theCall,
SOAPElement theMethod
[virtual]
 

extract the method from the call Return Value the method

Definition at line 79 of file SOAPMethod.cpp.

References SOAPFault::detail(), SOAPElement::elementAt(), SOAPFault::faultString(), SOAPElement::getElement(), getFault(), mustIUnderstand(), SOAPFault::MustUnderstand, SOAPElement::numElements(), setFailed(), and SOAPFault::setFaultCode().

SOAPFault * SOAPMethod::getFault  )  [virtual]
 

Return Value: Pointer to the fault if it exists.

Definition at line 131 of file SOAPMethod.cpp.

References m_pFault.

Referenced by extractMethod(), ImustUnderstand(), unkownMethodFault(), and wrongNumberArgumentsFault().

bool SOAPMethod::ImustUnderstand SOAPElement  aElement  )  [protected]
 

provide a method to throw the understand fault

Definition at line 167 of file SOAPMethod.cpp.

References SOAPElement::accessorName(), SOAPFault::detail(), SOAPFault::faultString(), getFault(), mustIUnderstand(), setFailed(), and SOAPFault::setSpecificFault().

Referenced by TestSOAP::MyData::Base64Test::execute(), TestSOAP::MyData::Subtraction::execute(), and TestSOAP::MyData::Addition::execute().

virtual bool SOAPMethod::isGeneric  )  [inline, virtual]
 

provide a run around the method encoding

Reimplemented in TestSOAPClient::SOAPMethodTable::CGenric.

Definition at line 133 of file SOAPMethod.h.

Referenced by SOAPEncoder::encodeMethod(), and SOAPEncoder::encodeMethodResonseContents().

virtual std::string SOAPMethod::methodName  )  [pure virtual]
 

Return Value: Returns the name of the method.

Implemented in TestSOAPClient::SOAPMethodTable::CGenric, TestSOAP::MyData::Addition, TestSOAP::MyData::Subtraction, and TestSOAP::MyData::Base64Test.

Referenced by SOAPEncoder::encodeMethod(), SOAPEncoder::encodeMethodResonseContents(), and SOAPonHTTP::send().

std::string SOAPMethod::methodNameAttributes  )  [virtual]
 

Used to get the attributes of the method. Some systems use namespace declarations to resolve handlers.

Reimplemented in TestSOAPClient::SOAPMethodTable::CGenric.

Definition at line 183 of file SOAPMethod.cpp.

Referenced by SOAPEncoder::encodeMethod(), and SOAPEncoder::encodeMethodResonseContents().

bool SOAPMethod::mustIUnderstand SOAPElement theCall  )  [virtual]
 

use to be a helper but colapsing some of the code we brought it inside

Definition at line 45 of file SOAPMethod.cpp.

References SOAPElement::elementAt(), SOAPElement::getElement(), SOAPElement::numElements(), and SOAPAttribute::value().

Referenced by extractMethod(), and ImustUnderstand().

void SOAPMethod::setFailed  ) 
 

Sets the status of the SOAP call to failed and triggers the creation of the SOAPFault.

Definition at line 125 of file SOAPMethod.cpp.

References m_bSucceeded, and m_pFault.

Referenced by extractMethod(), ImustUnderstand(), unkownMethodFault(), and wrongNumberArgumentsFault().

bool SOAPMethod::succeeded  ) 
 

Tells whether or not the call was successful. Arugments:

Definition at line 120 of file SOAPMethod.cpp.

References m_bSucceeded.

void SOAPMethod::unkownMethodFault SOAPElement  aMethod  )  [protected]
 

provide a method for Unkown Method name Faults

Definition at line 138 of file SOAPMethod.cpp.

References SOAPElement::accessorName(), SOAPFault::detail(), SOAPFault::faultString(), getFault(), setFailed(), and SOAPFault::setSpecificFault().

void SOAPMethod::wrongNumberArgumentsFault SOAPElement  aMethod,
const char *  num
[protected]
 

provide a method for Unkown Method name Faults

Definition at line 151 of file SOAPMethod.cpp.

References SOAPElement::accessorName(), SOAPFault::detail(), SOAPFault::faultString(), getFault(), SOAPElement::numElements(), setFailed(), and SOAPFault::setSpecificFault().


Member Data Documentation

bool SOAPMethod::m_bSucceeded [protected]
 

Definition at line 144 of file SOAPMethod.h.

Referenced by setFailed(), and succeeded().

std::auto_ptr<SOAPFault> SOAPMethod::m_pFault [protected]
 

Stores a pointer to the fault data (if any).

Definition at line 149 of file SOAPMethod.h.

Referenced by getFault(), and setFailed().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 09:10:16 2006 for Simple SOAP by  doxygen 1.4.6