xml.StaxWriter.writeTo

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

Syntax

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

Usage

This method sets the output stream of the StaxWriter object to a file or a URL specified in name, and starts the streaming.

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")
In the example printerlist alias is defined in fglprofile as ws.printerlist.url = "http://myserver:1100/documents/ptinterList.xml".