Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Protected Member Functions | Protected Attributes
Arc::WSRFBaseFault Class Reference

Base class for WSRF fault messages. More...

#include <WSRFBaseFault.h>

Inheritance diagram for Arc::WSRFBaseFault:
Inheritance graph
[legend]
Collaboration diagram for Arc::WSRFBaseFault:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WSRFBaseFault (SOAPEnvelope &soap)
 Constructor - creates object out of supplied SOAP tree.
 WSRFBaseFault (const std::string &type)
 Constructor - creates new WSRF fault.
virtual ~WSRFBaseFault (void)
std::string Type (void)
Time Timestamp (void)
void Timestamp (Time)
WSAEndpointReference Originator (void)
void ErrorCode (const std::string &dialect, const XMLNode &error)
XMLNode ErrorCode (void)
std::string ErrorCodeDialect (void)
void Description (int pos, const std::string &desc, const std::string &lang)
std::string Description (int pos)
std::string DescriptionLang (int pos)
void FaultCause (int pos, const XMLNode &cause)
XMLNode FaultCause (int pos)
virtual SOAPEnvelope & SOAP (void)
 Direct access to underlying SOAP element.
virtual operator bool (void)
 Returns true if instance is valid.
virtual bool operator! (void)

Protected Member Functions

void set_namespaces (void)
 set WS-ResourceProperties namespaces and default prefixes in SOAP message

Protected Attributes

SOAPEnvelope & soap_
bool allocated_
 Associated SOAP message - it's SOAP message after all.
bool valid_
 true if soap_ needs to be deleted in destructor

Detailed Description

Base class for WSRF fault messages.

Use classes inherited from it for specific faults.

Definition at line 11 of file WSRFBaseFault.h.


Constructor & Destructor Documentation

Arc::WSRFBaseFault::WSRFBaseFault ( SOAPEnvelope &  soap)

Constructor - creates object out of supplied SOAP tree.

Definition at line 20 of file WSRFBaseFault.cpp.

                                              :WSRF(soap,WSRFBaseFaultAction) {
  if(!valid_) return;
  // Check if that is fault
  SOAPFault* fault = SOAP().Fault();
  if(!fault) { valid_=false; return; };
  // It must have timestamp
  XMLNode wsrf_fault = fault->Detail()[0];
  if(!(wsrf_fault["wsrf-bf:Timestamp"])) { valid_=false; return; };
}

Here is the call graph for this function:

Arc::WSRFBaseFault::WSRFBaseFault ( const std::string &  type)

Constructor - creates new WSRF fault.

Definition at line 30 of file WSRFBaseFault.cpp.

                                                 :WSRF(true,WSRFBaseFaultAction) {
  if(!valid_) return;
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return;
  fault->Detail(true).NewChild(type);
  // Timestamp(Time());
}

Here is the call graph for this function:

Arc::WSRFBaseFault::~WSRFBaseFault ( void  ) [virtual]

Definition at line 38 of file WSRFBaseFault.cpp.

                                  {
}

Member Function Documentation

void Arc::WSRFBaseFault::Description ( int  pos,
const std::string &  desc,
const std::string &  lang 
)

Definition at line 106 of file WSRFBaseFault.cpp.

                                                                                   {
  if(!valid_) return;
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return;
  XMLNode d = fault->Detail()[0].NewChild("wsrf-bf:Description",pos);
  d=desc;
  if(!lang.empty()) d.NewAttribute("wsrf-bf:lang")=lang;
}

Here is the call graph for this function:

std::string Arc::WSRFBaseFault::Description ( int  pos)

Definition at line 115 of file WSRFBaseFault.cpp.

                                            {
  if(!valid_) return XMLNode();
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return XMLNode();
  return fault->Detail()[0]["wsrf-bf:Description"][pos];
}

Here is the call graph for this function:

std::string Arc::WSRFBaseFault::DescriptionLang ( int  pos)

Definition at line 122 of file WSRFBaseFault.cpp.

                                                {
  if(!valid_) return XMLNode();
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return XMLNode();
  return fault->Detail()[0]["wsrf-bf:Description"][pos].Attribute("wsrf-bf:lang");
}

