WSDL::WSMessage Class Reference

web service message class More...

Inheritance diagram for WSDL::WSMessage:
[legend]

## Public Member Functions

auto | serializeRpcValue (string part, bool encoded, reference h, reference ons)
*hash< auto > | serializeRpc (*softlist< auto > parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, string n_name, bool encoded, reference h, bool fault)
| serializes data into a hash with SOAP namespaces etc. with RPC-style messages More...
*hash< auto > | serializeDocument (*softlist< auto > parts, *WSDL::BindingMessageDescription msginfo, *MultiPartRelatedMessage mpm, bool encoded, reference h, bool fault)
| serializes data into a hash with SOAP namespaces etc. with document-style messages More...
*hash< auto > | deserializeRpc (*hash< auto > mrh, hash< auto > val, *string part)
| deserialize RPC message More...
hash< auto > | serializeAllPartData (*hash< auto > val)
| serialize all values as string or binary More...
hash< auto > | serializeData (Namespaces nsc, string key, *hash< auto > val)
| serialized value of particular type value as string or binary More...
hash< auto > | deserializeData (string part, hash< auto > val)
| deserialize value in string or binary form More...
hash< auto > | deserializeAllPartData (hash< auto > val)
| deserialize all values in string or binary form More...
string | checkPart (string pname)
| check if pname is defined as message part More...

## Public Attributes

hash< string, hash< WSDL::ArgInfo > > | args
| args keys are part names for types reps. element names for element. Definition must provide unique values.
hash< string, string > | pmap
hash< string, XsdAbstractType > | tmap
| type map
| private
| find part in value, remove that value from the hash More...
Public Attributes inherited from WSDL::XsdNamedData
*string | ns
| input namespace prefix (if any given)
| descriptive_name
| descriptive name flag

## Detailed Description

web service message class

Message definition consists of part definition. Part name is important for simple types to name it at both SOAP and Qore side (hash key). For elements is not used at the SOAP side, it implies condition the element name must be unique in message. In the other words it's forbidden definition of two parts with the same element. It's unclear if is legal in Wsdl and how to handle it. Class raises exception if detects it. The part name is also used for references from binding (header, content).

## Member Function Documentation

## checkPart()

string WSDL::WSMessage::checkPart | ( | string | pname | ) |

check if pname is defined as message part

Returns
  translated part name to element/type name

## deserializeAllPartData()

hash<auto> WSDL::WSMessage::deserializeAllPartData | ( | hash< auto > | val | ) |

deserialize all values in string or binary form

Returns
  hash of all parts in key-value pair

## deserializeData()

hash<auto> WSDL::WSMessage::deserializeData | ( | string | part,
|  | hash< auto > | val
| ) |  |

deserialize value in string or binary form

Returns
  hash<auto> in key-value pair

## deserializeRpc()

*hash<auto> WSDL::WSMessage::deserializeRpc | ( | *hash< auto > | mrh,
|  | hash< auto > | val,
|  | *string | part
| ) |  |

deserialize RPC message

Parameters

  val,keys | are element names or part names for simple types
  part | if exists then deserialize only particular part

Returns
  serialized data, keys are wsdl element names (optionally part name is also possible) and part names for simple types

## serializeAllPartData()

hash<auto> WSDL::WSMessage::serializeAllPartData | ( | *hash< auto > | val | ) |

serialize all values as string or binary

Returns
  hash of all parts in key-value pair

## serializeData()

hash<auto> WSDL::WSMessage::serializeData | ( | Namespaces | nsc,
|  | string | key,
|  | *hash< auto > | val
| ) |  |

serialized value of particular type value as string or binary

Parameters

  val | value to be resolved
  key | member name, it is requires reference to a simple type, not compaund element

Returns
  as hash with 'value' and optional 'content-type' key passed from v.content-type if exists

## serializeDocument()

*hash<auto> WSDL::WSMessage::serializeDocument | ( | *softlist< auto > | parts,
|  | *WSDL::BindingMessageDescription | msginfo,
|  | *MultiPartRelatedMessage | mpm,
|  | bool | encoded,
|  | reference | h,
|  | bool | fault
| ) |  |

serializes data into a hash with SOAP namespaces etc. with document-style messages

Parameters

  parts | if present then serializes only particular element or part, if NOTHING then serializes all message elements
  msginfo | a description of the message for the current binding, if available
  mpm | a multipart message object, for future use
  encoded | if the encoded use module should be used (or the literal use model)
  h | data to be serialized, keys are wsdl element names (optionally part name is also possible) and part names for simple types
  fault | True if serializing a fault response

## serializeRpc()

*hash<auto> WSDL::WSMessage::serializeRpc | ( | *softlist< auto > | parts,
|  | *WSDL::BindingMessageDescription | msginfo,
|  | *MultiPartRelatedMessage | mpm,
|  | string | n_name,
|  | bool | encoded,
|  | reference | h,
|  | bool | fault
| ) |  |

serializes data into a hash with SOAP namespaces etc. with RPC-style messages

Parameters

  parts | if present then serializes only particular element or part, if NOTHING then serializes all message elements
  msginfo | a description of the message for the current binding, if available
  n_name | name of output key
  encoded | if the encoded use module should be used (or the literal use model)
  h | data to be serialized, keys are wsdl element names (or optionally the part name) and part names for simple types
  fault | True if serializing a fault response

## serializeRpcValue()

auto WSDL::WSMessage::serializeRpcValue | ( | string | part,
|  | bool | encoded,
|  | reference | h,
|  | reference | ons
| ) |  |

Just serialize value and return namespace

Parameters

  ons | is reference to string

## Member Data Documentation

## pmap

hash<string, string> WSDL::WSMessage::pmap

part map; maps element names to part names maps part names to args key, all parts are in hash

## private

WSDL::WSMessage::private

find part in value, remove that value from the hash

when only one arg then try to get values based on element keys

Parameters

  ename | element/type name
  reference | to hash, supposed structure is [msgname.](partname|elemname) = value to support more message data in one hash
  removeFound | if True found values are removed from the hash

Returns
  resolved value, if not found then returns NOTHING