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).