5.16.6 BIND

The BIND command binds the specified wizard generated service code to the loaded inbound XML document or creates a new empty outbound XML document.

The SERVICE keyword value is used in a resource property lookup using the property key service.'value' and service.archive.'value' to locate the binding class and the binding jar file that contains the binding class and supporting classes generated by the XMLBinding Wizard. If the service binding archive entry does not exist, then the binding jar file must exist in the JSM jar subdirectory instead of a user specified directory.

You will need to specify the type of bind as outbound or inbound - a READ and GET are normally associated with an inbound type while SET and WRITE are normally associated with an outbound type.

The position of the BIND command in the code depends on whether you are intending to read data from an existing XML document or you are intending to create a new XML document.

If you are reading from an existing document, the code flow will be something like this:

SERVICE_LOAD

  CONNECT

  RECEIVE

  ARCHIVE

  BIND TYPE(*INBOUND)

  GET (one or more times)

  CLOSE

SERVICE_UNLOAD

 

Whereas, creating an XML document would require the following sequence of commands:

SERVICE_LOAD

..CONNECT

  BIND TYPE(*OUTBOUND)

  SET (one or more times)

  WRITE

  SEND

..ARCHIVE

  CLOSE

SERVICE_UNLOAD

 

 

Syntax:

Command

Keyword

Value

Developer notes

BIND

SERVICE

value

Required. Service name.

TYPE

*INBOUND

Required. Inbound binding.

*OUTBOUND

Outbound binding.

BINDTRACE

*YES

Optional. Trace the inbound bind result.

*NO

Default.

FILTER

 

Optional. See FILTER.

 

Example

BIND SERVICE(ORDERS) TYPE(*INBOUND) BINDTRACE(*YES)