Occasionally, DBXL customers will ask us for assistance with interacting with DBXL from code. Over the years, we've developed a few different utilities for using DBXL from code, and the one that we ourselves use the most often is the Qdabra.Dbxl.Client library.
The library can be obtained from the following download page:
http://www.infopathdev.com/files/folders/other_subjects/entry82744.aspx
Qdabra.Dbxl.Client is a .NET library that provides a simple interface to all of DBXL's web methods. Using it is quite simple.
You can start off by instantiating an instance of the DbxlClient class, specifying the URL for your DBXL instance:
DbxlClient client = new DbxlClient("http://servername/QdabraWebService");
once you've instantiated a DbxlClient instance with the above line, you can start using it to call webmethods. A DbxlClient object has several properties, most of them corresponding to DBXL's different web services.
So for example, to use the Document Service's GetDocument() method to retrieve a document, you could use the following:
DocumentInfo docInfo;
StatusInfo result = client.DbxlDocumentService.GetDocument(1234, out docInfo);
We recommend checking the property values on the returned StatusInfo object to verify that the method call succeeded.
Likewise, if you wanted to call the ReshredDocument() method in the DbxlAdmin web service, you could do the following:
StatusInfo result = client.DbxlAdmin.ReshredDocument(1234);
That's all there is to it!
The Qdabra.Dbxl.Client library will attempt to connect to DBXL using the current user's Windows Authentication credentials. If your website uses some authentication other than Windows Authentication and it is unable to authenticate, a credential prompt will be shown prompting the user for credentials.
If the user's credentials are known ahead of time, they can be passed directly to the DbxlClient object by way of the Credentials parameter.
It is also possible to disable the credential prompt by setting the DbxlClient object's IsNoPromptMode property to true. Doing so will cause the library to simply throw an exception if authentication should fail.
So that's pretty much all there is to know about Qdabra.Dbxl.Client. How are you using code to interact with DBXL? Let us know in the comments section.