SoupSoapResponse

SoupSoapResponse — A SOAP response

Synopsis




                    SoupSoapResponse;
typedef             SoupSoapParameter;
SoupSoapResponse*   soup_soap_response_new              (void);
SoupSoapResponse*   soup_soap_response_new_from_string  (const char *xmlstr);
void                soup_soap_response_set_method_name  (SoupSoapResponse *response,
                                                         const char *method_name);
SoupSoapParameter*  soup_soap_parameter_get_first_child (SoupSoapParameter *param);
SoupSoapParameter*  soup_soap_parameter_get_first_child_by_name
                                                        (SoupSoapParameter *param,
                                                         const char *name);
int                 soup_soap_parameter_get_int_value   (SoupSoapParameter *param);
const char*         soup_soap_parameter_get_name        (SoupSoapParameter *param);
SoupSoapParameter*  soup_soap_parameter_get_next_child  (SoupSoapParameter *param);
SoupSoapParameter*  soup_soap_parameter_get_next_child_by_name
                                                        (SoupSoapParameter *param,
                                                         const char *name);
char*               soup_soap_parameter_get_property    (SoupSoapParameter *param,
                                                         const char *prop_name);
char*               soup_soap_parameter_get_string_value
                                                        (SoupSoapParameter *param);
gboolean            soup_soap_response_from_string      (SoupSoapResponse *response,
                                                         const char *xmlstr);
SoupSoapParameter*  soup_soap_response_get_first_parameter
                                                        (SoupSoapResponse *response);
SoupSoapParameter*  soup_soap_response_get_first_parameter_by_name
                                                        (SoupSoapResponse *response,
                                                         const char *name);
const char*         soup_soap_response_get_method_name  (SoupSoapResponse *response);
SoupSoapParameter*  soup_soap_response_get_next_parameter
                                                        (SoupSoapResponse *response,
                                                         SoupSoapParameter *from);
SoupSoapParameter*  soup_soap_response_get_next_parameter_by_name
                                                        (SoupSoapResponse *response,
                                                         SoupSoapParameter *from,
                                                         const char *name);
const GList*        soup_soap_response_get_parameters   (SoupSoapResponse *response);

Object Hierarchy


  GObject
   +----SoupSoapResponse

Description

Details

SoupSoapResponse

typedef struct _SoupSoapResponse SoupSoapResponse;


SoupSoapParameter

typedef xmlNode SoupSoapParameter;


soup_soap_response_new ()

SoupSoapResponse*   soup_soap_response_new              (void);

Create a new empty SoupSoapResponse object, which can be modified with the accessor functions provided with this class.

Returns :

the new SoupSoapResponse (or NULL if there was an error).

soup_soap_response_new_from_string ()

SoupSoapResponse*   soup_soap_response_new_from_string  (const char *xmlstr);

Create a new SoupSoapResponse object from the XML string contained in xmlstr.

xmlstr :

the XML string to parse.

Returns :

the new SoupSoapResponse (or NULL if there was an error).

soup_soap_response_set_method_name ()

void                soup_soap_response_set_method_name  (SoupSoapResponse *response,
                                                         const char *method_name);

Sets the method name on the given SoupSoapResponse.

response :

the SoupSoapResponse object.

method_name :

the method name to set.

soup_soap_parameter_get_first_child ()

SoupSoapParameter*  soup_soap_parameter_get_first_child (SoupSoapParameter *param);

Gets the first child of the given SoupSoapParameter. This is used for compound data types, which can contain several parameters themselves.

param :

A SoupSoapParameter.

Returns :

the first child or NULL if there are no children.

soup_soap_parameter_get_first_child_by_name ()

SoupSoapParameter*  soup_soap_parameter_get_first_child_by_name
                                                        (SoupSoapParameter *param,
                                                         const char *name);

Gets the first child of the given SoupSoapParameter whose name is name.

param :

A SoupSoapParameter.

name :

The name of the child parameter to look for.

Returns :

the first child with the given name or NULL if there are no children.

soup_soap_parameter_get_int_value ()

int                 soup_soap_parameter_get_int_value   (SoupSoapParameter *param);

Returns the parameter's (integer) value.

