xml.StaxWriter.writeTo

Sets the output stream of the StaxWriter object to a file or an URL, and starts the streaming.

Syntax

writeTo(
   url STRING )
  1. url is a valid URL or the name of the file that will contain the resulting XML document.

Usage

Only the following kinds of URLs are supported:
  • http://
  • https://
  • tcp://
  • tcps://
  • file:///
  • alias://

See FGLPROFILE Configuration for more details about URL mapping with aliases, and for proxy and security configuration.

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

Examples

writeTo("printerList.xml")
writeTo("http://myserver:1100/documents/printerList.xml")
writeTo("https://myserver:1100/documents/printerList.xml")
writeTo("alias://printerlist")
where printerlist alias is defined in fglprofile as ws.printerlist.url = "http://myserver:1100/documents/ptinterList.xml".