# PSOAPMessage Class Reference

SOAP message according to http://www.w3.org/TR/SOAP/. More...

`#include <psoap.h>`

Inheritance diagram for PSOAPMessage:

List of all members.

## Public Types

| NoFault
| Everything is alright.
| VersionMismatch
| Invalid namespace for SOAP Envelope.
| MustUnderstand
| Error processing SOAP Header field "mustUnderstand".
| Client
| The request was incorrectly formed or did not contain the appropriate information in order to succeed.
| Server
| The request could not be processed for reasons not directly attributable to the contents of the message itself but rather to the processing of the message.
enum | { NoFault, VersionMismatch, MustUnderstand, Client, Server }
| State of the PSOAPMessage when used as a response. More...

## Public Member Functions

| PSOAPMessage (int options=PXMLParser::Indent+PXMLParser::NewLineAfterElement)
| Construct a SOAP message.
| PSOAPMessage (const PString &method, const PString &nameSpace)
| Construct a SOAP message with method name and namespace already provided.
void | SetMethod (const PString &name, const PString &nameSpace, const PString &methodPrefix="m:")
| Set the method name and namespace.
void | GetMethod (PString &name, PString &nameSpace)
| Get the method name and namespace.
void | AddParameter (PString name, PString type, PString value)
| Add a simple parameter called name, with type type and value value.
void | AddParameter (PXMLElement *parameter, PBoolean dirty=true)
| Add a parameter using a PXMLElement.
PBoolean | GetParameter (const PString &name, PString &value)
| Get parameter "name" with type "string".
PBoolean | GetParameter (const PString &name, int &value)
| Get parameter "name" with type "int".
PXMLElement * | GetParameter (const PString &name)
| Get parameter "name".
PBoolean | Load (const PString &str)
| Parse a string for a valid SOAP message.
PINDEX | GetFaultCode () const
PString | GetFaultText () const
void | SetFault (PINDEX code, const PString &text)

## Detailed Description

SOAP message according to http://www.w3.org/TR/SOAP/.

## Member Enumeration Documentation

anonymous enum

State of the PSOAPMessage when used as a response.

Enumerator:

  NoFault | Everything is alright.
  VersionMismatch | Invalid namespace for SOAP Envelope.
  MustUnderstand | Error processing SOAP Header field "mustUnderstand".
  Client | The request was incorrectly formed or did not contain the appropriate information in order to succeed.
  Server | The request could not be processed for reasons not directly attributable to the contents of the message itself but rather to the processing of the message.

## Constructor & Destructor Documentation

PSOAPMessage::PSOAPMessage | ( | int | options = `PXMLParser::Indent+PXMLParser::NewLineAfterElement` | ) |

Construct a SOAP message.

PSOAPMessage::PSOAPMessage | ( | const PString & | method,
|  | const PString & | nameSpace |
| ) |  |  |

Construct a SOAP message with method name and namespace already provided.

## Member Function Documentation

void PSOAPMessage::AddParameter | ( | PXMLElement * | parameter,
|  | PBoolean | dirty = `true` |
| ) |  |  |

Add a parameter using a PXMLElement.

void PSOAPMessage::AddParameter | ( | PString | name,
|  | PString | type,
|  | PString | value |
| ) |  |  |

Add a simple parameter called name, with type type and value value.

PINDEX PSOAPMessage::GetFaultCode | ( |  | ) | const`[inline]`

PString PSOAPMessage::GetFaultText | ( |  | ) | const`[inline]`

void PSOAPMessage::GetMethod | ( | PString & | name,
|  | PString & | nameSpace |
| ) |  |  |

Get the method name and namespace.

PXMLElement* PSOAPMessage::GetParameter | ( | const PString & | name | ) |

Get parameter "name".

PBoolean PSOAPMessage::GetParameter | ( | const PString & | name,
|  | int & | value |
| ) |  |  |

Get parameter "name" with type "int".

PBoolean PSOAPMessage::GetParameter | ( | const PString & | name,
|  | PString & | value |
| ) |  |  |

Get parameter "name" with type "string".

PBoolean PSOAPMessage::Load | ( | const PString & | str | ) |

Parse a string for a valid SOAP message.

void PSOAPMessage::SetFault | ( | PINDEX | code,
|  | const PString & | text |
| ) |  |  |

void PSOAPMessage::SetMethod | ( | const PString & | name,
|  | const PString & | nameSpace,
|  | const PString & | methodPrefix = `"m:"` |
| ) |  |  |

Set the method name and namespace.

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

- psoap.h