CSharp XD* and Client API Architecture and Plan
Jump to navigation
Jump to search
Overview
The Direct Client operates on a high-level API based on an object model representation of DocumentPackage and Document, with specific properties corresponding to XD* metadata attributes, and a lower level API based on the ebXML representation of the ebRIM.
At either level, the Client API needs to accomplish three actions:
- Identify, by Direct address, which mechanism (SMTP + RFC5322 + XDM or XDR) should be used to for transport
- Assemble the package
- Send the package
Transport Resolution
The Client works off an interface for transport resolution:
public interface ITransportResolver
{
public ITransport<T> Resolve( NHINDirectAddress address );
}
Provides a configured ITransport<T> instance.
public interface ITransport<T>
{
public IPackager Packager;
public void Send( T obj );
}
That is, given an address, tell me the transport for that address, and let me use the transport to send the underlying package.
Package Assembly
public interface IPackager<T>
{
T Package(DocumentPackage package);
DocumentPackage Unpackage( T obj );
}
Plan
- An XDM Zip File packager exists. It needs some additional work:
- Doesn't create file extension for documents (ideally, default file extensions based on content type)
- DocumentMetadata assumes text is binary encoded in UTF-8 but no checking is done for text items in the XDM package (ideally, would detect encoding or support pluggable encodings)
- Only supports one submission set on unpackage
- We need an XDR SOAP packager/unpackager and sender
- We need an RFC 5322 packager and unpackager
- Needs to detect if there's an XDM attachment
- Need to write the transport resolver and plug it into the configuration back-end
- Need to write the transport mechanisms