Page History
...
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 | ||
---|---|---|
| ||
|
Figure: Component Diagram for Accessing a File via the URL Adapter
...
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
Version | Depr | true|||||
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 | ||
---|---|---|
| ||
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 Value | Description | Values | ||||||
---|---|---|---|---|---|---|---|---|
protocol | Transport protocol. | file | ||||||
method | File operation method. | read, write | ||||||
path | File path.
| a valid file path, absolute or relative to the Bridge data directory. |