Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.4.1

...

The deployment macro getHostFromAlias() reads the name of the component instance; in this case localhost. The deployment macro getProtocolFromAlias() reads the tagged value protocol defined on the backend service artifact or backend interface artifact (in the present case the protocol value is file). The deployment macro getMethodFromAlias() reads the tagged value method defined on the backend service artifact or backend interface artifact (in the present case it is defined on the interface artifact and has the value read).

 

Version
SingleLinefalse
  • Added in Builder 6.0

Figure: Component Diagram for Accessing a File via the URL Adapter

...

true
Expand
titleClick here to see the component diagram used in E2E Builder releases before 6.0 ...
Version
Depr

Deprecated since Builder 6.0

Figure: Component Diagram for Reading a File via the URL Adapter

The example above reads a file, which is stored on the localhost (meaning the machine where this configuration instance is deployed to). The path with filename is given from outside (input parameter which is sent by the client) and is then combined with the parameter of the deployment diagram resulting in the complete URL. If the client sends as inputFile string d:/mytext.txt the resulting url would be: file://localhost/d:/mytext.txt

Noteinfo
iconfalse

When combining the dynamic FTP parameter url with the static configuration via alias one has to be aware that the user and password will be taken from the static component (tagged value user if defined) - even if it is defined in the dynamic definition of the <<URLAdapter>>. Wanting to have user and password directly in the URL (e.g. ftp://user:pw@ftpServer), the user and password must not be defined in the component diagram.

...

The example below creates a file, reads the created file, and provides the client with the content of the file (which has been given as input string). 


Figure: Writing a File Using the URL Adapter

...

Find below a list of relevant tagged values, if the URL adapter is used with the file protocol.
Default values used when an option is not explicitly set are written in bold.

Tagged ValueDescriptionValues
protocolTransport protocol.file
methodFile operation method.read, write
path

File path.

Note
iconfalse

Tagged value path is optional. If it is omitted, the file will be written to/read from the Bridge data directory of the service. This implicates, that the file will be deleted, if the service gets deleted.

a valid file path, absolute or relative to the Bridge data directory.