com.HTTPPart.CreateFromDomDocument

Creates a new HTTPPart object based on given XML document.

Syntax

CreateFromDomDocument(
   doc xml.DomDocument )
  RETURNS com.HTTPPart
  1. doc specifies an XML document.

Usage

Creates a new HTTPPart object based on given XML document. To be used via the addPart() method.

Defaults HTTP multipart headers:
  • Content-Type: text/xml; charset=UTF-8
  • Content-Transfer-Encoding: 8bits

A different charset can be set with the setHeader method. For example, setHeader("Content-Type","text/plain; charset=ISO-8859-1") sets the charset to ISO-8859-1.

In case of error, the method throws an exception and sets the STATUS variable. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).