WebDAV Adapter for Microsoft BizTalk
Requirements: /n software Adapters for Microsoft BizTalk
Introduction
The /n software Adapters for Microsoft BizTalk include fully-managed .NET Adapters that seamlessly integrate with the BizTalk Messaging Pipeline. The /n software Adapters extend the features of BizTalk with advanced Internet communications and secure messaging capabilities.
This guide will focus specifically on the WebDAV adapter, which is used to communicate with WebDAV servers.
Contents
WebDAV Send Adapter
The WebDAV Send Adapter is used to upload files to the WebDAV Server. To begin set the URL and RemoteFile properties.
URL should be set to the URL including the directory from which the files will be downloaded. For instance: https://www.test.com/DAV/pictures/animals/cats/
RemoteFile should be set to the name of the file to be uploaded. For instance %RemoteFile%.
Authentication to the WebDAV server is supported by setting User and Password. A Variety of authentication methods are supported via the AuthScheme property.
The adapter will connect to the WebDAV server whenever it has a message to send. The adapter will attempt to upload to a resource URI generated based on the values of URL and RemoteFile.
The following properties are applicable when configuring the send port:
-
WebDAV Properties
This is where you will tell the adapter where on the WebDAV server to write the files. All of these properties are fairly self-explanatory:
Remote File The name of the destination file on the server for uploading. URL The URL of the WebDAV directory to which the request is made. For instance: https://www.test.com/DAV/pictures/animals/cats/ -
Logging Properties
The Transport Log property is the only property here. If you click the + symbol next to the property this will expand the property and expose its fields. You will see Location, Log Mode, and Log Type.
By default the adapter will log only errors to the application event log. You can change the Log Mode to a mode with greater detail so that information event log entries are written to the event log during the course of execution. You may also change the Log Type so that events will be written to file instead of the event log. In that case you'll need to specify the full path to a file in the Location field.
-
Server Properties
The Server properties allow you to specify the login credentials and remote host information.
AuthScheme The authorization scheme to be used when server authorization is to be performed. User The user to authenticate to the WebDAV server with. Password The user's password. -
HTTP Properties
The HTTP Proxy property is the only property here. If you click the + symbol next to the property this will expand the property and expose its fields, which will allow you to configure your HTTP proxy settings as necessary.
-
SSL Properties
The SSL Properties govern whether or not a server's certificate is accepted, whether SSL client (certificate based) authentication is performed, and what type of SSL is performed.
SSL Accept Server Cert Instructs the adapter to accept the server certificate which matches the one specified if it is not already trusted by the system. For testing you can expand this property and set the Accept Any field to Yes. This tells the adapter to always accept the server's certificate. SSL Cert If set to a valid certificate the adapter will attempt SSL client (certificate based) authentication. Typically this is not required.
-
Tuning Properties
Firewall This may be expanded to configure the firewall type, host, port, user, and password if needed. Other Accepts configuration settings specified in a name=value format. Only one setting per line should be specified. Timeout The length of time (in seconds) the adapter will wait for a server response. As mentioned above the Other property provides a way for you to tweak the operation of the component depending on your requirements. Please consult the help file's Configuration section for supported settings.
WebDAV Receive Adapter
The WebDAV Receive Adapter is used to download files from the WebDAV Server. To begin set the URL and FileMask properties.
URL should be set to the URL including the directory from which the files will be downloaded. For instance: https://www.test.com/DAV/pictures/animals/cats/
FileMask should be set to a pattern like *.png. The &prodtype will download files matching the specified pattern. The default value is *.*.
The Depth property specifies how deep the server should operate within a directory.
Authentication to the WebDAV server is supported by setting User and Password. A Variety of authentication methods are supported via the AuthScheme property.
The adapter will connect to the WebDAV server every PollingInterval and list the directory at URL. All files that match the FileMask will be downloaded and submitted to BizTalk as individual messages.
The following properties are applicable when configuring the receive location:
-
WebDAV Properties
This is where you will tell the adapter where on the WebDAV server to retrieve the files. Again, these properties are fairly self-explanatory:
Depth How deep the server should operate within a directory. Delete Mode Informs the adapter as to whether or not it should delete a remote files from the server after a successful download. File Mask Files at the URL matching the pattern specified will be downloaded from the WebDAV server (for example, "*.txt") Temp Path Indicates a local temporary directory where the adapter can store any data before the adapter processes it. URL The URL of the WebDAV directory to which the request is made. For instance: https://www.test.com/DAV/pictures/animals/cats/ -
Server Properties
The adapter has the same Server properties in a receive location as in a send port.
-
HTTP Properties
The adapter has the same HTTP properties in a receive location as in a send port.
-
SSL Properties
The adapter has the same SSL properties in a receive location as in a send port.
-
Tuning Properties
Error Threshold This property limits the number of errors that the adapter can incur before it shuts down and stops processing messages. Max Batch Size This property limits the maximum amount of data the adapter can store before finalizing and processing the current batch to the number of bytes indicated. The default value of 0 indicates no limit. Max File Count This property places a limit on the number of files that can be transmitted in a single batch. Max File Size This property limits the maximum size of any file in the current transmission batch to the number of bytes indicated. The default value of 0 indicates no limit. Polling Interval The number of seconds to wait between download attempts (default is 60 seconds, so for example every 60 seconds the adapter would check the server for new files).
Additional Functionality
In addition to the basic operation as discussed above the adapter supports a variety of other settings that control authentication, proxy settings, and other behavior. Some of additional features include:
- Authentication (NTLM, Kerberos, Digest, Basic) via the AuthScheme, User, and Password properties.
- Full Proxy/Firewall support using the HTTPProxy and Firewall properties.
- Trigger downloads from an orchestration using the Download functionality of the Send Adapter.
- Avoid duplicate downloads with the DownloadCacheFile setting.
- Upload and Download files without submitting to BizTalk by setting LocalFile.
- And many more!
This article demonstrates the use of the HTTP adapter in particular, but /n software provides a full set of adapters for connecting to various types of internet servers.  The adapter properties are kept to a minimum for simplicity, but we make an effort to provide those properties that are necessary for effective control over configurations.
Please contact support@nsoftware.com with any questions.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.