Qore WSDL Module Reference  0.4
WSDL::WSMessage Class Reference

web service message class More...

Inheritance diagram for WSDL::WSMessage:

Public Member Methods

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
 
- Public Attributes inherited from WSDL::XsdNamedData
*string ns
 input namespace prefix (if any given)
 
 descriptive_name
 descriptive name flag
 

Private:Internal Member Methods

auto getValueFromHash (string ename, reference v, bool removeFound)
 find part in value, remove that value from the hash More...
 
auto getValueFromHash (*WSDL::XsdElement element, reference v, bool removeFound)
 when only one arg then try to get values based on element keys
 

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,keysare element names or part names for simple types
partif 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

◆ getValueFromHash()

auto WSDL::WSMessage::getValueFromHash ( string  ename,
reference  v,
bool  removeFound 
)
private:internal

find part in value, remove that value from the hash

Parameters
enameelement/type name
vreference to hash, supposed structure is [msgname.](partname|elemname) = value to support more message data in one hash
removeFoundif True found values are removed from the hash
Returns
resolved value, if not found then returns NOTHING

◆ 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
valvalue to be resolved
keymember 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
partsif present then serializes only particular element or part, if NOTHING then serializes all message elements
msginfoa description of the message for the current binding, if available
mpma multipart message object, for future use
encodedif the encoded use module should be used (or the literal use model)
hdata to be serialized, keys are wsdl element names (optionally part name is also possible) and part names for simple types
faultTrue 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
partsif present then serializes only particular element or part, if NOTHING then serializes all message elements
msginfoa description of the message for the current binding, if available
n_namename of output key
encodedif the encoded use module should be used (or the literal use model)
hdata to be serialized, keys are wsdl element names (or optionally the part name) and part names for simple types
faultTrue 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
onsis 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