param :

the parameter

Returns :

the parameter value as an integer

soup_soap_parameter_get_name ()

const char*         soup_soap_parameter_get_name        (SoupSoapParameter *param);

Returns the parameter name.

param :

the parameter

Returns :

the parameter name.

soup_soap_parameter_get_next_child ()

SoupSoapParameter*  soup_soap_parameter_get_next_child  (SoupSoapParameter *param);

Gets the next sibling of the given SoupSoapParameter. This is used for compound data types, which can contain several parameters themselves.

FIXME: the name of this method is wrong

param :

A SoupSoapParameter.

Returns :

the next sibling, or NULL if there are no more siblings.

soup_soap_parameter_get_next_child_by_name ()

SoupSoapParameter*  soup_soap_parameter_get_next_child_by_name
                                                        (SoupSoapParameter *param,
                                                         const char *name);

Gets the next sibling of the given SoupSoapParameter whose name is name.

FIXME: the name of this method is wrong

param :

A SoupSoapParameter.

name :

The name of the sibling parameter to look for.

Returns :

the next sibling with the given name, or NULL

soup_soap_parameter_get_property ()

char*               soup_soap_parameter_get_property    (SoupSoapParameter *param,
                                                         const char *prop_name);

Returns the named property of param.

param :

the parameter

prop_name :

Name of the property to retrieve.

Returns :

the property, which must be freed by the caller.

soup_soap_parameter_get_string_value ()

char*               soup_soap_parameter_get_string_value
                                                        (SoupSoapParameter *param);

Returns the parameter's value.

param :

the parameter

Returns :

the parameter value as a string, which must be freed by the caller.

soup_soap_response_from_string ()

gboolean            soup_soap_response_from_string      (SoupSoapResponse *response,
                                                         const char *xmlstr);

Parses the string contained in xmlstr and sets all properties from it in the response object.

response :

the SoupSoapResponse object.

xmlstr :

XML string to parse.

Returns :

TRUE if successful, FALSE otherwise.

soup_soap_response_get_first_parameter ()

SoupSoapParameter*  soup_soap_response_get_first_parameter
                                                        (SoupSoapResponse *response);

Retrieves the first parameter contained in the SOAP response.

response :

the SoupSoapResponse object.

Returns :

a SoupSoapParameter representing the first parameter, or NULL if there are no parameters.

soup_soap_response_get_first_parameter_by_name ()

SoupSoapParameter*  soup_soap_response_get_first_parameter_by_name
                                                        (SoupSoapResponse *response,
                                                         const char *name);

Retrieves the first parameter contained in the SOAP response whose name is name.

response :

the SoupSoapResponse object.

name :

the name of the parameter to look for.

Returns :

a SoupSoapParameter representing the first parameter with the given name, or NULL.

soup_soap_response_get_method_name ()

const char*         soup_soap_response_get_method_name  (SoupSoapResponse *response);

Gets the method name from the SOAP response.

response :

the SoupSoapResponse object.

Returns :

the method name.

soup_soap_response_get_next_parameter ()

SoupSoapParameter*  soup_soap_response_get_next_parameter
                                                        (SoupSoapResponse *response,
                                                         SoupSoapParameter *from);

Retrieves the parameter following from in the SoupSoapResponse object.

response :

the SoupSoapResponse object.

from :

the parameter to start from.

Returns :

a SoupSoapParameter representing the parameter.

soup_soap_response_get_next_parameter_by_name ()

SoupSoapParameter*  soup_soap_response_get_next_parameter_by_name
                                                        (SoupSoapResponse *response,
                                                         SoupSoapParameter *from,
                                                         const char *name);

Retrieves the first parameter following from in the SoupSoapResponse object whose name matches name.

response :

the SoupSoapResponse object.

from :

the parameter to start from.

name :

the name of the parameter to look for.

Returns :

a SoupSoapParameter representing the parameter.

soup_soap_response_get_parameters ()

const GList*        soup_soap_response_get_parameters   (SoupSoapResponse *response);

Returns the list of parameters received in the SOAP response.

response :

the SoupSoapResponse object.

Returns :

a list of SoupSoapParameter