About the xmlFormat Value
When a client submits an XML document via HTTP, the action that Integration Server takes when it receives the XML document is based on the xmlFormat value. The xmlFormat value determines:
Whether
Integration Server parses the XML document automatically before passing it to the service
Which XML parser
Integration Server uses. When parsing an XML document,
Integration Server uses either the legacy XML parser or the enhanced XML parser. For more information about the XML parsers, see
webMethods Integration Server Administrator’s Guide.
The name and data type of the variable that
Integration Server adds to the pipeline with the contents of the XML document
The following table describes the actions that Integration Server can take based on the xmlFormat value:
xmlFormat value | Integration Server Action |
bytes | Integration Server passes the XML document directly to the service as a byte array without parsing the XML. Integration Server places the byte array in the input pipeline of the target service in a variable named xmlBytes. |
enhanced | Integration Server parses the XML using the enhanced XML parser automatically. Integration Server uses the default options specified for enhanced XML parsing on the Settings > Enhanced XML Parsing page in Integration Server Administrator. Integration Server passes the XML document to the target service as a org.w3c.dom.Node object named node. For more information about configuring the enhanced XML parser, see webMethods Integration Server Administrator’s Guide. |
node | Integration Server parses the XML using the legacy XML parser automatically and passes it to the target service as a com.wm.lang.xml.Node named object node. |
stream | Integration Server passes the XML document directly to the service as an XML stream without parsing the XML. Integration Server places the XML stream in the input pipeline of the target service as an InputStream named xmlStream. |
Note: | If parsing is not needed, it can unnecessarily slow down the execution of a service. For example, an application might handle the XML as a simple String. In this case, the automatic parsing is unnecessary and should be avoided. |
By default, Integration Server obtains the xmlFormat value from the Default xmlFormat property assigned to the target service. However, the client can override the Default xmlFormat property value by supplying the xmlFormat argument in the URL it uses to invoke the target service. The following shows the URL format when using the xmlFormat argument:
http://hostname:port/invoke/folder/serviceName?xmlFormat=format
Specify cached, node, stream, or bytes for format.
For example, suppose that the configured Default xmlFormat property value is node. If you want to invoke the sales:orderInfo service on the server rubicon:5555 and override the configured Default xmlFormat value so that Integration Server passes the XML document directly to the sales:orderInfo service as an XML stream, use the following URL:
http://rubicon:5555/invoke/sales/orderInfo?xmlFormat=stream
Note: | The client request should specify the xmlFormat argument only when it is recommended in the documentation for the service. Furthermore, a client should specify the xmlFormat argument only when knowing how the service will respond. |
Related Topics