![]() | ![]() | ![]() | SOUP Reference Manual | ![]() |
---|
struct SoupSerializer; SoupSerializer* soup_serializer_new (void); SoupSerializer* soup_serializer_new_full (gboolean standalone, const gchar *xml_encoding, const gchar *env_prefix, const gchar *env_uri); xmlDocPtr soup_serializer_get_xml_doc (SoupSerializer *ser); void soup_serializer_free (SoupSerializer *ser); void soup_serializer_start_envelope (SoupSerializer *ser); void soup_serializer_end_envelope (SoupSerializer *ser); void soup_serializer_start_body (SoupSerializer *ser); void soup_serializer_end_body (SoupSerializer *ser); void soup_serializer_start_element (SoupSerializer *ser, const gchar *name, const gchar *prefix, const gchar *ns_uri); void soup_serializer_end_element (SoupSerializer *ser); void soup_serializer_start_fault (SoupSerializer *ser, const gchar *faultcode, const gchar *faultstring, const gchar *faultactor); void soup_serializer_end_fault (SoupSerializer *ser); void soup_serializer_start_fault_detail (SoupSerializer *ser); void soup_serializer_end_fault_detail (SoupSerializer *ser); void soup_serializer_start_header (SoupSerializer *ser); void soup_serializer_end_header (SoupSerializer *ser); void soup_serializer_start_header_element (SoupSerializer *ser, const gchar *name, gboolean must_understand, const gchar *actor_uri, const gchar *prefix, const gchar *ns_uri); void soup_serializer_end_header_element (SoupSerializer *ser); void soup_serializer_write_int (SoupSerializer *ser, glong i); void soup_serializer_write_double (SoupSerializer *ser, gdouble d); void soup_serializer_write_base64 (SoupSerializer *ser, const gchar *string, guint len); void soup_serializer_write_time (SoupSerializer *ser, const time_t *timeval); void soup_serializer_write_string (SoupSerializer *ser, const gchar *string); void soup_serializer_write_buffer (SoupSerializer *ser, const gchar *buffer, guint length); void soup_serializer_set_type (SoupSerializer *ser, const gchar *xsi_type); void soup_serializer_set_null (SoupSerializer *ser); void soup_serializer_add_attribute (SoupSerializer *ser, const gchar *name, const gchar *value, const gchar *prefix, const gchar *ns_uri); void soup_serializer_add_namespace (SoupSerializer *ser, const gchar *prefix, const gchar *ns_uri); void soup_serializer_set_default_namespace (SoupSerializer *ser, const gchar *ns_uri); void soup_serializer_set_encoding_style (SoupSerializer *ser, const gchar *enc_style); void soup_serializer_reset (SoupSerializer *ser); void soup_serializer_persist (SoupSerializer *ser, SoupDataBuffer *dest);
SoupSerializer* soup_serializer_new (void);
Creates a new SoupSerializer.
Returns : | The created SoupSerializer. |
SoupSerializer* soup_serializer_new_full (gboolean standalone, const gchar *xml_encoding, const gchar *env_prefix, const gchar *env_uri);
Creates a new SoupSerializer, using xml_encoding as the encoding attribute for the document, env_prefix as the default XML Namespace prefix for all SOAP elements, and env_uri as the XML Namespace uri for SOAP elements.
standalone : |
|
xml_encoding : |
|
env_prefix : |
|
env_uri : |
|
Returns : | The created SoupSerializer. |
xmlDocPtr soup_serializer_get_xml_doc (SoupSerializer *ser);
Returns the internal xml representation tree of the SoupSerializer pointed to by ser.
ser : | the SoupSerializer |
Returns : | the xmlDocPtr representing the SOAP message. |
void soup_serializer_free (SoupSerializer *ser);
Frees the SoupSerializer pointed to by ser, and the internal XML represetation of the SOAP message.
ser : | the SoupSerializer |
void soup_serializer_start_envelope (SoupSerializer *ser);
Starts the top level SOAP Envelope element.
ser : | the SoupSerializer |
void soup_serializer_end_envelope (SoupSerializer *ser);
Closes the top level SOAP Envelope element.
ser : | the SoupSerializer |
void soup_serializer_start_body (SoupSerializer *ser);
Starts the SOAP Body element.
ser : | the SoupSerializer |
void soup_serializer_end_body (SoupSerializer *ser);
Closes the SOAP Body element.
ser : | the SoupSerializer |
void soup_serializer_start_element (SoupSerializer *ser, const gchar *name, const gchar *prefix, const gchar *ns_uri);
Starts a new arbitrary message element, with name as the element name, prefix as the XML Namespace prefix, and ns_uri as the XML Namespace uri for the created element.
Passing prefix with no ns_uri will cause a recursive search for an existing namespace with the same prefix. Failing that a new ns will be created with an empty uri.
Passing both prefix and ns_uri always causes new namespace attribute creation.
Passing NULL for both prefix and ns_uri causes no prefix to be used, and the element will be in the default namespace.
ser : | the SoupSerializer |
name : | the element name. |
prefix : | the namespace prefix |
ns_uri : | the namespace URI |
void soup_serializer_end_element (SoupSerializer *ser);
Close the current message element.
ser : | the SoupSerializer |
void soup_serializer_start_fault (SoupSerializer *ser, const gchar *faultcode, const gchar *faultstring, const gchar *faultactor);
Starts a new SOAP Fault element, creating faultcode, faultstring, and faultactor child elements.
If you wish to add the faultdetail element, use soup_serializer_start_fault_detail, and then soup_serializer_start_element to add arbitrary sub-elements.
ser : | the SoupSerializer |
faultcode : | faultcode element value |
faultstring : | faultstring element value |
faultactor : | faultactor element value |
void soup_serializer_end_fault (SoupSerializer *ser);
Close the current SOAP Fault element.
ser : | the SoupSerializer |
void soup_serializer_start_fault_detail (SoupSerializer *ser);
Start the faultdetail child element of the current SOAP Fault element. The faultdetail element allows arbitrary data to be sent in a returned fault.
ser : | the SoupSerializer |
void soup_serializer_end_fault_detail (SoupSerializer *ser);
Closes the current SOAP faultdetail element.
ser : | the SoupSerializer |
void soup_serializer_start_header (SoupSerializer *ser);
Creates a new SOAP Header element. You can call soup_serializer_start_header_element after this to add a new header child element. SOAP Header elements allow out-of-band data to be transferred while not interfering with the message body.
This should be called after soup_serializer_start_envelope and before soup_serializer_start_body.
ser : | the SoupSerializer |
void soup_serializer_end_header (SoupSerializer *ser);
Close the current SOAP Header element.
ser : | the SoupSerializer |
void soup_serializer_start_header_element (SoupSerializer *ser, const gchar *name, gboolean must_understand, const gchar *actor_uri, const gchar *prefix, const gchar *ns_uri);
Starts a new SOAP arbitrary header element.
ser : | the SoupSerializer |
name : | name of the header element |
must_understand : | whether the recipient must understand the header in order to proceed with processing the message |
actor_uri : | the URI which represents the destination actor for this header. |
prefix : | the namespace prefix |
ns_uri : | the namespace URI |
void soup_serializer_end_header_element (SoupSerializer *ser);
Closes the current SOAP header element
ser : | the SoupSerializer |
void soup_serializer_write_int (SoupSerializer *ser, glong i);
Writes the stringified value of i as the current element's content.
ser : | the SoupSerializer |
i : | the integer value to write. |
void soup_serializer_write_double (SoupSerializer *ser, gdouble d);
Writes the stringified value of i as the current element's content.
ser : | the SoupSerializer |
d : | the double value to write |
void soup_serializer_write_base64 (SoupSerializer *ser, const gchar *string, guint len);
Writes the Base-64 encoded value of string as the current element's content.
ser : | the SoupSerializer |
string : | the binary data buffer to encode |
len : | the length of data to encode |
void soup_serializer_write_time (SoupSerializer *ser, const time_t *timeval);
Writes the stringified value of timeval as the current element's content.
ser : | the SoupSerializer |
timeval : | pointer to a time_t to encode |
void soup_serializer_write_string (SoupSerializer *ser, const gchar *string);
Writes the string as the current element's content.
ser : | the SoupSerializer |
string : | string to write |
void soup_serializer_write_buffer (SoupSerializer *ser, const gchar *buffer, guint length);
Writes the string buffer pointed to by buffer and the current element's content.
ser : | the SoupSerializer |
buffer : | the string data buffer to write |
length : | length of buffer |
void soup_serializer_set_type (SoupSerializer *ser, const gchar *xsi_type);
Sets the current element's XML Schema xsi:type attribute, which specifies the element's type name.
ser : | the SoupSerializer |
xsi_type : | the type name for the element. |
void soup_serializer_set_null (SoupSerializer *ser);
Sets the current element's XML Schema xsi:null attribute.
ser : | the SoupSerializer |
void soup_serializer_add_attribute (SoupSerializer *ser, const gchar *name, const gchar *value, const gchar *prefix, const gchar *ns_uri);
Adds an XML attribute to the current element.
ser : | the SoupSerializer |
name : | name of the attribute |
value : | value of the attribute |
prefix : | the namespace prefix |
ns_uri : | the namespace URI |
void soup_serializer_add_namespace (SoupSerializer *ser, const gchar *prefix, const gchar *ns_uri);
Adds a new XML namespace to the current element.
ser : | the SoupSerializer |
prefix : | the namespace prefix |
ns_uri : | the namespace URI, or NULL for empty namespace |
void soup_serializer_set_default_namespace (SoupSerializer *ser, const gchar *ns_uri);
Sets the default namespace to the URI specified in ns_uri. The default namespace becomes the namespace all non-explicitly namespaced child elements fall into.
ser : | the SoupSerializer |
ns_uri : | the namespace URI |
void soup_serializer_set_encoding_style (SoupSerializer *ser, const gchar *enc_style);
Sets the encodingStyle attribute on the current element to the value of enc_style.
ser : | the SoupSerializer |
enc_style : | the new encodingStyle value |
void soup_serializer_reset (SoupSerializer *ser);
Reset the internal XML representation of the SOAP message.
ser : | the SoupSerializer |
void soup_serializer_persist (SoupSerializer *ser, SoupDataBuffer *dest);
Writes the serialized XML tree to the SoupDataBuffer pointed to by dest.
ser : | the SoupSerializer |
dest : | the destination SoupDataBuffer |
<<< soup-parser | soup-server >>> |