SOUP Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
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.
xmlDocPtr soup_serializer_get_xml_doc (SoupSerializer *ser); |
Returns the internal xml representation tree of the SoupSerializer pointed to by ser.
void soup_serializer_free (SoupSerializer *ser); |
Frees the SoupSerializer pointed to by ser, and the internal XML represetation of the SOAP message.
void soup_serializer_start_envelope (SoupSerializer *ser); |
Starts the top level SOAP Envelope element.
void soup_serializer_end_envelope (SoupSerializer *ser); |
Closes the top level SOAP Envelope element.
void soup_serializer_start_body (SoupSerializer *ser); |
Starts the SOAP Body element.
void soup_serializer_end_body (SoupSerializer *ser); |
Closes the SOAP Body element.
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.
void soup_serializer_end_element (SoupSerializer *ser); |
Close the current message element.
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.
void soup_serializer_end_fault (SoupSerializer *ser); |
Close the current SOAP Fault element.
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.
void soup_serializer_end_fault_detail (SoupSerializer *ser); |
Closes the current SOAP faultdetail element.
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.
void soup_serializer_end_header (SoupSerializer *ser); |
Close the current SOAP Header element.
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
void soup_serializer_write_int (SoupSerializer *ser, glong i); |
Writes the stringified value of i as the current element's content.
void soup_serializer_write_double (SoupSerializer *ser, gdouble d); |
Writes the stringified value of i as the current element's content.
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.
void soup_serializer_write_time (SoupSerializer *ser, const time_t *timeval); |
Writes the stringified value of timeval as the current element's content.
void soup_serializer_write_string (SoupSerializer *ser, const gchar *string); |
Writes the string as the current element's content.
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.
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.
void soup_serializer_set_null (SoupSerializer *ser); |
Sets the current element's XML Schema xsi:null attribute.
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.
void soup_serializer_add_namespace (SoupSerializer *ser, const gchar *prefix, const gchar *ns_uri); |
Adds a new XML namespace to the current element.
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.
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.
void soup_serializer_reset (SoupSerializer *ser); |
Reset the internal XML representation of the SOAP message.
void soup_serializer_persist (SoupSerializer *ser, SoupDataBuffer *dest); |
Writes the serialized XML tree to the SoupDataBuffer pointed to by dest.