Here is the call graph for this function:

void Arc::WSRFBaseFault::ErrorCode ( const std::string &  dialect,
const XMLNode error 
)

Definition at line 74 of file WSRFBaseFault.cpp.

                                                             {
}

Definition at line 77 of file WSRFBaseFault.cpp.

                                     {
  if(!valid_) return XMLNode();
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return XMLNode();
  return fault->Detail()[0]["wsrf-bf:ErrorCode"];
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Arc::WSRFBaseFault::ErrorCodeDialect ( void  )

Definition at line 84 of file WSRFBaseFault.cpp.

                                              {
  return ErrorCode().Attribute("wsrf-bf:dialect");
}

Here is the call graph for this function:

void Arc::WSRFBaseFault::FaultCause ( int  pos,
const XMLNode cause 
)

Definition at line 88 of file WSRFBaseFault.cpp.

                                                           {
  if(!valid_) return;
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return;
  XMLNode fcause = fault->Detail()[0]["wsrf-bf:FaultCause"];
  if(!fcause) fcause=fault->Detail()[0].NewChild("wsrf-bf:FaultCause");
  fcause.NewChild(cause,pos);
}

Here is the call graph for this function:

Definition at line 97 of file WSRFBaseFault.cpp.

                                         {
  if(!valid_) return XMLNode();
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return XMLNode();
  XMLNode fcause = fault->Detail()[0]["wsrf-bf:FaultCause"];
  if(!fcause) return XMLNode();
  return fcause.Child(pos);
}

Here is the call graph for this function:

virtual Arc::WSRF::operator bool ( void  ) [inline, virtual, inherited]

Returns true if instance is valid.

Definition at line 27 of file WSRF.h.

{ return valid_; };
virtual bool Arc::WSRF::operator! ( void  ) [inline, virtual, inherited]

Definition at line 28 of file WSRF.h.

{ return !valid_; };

Definition at line 67 of file WSRFBaseFault.cpp.

                                                   {
  if(!valid_) return WSAEndpointReference();
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return WSAEndpointReference();
  return WSAEndpointReference(fault->Detail()[0]["wsrf-bf:Originator"]);
}

Here is the call graph for this function:

void Arc::WSRFBaseFault::set_namespaces ( void  ) [protected]

set WS-ResourceProperties namespaces and default prefixes in SOAP message

Reimplemented from Arc::WSRF.

Definition at line 11 of file WSRFBaseFault.cpp.

                                       {
  //XMLNode::NS ns;
  //ns["wsa"]="http://www.w3.org/2005/08/addressing";
  //ns["wsrf-bf"]="http://docs.oasis-open.org/wsrf/bf-2";
  //ns["wsrf-r"]="http://docs.oasis-open.org/wsrf/r-2";
  //ns["wsrf-rw"]="http://docs.oasis-open.org/wsrf/rw-2";
  //soap_.Namespaces(ns);
}
virtual SOAPEnvelope& Arc::WSRF::SOAP ( void  ) [inline, virtual, inherited]

Direct access to underlying SOAP element.

Definition at line 25 of file WSRF.h.

{ return soap_; };

Here is the caller graph for this function:

std::string Arc::WSRFBaseFault::Type ( void  )

Definition at line 41 of file WSRFBaseFault.cpp.

                                  {
  if(!valid_) return "";
  SOAPFault* fault = SOAP().Fault();
  if(!fault) return "";
  return fault->Detail()[0].Name();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

bool Arc::WSRF::allocated_ [protected, inherited]

Associated SOAP message - it's SOAP message after all.

Definition at line 14 of file WSRF.h.

SOAPEnvelope& Arc::WSRF::soap_ [protected, inherited]

Definition at line 13 of file WSRF.h.

bool Arc::WSRF::valid_ [protected, inherited]

true if soap_ needs to be deleted in destructor

Definition at line 15 of file WSRF.h.


The documentation for this class was generated from the following files: