SwissDecTX Namespace

SwissDecTX, a secure transmitter for the SwissDec salary data submission service.
SwissDecTX Namespace
SwissDecTX is a managed code component implementing a secure transmitter for SwissDec salary data submissions. It is fully compliant with all the security and data transmission requirements imposed by SwissDec, including digital signatures and encryption, and fully certifiable - we guarantee it. Language bindings exist for practically all common programming languages and environments through a C-callable DLL interface. A command-line interface is also provided as part of the basic package to allow transmission from shell scripts and batch files, along with a “safe for scripting” COM wrapper for scripting clients and all applications able to instantiate ActiveX COM components, such as for example VB/VBA/Access and Delphi.

An optional batch processor is available, working on top of the SwissDecTX component and implementing a file-based interface.

Together with SwissDecTX, the SwissDecTX Batch Processor can be used as a gateway allowing applications on other platforms (Unix, AS/400, Linux, Mac...) to send salary declarations to SwissDec in the simplest possible way (by writing XML declaration documents to a network share). The SwissDecTX Batch Processor is suitable for mass transmission of salary declarations and operates in a fully decoupled manner, the producing application(s) can write many XML declarations in the input folder and the SwissDecTX Batch Processor will handle them in turn, transmitting them as fast as the internet connection speed allows. Producing applications does not need to be connected to the internet at all when using the SwissDecTX Batch Processor (available separately).

This document describes the core SwissDecTX Transmitter application programming interface and is intended for developers writing application based on .NET 2.x or later, Access, Delphi, VB and VB.NET and C#. The C-callable layer, COM wrapper and command-line interface are described in separate documents. All existing programming interfaces call the same core functions in the transmitter.

SwissDecTX is a product of Axel Rietschin Software Developments, 36, rue de Carouge, CH-1205 Geneva, Switzerland.

Copyright © 2016 Axel Rietschin, All rights reserved. http://www.swissdectx.ch info@swissdectx.ch

Classes
 | Class | Description
Public class | Transmitter4 | The SwissDecTX Transmitter
Public class | TransmitterUtilities4 | SwissDec Transmitter
Enumerations
 | Enumeration | Description
Public enumeration | Transmitter4CertificateSearchMode | Tell SwissDecTX how to locate the certificate, in conjunction with the search string. See SetReceiverCertificate(String, Transmitter4CertificateSearchMode) and SetTransmitterCertificate(String, Transmitter4CertificateSearchMode).

Copyright © 2016 Axel Rietschin Software Developments. All rights reserved.

Send comments on this topic to info@swissdectx.ch


Transmitter4 Class

Transmitter4 Class
The SwissDecTX Transmitter
The SwissDecTX Transmitter
The SwissDecTX Transmitter
Inheritance Hierarchy
SystemObject
SwissDecTXTransmitter4

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public class Transmitter4 : IDisposable
Public Class Transmitter4
    Implements IDisposable

The Transmitter4 type exposes the following members.

Constructors
Name | Description
Transmitter4 | Public constructor
Top
Methods
 | Name | Description
 | CheckInteroperability | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements.
 | CheckInteroperabilityWithOperands | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.
 | CheckInteroperabilityWithStringOperands | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.
Public method | CreateRequestId | Create a "unique" 20 character string that can be used as request ID within salary declarations. The string is composed of hexadecimal characters, namely 0-9 and A-F.
 | DeclareSalary | Submit salary declaration data to the SwissDec secure web service over the internet
 | DeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | Equals | (Inherited from Object.)
Public method | File2FileDeclareSalary | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2FileDeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2FileGetResultFromDeclareSalary | Retrieve the result and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetStatusFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetStatusFromSynchronizeContract | Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileSynchronizeContract | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2FileSynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2StringDeclareSalary | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2StringDeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2StringGetResultFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetStatusFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetStatusFromSynchronizeContract | Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringSynchronizeContract | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2StringSynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetLastDeclarationId | Retrieve the declaration ID found in the last reply received from the server.
Public method | GetLastRequestId | Retrieve the request ID that was used during the last transmission. The returned identifier is either the one that was passed within the declaration document, or the one that was automatically created by the transmitter if the automatic request ID creation feature was used (i.e. the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId" in the document).
Public method | GetLastResponseId | Retrieve the response ID of the last reply received from the server. The returned string can be empty if no transmission occurred, or if the last operation did not comprise a server reply (e.g. local EIV creation, or a server call that ended in an error with no result).
 | GetResultFromDeclareSalary | Retrieve the result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetStatusFromDeclareSalary | Retrieve the status associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetStatusFromSynchronizeContract | Retrieve the status associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | GetType | (Inherited from Object.)
 | InstallCertificates | Install signing/encryption certificates (used by SwissDecTX to secure SwissDec transmissions) in the appropriate certificate stores.
Public method | LoadLicenseFile | Load the SwissDecTX license file to be used for this process
Protected method | MemberwiseClone | (Inherited from Object.)
 | Ping | Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).
 | PingString | Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).
 | SetCredentials | Set user name and password required for the optional basic, digest, NTLM, or Kerberos authentication.
Public method | SetEncryption | Set encryption flag
 | SetHttpProxy | Set the address and port number of the open HTTP proxy to be used to reach the Internet
 | SetHttpProxyWithCredentials | Set the address and port number of the secured HTTP proxy to be used to reach the Internet
 | SetReceiverCertificate | Tell the SwissDecTX Transmitter what certificate to use to crypt the transmissions, this is the server's certificate and the server's public key it contains is used for encrypting outgoing messages. This call overrides the configured receiver certificate and can be used to switch programmatically between a test and a production certificate.
Public method | SetSchemasLocation | Set (optional) external XSD schemas location.
 | SetTransmitterCertificate | Tell the SwissDecTX Transmitter what certificate to use to sign the transmissions, this is the client's certificate uniquely identifying your software. The server will use your certificate's public key to encrypt the replies sent to your computer and SwissDecTX will use this certificate's private key to decrypt the messages. This call overrides the configured transmitter certificate and can be used to switch programmatically between a test and a production certificate.
 | SetUrl | Set the web service URL. Used to override the configured web service address, for example to programmatically switch between the test and production servers.
 | SynchronizeContract | Submit contract synchronization data to the SwissDec secure web service over the internet
 | SynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

SwissDecTX Namespace


Transmitter4 Constructor

Transmitter4 Constructor
Public constructor

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public Transmitter4()
Public Sub New
Examples
Creating a SwissDecTX.Transmitter() instance
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           // TODO: Set the Url and certificates if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class


Transmitter4 Methods

Transmitter4 Methods

The Transmitter4 type exposes the following members.

Methods
 | Name | Description
 | CheckInteroperability | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements.
 | CheckInteroperabilityWithOperands | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.
 | CheckInteroperabilityWithStringOperands | Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.
Public method | CreateRequestId | Create a "unique" 20 character string that can be used as request ID within salary declarations. The string is composed of hexadecimal characters, namely 0-9 and A-F.
 | DeclareSalary | Submit salary declaration data to the SwissDec secure web service over the internet
 | DeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | Equals | (Inherited from Object.)
Public method | File2FileDeclareSalary | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2FileDeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2FileGetResultFromDeclareSalary | Retrieve the result and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetStatusFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileGetStatusFromSynchronizeContract | Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2FileSynchronizeContract | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2FileSynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2StringDeclareSalary | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2StringDeclareSalaryLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | File2StringGetResultFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetStatusFromDeclareSalary | Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringGetStatusFromSynchronizeContract | Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | File2StringSynchronizeContract | Submit salary declaration to the SwissDec secure web service over the internet
Public method | File2StringSynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetLastDeclarationId | Retrieve the declaration ID found in the last reply received from the server.
Public method | GetLastRequestId | Retrieve the request ID that was used during the last transmission. The returned identifier is either the one that was passed within the declaration document, or the one that was automatically created by the transmitter if the automatic request ID creation feature was used (i.e. the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId" in the document).
Public method | GetLastResponseId | Retrieve the response ID of the last reply received from the server. The returned string can be empty if no transmission occurred, or if the last operation did not comprise a server reply (e.g. local EIV creation, or a server call that ended in an error with no result).
 | GetResultFromDeclareSalary | Retrieve the result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetResultFromSynchronizeContract | Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetStatusFromDeclareSalary | Retrieve the status associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
 | GetStatusFromSynchronizeContract | Retrieve the status associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Public method | GetType | (Inherited from Object.)
 | InstallCertificates | Install signing/encryption certificates (used by SwissDecTX to secure SwissDec transmissions) in the appropriate certificate stores.
Public method | LoadLicenseFile | Load the SwissDecTX license file to be used for this process
Protected method | MemberwiseClone | (Inherited from Object.)
 | Ping | Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).
 | PingString | Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).
 | SetCredentials | Set user name and password required for the optional basic, digest, NTLM, or Kerberos authentication.
Public method | SetEncryption | Set encryption flag
 | SetHttpProxy | Set the address and port number of the open HTTP proxy to be used to reach the Internet
 | SetHttpProxyWithCredentials | Set the address and port number of the secured HTTP proxy to be used to reach the Internet
 | SetReceiverCertificate | Tell the SwissDecTX Transmitter what certificate to use to crypt the transmissions, this is the server's certificate and the server's public key it contains is used for encrypting outgoing messages. This call overrides the configured receiver certificate and can be used to switch programmatically between a test and a production certificate.
Public method | SetSchemasLocation | Set (optional) external XSD schemas location.
 | SetTransmitterCertificate | Tell the SwissDecTX Transmitter what certificate to use to sign the transmissions, this is the client's certificate uniquely identifying your software. The server will use your certificate's public key to encrypt the replies sent to your computer and SwissDecTX will use this certificate's private key to decrypt the messages. This call overrides the configured transmitter certificate and can be used to switch programmatically between a test and a production certificate.
 | SetUrl | Set the web service URL. Used to override the configured web service address, for example to programmatically switch between the test and production servers.
 | SynchronizeContract | Submit contract synchronization data to the SwissDec secure web service over the internet
 | SynchronizeContractLocal | Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

Transmitter4 Class


Transmitter4.CheckInteroperability Method

Transmitter4CheckInteroperability Method
Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void CheckInteroperability(
    string monitoringID
)
Public Sub CheckInteroperability (
    monitoringID As String
)

Parameters

monitoringID
Type: SystemString
Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "tester" as a generic ID of you don't have your own yet.
Examples
Calling Transmitter.CheckInteroperability()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           tx.CheckInteroperability("Your Monitoring ID"); // use "tester" if you don't have a monitoring ID yet

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4CheckInteroperabilityWithOperands(String, Decimal, Decimal, Decimal, Decimal, String, DateTime)
Transmitter4CheckInteroperabilityWithStringOperands(String, String, String, String, String, String, String, Int32)


Transmitter4.CheckInteroperabilityWithOperands Method

Transmitter4CheckInteroperabilityWithOperands Method
Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void CheckInteroperabilityWithOperands(
    string monitoringID,
    decimal firstOperand,
    decimal secondOperand,
    out decimal additionResult,
    out decimal subtractionResult,
    ref string constString,
    out DateTime serverTime
)
Public Sub CheckInteroperabilityWithOperands (
    monitoringID As String,
    firstOperand As Decimal,
    secondOperand As Decimal,
    <OutAttribute> ByRef additionResult As Decimal,
    <OutAttribute> ByRef subtractionResult As Decimal,
    ByRef constString As String,
    <OutAttribute> ByRef serverTime As DateTime
)

Parameters

monitoringID
Type: SystemString
Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "tester" as a generic ID of you don't have your own yet.
firstOperand
Type: SystemDecimal
The first of the two operands used for computation tests. The only acceptable value is 999'000'000'000 (999 billions)
secondOperand
Type: SystemDecimal
The second of the two operands to be used for computation tests. This value is arbitrary. You must provide an user interface to enter test values and display the results.
additionResult
Type: SystemDecimal
The result of the addition of the two operands, rounded to two decimals.
subtractionResult
Type: SystemDecimal
The result of the subtraction of the two operands, rounded to two decimals.
constString
Type: SystemString
Must contain the string ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ on input, should contain äëöüáéóúàèòùâêôû upon return from the call.
serverTime
Type: SystemDateTime
Contains the server's time upon return from the call.
Remarks
This method checks all the requirements, including correctness of all parameters returned by the server, accuracy and correctness of calculations, character conversion and maximum time difference. Exceptions are thrown when the method detects an anomaly in the reply, so if this call completes successfully, you can be confident that the interop test went well and that every test has passed. The transmission is also signed and encrypted using the installed certificates (see SetReceiverCertificate(String, Transmitter4CertificateSearchMode), SetTransmitterCertificate(String, Transmitter4CertificateSearchMode) and InstallCertificates(String, String, String, String)) and the signature and validity of the server reply is checked.
Examples
Calling Transmitter.CheckInteroperabilityWithOperands()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           DateTime serverTime;
           var constString = "ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ";
           decimal additionResult, subtractionResult;

           tx.CheckInteroperabilityWithOperands("Your Monitoring ID", 999000000000.00m, 1234.56m, out additionResult, out subtractionResult, ref constString, out serverTime);

           // TODO: display the operands and the results (if you are here, everything is correct as CheckInteroperability() verifies all return values!)

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetReceiverCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4SetTransmitterCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4InstallCertificates(String, String, String, String)
Transmitter4CheckInteroperability(String)
Transmitter4CheckInteroperabilityWithStringOperands(String, String, String, String, String, String, String, Int32)


Transmitter4.CheckInteroperabilityWithStringOperands Method

Transmitter4CheckInteroperabilityWithStringOperands Method
Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void CheckInteroperabilityWithStringOperands(
    string monitoringID,
    string firstOperand,
    string secondOperand,
    out string additionResult,
    out string subtractionResult,
    ref string constString,
    out string serverTime,
    int lcid
)
Public Sub CheckInteroperabilityWithStringOperands (
    monitoringID As String,
    firstOperand As String,
    secondOperand As String,
    <OutAttribute> ByRef additionResult As String,
    <OutAttribute> ByRef subtractionResult As String,
    ByRef constString As String,
    <OutAttribute> ByRef serverTime As String,
    lcid As Integer
)

Parameters

monitoringID
Type: SystemString
Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "tester" as a generic ID of you don't have your own yet.
firstOperand
Type: SystemString
The first of the two operands used for computation tests. The only acceptable value is 999'000'000'000 (999 billions)
secondOperand
Type: SystemString
The second of the two operands to be used for computation tests. This value is arbitrary. You must provide an user interface to enter test values and display the results.
additionResult
Type: SystemString
The result of the addition of the two operands, rounded to two decimals.
subtractionResult
Type: SystemString
The result of the subtraction of the two operands, rounded to two decimals.
constString
Type: SystemString
Must contain the string ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ on input, should contain äëöüáéóúàèòùâêôû upon return from the call.
serverTime
Type: SystemString
Contains the server's time upon return from the call. Formatting depends on the lcid.
lcid
Type: SystemInt32
The locale identifier (see http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx) that tells the transmitter how to convert to/from string representation, i.e. which decimal separator to use, comma or dot, etc. Use 1033 (hexadecimal 0x409) for US-English convention (decimal separator as a dot, e.g. "123.45"). If you pass 0 the conversion will be made according to the current culture.
Remarks
This method checks all the requirements, including correctness of all parameters returned by the server, accuracy and correctness of calculations, character conversion and maximum time difference. Exceptions are thrown when the method detects an anomaly in the reply, so if this call completes successfully, you can be confident that the interop test went well and that every test has passed. The transmission is also signed and encrypted using the installed certificates (see SetReceiverCertificate(String, Transmitter4CertificateSearchMode), SetTransmitterCertificate(String, Transmitter4CertificateSearchMode) and InstallCertificates(String, String, String, String)) and the signature and validity of the server reply is checked.
Examples
Calling Transmitter.CheckInteroperabilityWithStringOperands()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           string serverTime;
           var constString = "ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ";
           string additionResult, subtractionResult;

           tx.CheckInteroperabilityWithStringOperands("Your Monitoring ID", "999000000000.00", "1234.56", out additionResult, out subtractionResult, ref constString, out serverTime, 1033);

           // TODO: display the operands and the results (if you are here, everything is correct as CheckInteroperability() verifies all return values!)

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetReceiverCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4SetTransmitterCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4InstallCertificates(String, String, String, String)
Transmitter4CheckInteroperability(String)
Transmitter4CheckInteroperabilityWithOperands(String, Decimal, Decimal, Decimal, Decimal, String, DateTime)


Transmitter4.CreateRequestId Method

Transmitter4CreateRequestId Method
Create a "unique" 20 character string that can be used as request ID within salary declarations. The string is composed of hexadecimal characters, namely 0-9 and A-F.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void CreateRequestId(
    out string requestId
)
Public Sub CreateRequestId (
    <OutAttribute> ByRef requestId As String
)

Parameters

requestId
Type: SystemString
See Also

Reference

Transmitter4 Class


Transmitter4.DeclareSalary Method

Transmitter4DeclareSalary Method
Submit salary declaration data to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void DeclareSalary(
    XmlDocument xmlDoc,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub DeclareSalary (
    xmlDoc As XmlDocument,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The salary declaration to send.
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.DeclareSalary()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           string jobKey;
           DateTime transmissionDateUtc;
           XmlDocument plausibility, messageSent;

           tx.DeclareSalary(xmlDoc, out result, out messageSent, out jobKey, out transmissionDateUtc); // xmlDoc declared elsewhere

           // TODO: use messageSent, jobKey and transmissionDateUtc, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalaryLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
Transmitter4GetResultFromDeclareSalary(XmlDocument, XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument)
Transmitter4File2FileDeclareSalary(String, String, String, String, String, DateTime)
Transmitter4File2StringDeclareSalary(String, String, String, String, String, DateTime)


Transmitter4.DeclareSalaryLocal Method

Transmitter4DeclareSalaryLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void DeclareSalaryLocal(
    XmlDocument xmlDoc,
    out XmlDocument result,
    out XmlDocument messageCreatedAndCrypted,
    out XmlDocument messageCreated,
    out DateTime creationDateUtc
)
Public Sub DeclareSalaryLocal (
    xmlDoc As XmlDocument,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageCreatedAndCrypted As XmlDocument,
    <OutAttribute> ByRef messageCreated As XmlDocument,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The salary declaration to process.
result
Type: System.XmlXmlDocument
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCrypted
Type: System.XmlXmlDocument
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreated
Type: System.XmlXmlDocument
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageCreated text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.DeclareSalaryLocal()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           DateTime creationDateUtc;
           XmlDocument result, messageCreatedAndCrypted, messageCreated;

           tx.DeclareSalaryLocal(xmlDoc, out result, out messageCreatedAndCrypted, out messageCreated, out creationDateUtc); // xmlDoc declared elsewhere

           // TODO: use messageCreated, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4File2FileDeclareSalaryLocal(String, String, String, String, DateTime)
Transmitter4File2StringDeclareSalaryLocal(String, String, String, String, DateTime)


Transmitter4.File2FileDeclareSalary Method

Transmitter4File2FileDeclareSalary Method
Submit salary declaration to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileDeclareSalary(
    string sourceFilePathName,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub File2FileDeclareSalary (
    sourceFilePathName As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to send.
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
messageReceivedFile
Type: SystemString
The signed raw server reply, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)


Transmitter4.File2FileDeclareSalaryLocal Method

Transmitter4File2FileDeclareSalaryLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileDeclareSalaryLocal(
    string sourceFilePathName,
    string resultFile,
    string messageCreatedAndCryptedFile,
    string messageCreatedFile,
    out DateTime creationDateUtc
)
Public Sub File2FileDeclareSalaryLocal (
    sourceFilePathName As String,
    resultFile As String,
    messageCreatedAndCryptedFile As String,
    messageCreatedFile As String,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to process.
resultFile
Type: SystemString
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCryptedFile
Type: SystemString
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreatedFile
Type: SystemString
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalaryLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)


Transmitter4.File2FileGetResultFromDeclareSalary Method

Transmitter4File2FileGetResultFromDeclareSalary Method
Retrieve the result and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileGetResultFromDeclareSalary(
    string sourceFilePathName,
    string plausibilityPathName,
    string domainString,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    string declareSalaryResultFile
)
Public Sub File2FileGetResultFromDeclareSalary (
    sourceFilePathName As String,
    plausibilityPathName As String,
    domainString As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    declareSalaryResultFile As String
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibilityPathName
Type: SystemString
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent, for logging purposes. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
messageReceivedFile
Type: SystemString
The signed raw server reply, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
declareSalaryResultFile
Type: SystemString
The data resulting from the operation, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2FileGetResultFromSynchronizeContract Method

Transmitter4File2FileGetResultFromSynchronizeContract Method
Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileGetResultFromSynchronizeContract(
    string sourceFilePathName,
    string plausibilityPathName,
    string domainString,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    string synchronizeContractResultFile
)
Public Sub File2FileGetResultFromSynchronizeContract (
    sourceFilePathName As String,
    plausibilityPathName As String,
    domainString As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    synchronizeContractResultFile As String
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibilityPathName
Type: SystemString
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceivedFile
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
synchronizeContractResultFile
Type: SystemString
The data resulting from the operation, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or parse the server response). A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class


Transmitter4.File2FileGetStatusFromDeclareSalary Method

Transmitter4File2FileGetStatusFromDeclareSalary Method
Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileGetStatusFromDeclareSalary(
    string sourceFilePathName,
    string jobKey,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    string plausibilityFile,
    out bool jobFinished
)
Public Sub File2FileGetStatusFromDeclareSalary (
    sourceFilePathName As String,
    jobKey As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    plausibilityFile As String,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent, for logging purposes. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
messageReceivedFile
Type: SystemString
The signed raw server reply, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
plausibilityFile
Type: SystemString
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2FileGetStatusFromSynchronizeContract Method

Transmitter4File2FileGetStatusFromSynchronizeContract Method
Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileGetStatusFromSynchronizeContract(
    string sourceFilePathName,
    string jobKey,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    string plausibilityFile,
    out bool jobFinished
)
Public Sub File2FileGetStatusFromSynchronizeContract (
    sourceFilePathName As String,
    jobKey As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    plausibilityFile As String,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent, for logging purposes. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
messageReceivedFile
Type: SystemString
The signed raw server reply, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
plausibilityFile
Type: SystemString
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2FileSynchronizeContract Method

Transmitter4File2FileSynchronizeContract Method
Submit salary declaration to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileSynchronizeContract(
    string sourceFilePathName,
    string resultFile,
    string messageSentFile,
    string messageReceivedFile,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub File2FileSynchronizeContract (
    sourceFilePathName As String,
    resultFile As String,
    messageSentFile As String,
    messageReceivedFile As String,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to send.
resultFile
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSentFile
Type: SystemString
The signed message containing the declaration, just before it was sent, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
messageReceivedFile
Type: SystemString
The signed raw server reply, for logging purposes. This parameter can be null, for example if the built-in automatic transmission logging mechanism is used.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)


Transmitter4.File2FileSynchronizeContractLocal Method

Transmitter4File2FileSynchronizeContractLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2FileSynchronizeContractLocal(
    string sourceFilePathName,
    string resultFile,
    string messageCreatedAndCryptedFile,
    string messageCreatedFile,
    out DateTime creationDateUtc
)
Public Sub File2FileSynchronizeContractLocal (
    sourceFilePathName As String,
    resultFile As String,
    messageCreatedAndCryptedFile As String,
    messageCreatedFile As String,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to process.
resultFile
Type: SystemString
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCryptedFile
Type: SystemString
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreatedFile
Type: SystemString
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContractLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)


Transmitter4.File2StringDeclareSalary Method

Transmitter4File2StringDeclareSalary Method
Submit salary declaration to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringDeclareSalary(
    string sourceFilePathName,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub File2StringDeclareSalary (
    sourceFilePathName As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to send.
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)


Transmitter4.File2StringDeclareSalaryLocal Method

Transmitter4File2StringDeclareSalaryLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringDeclareSalaryLocal(
    string sourceFilePathName,
    out string result,
    out string messageCreatedAndCrypted,
    out string messageCreated,
    out DateTime creationDateUtc
)
Public Sub File2StringDeclareSalaryLocal (
    sourceFilePathName As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageCreatedAndCrypted As String,
    <OutAttribute> ByRef messageCreated As String,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to process.
result
Type: SystemString
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCrypted
Type: SystemString
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreated
Type: SystemString
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalaryLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)


Transmitter4.File2StringGetResultFromDeclareSalary Method

Transmitter4File2StringGetResultFromDeclareSalary Method
Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringGetResultFromDeclareSalary(
    string sourceFilePathName,
    string plausibilityPathName,
    string domainString,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string declareSalaryResultFile
)
Public Sub File2StringGetResultFromDeclareSalary (
    sourceFilePathName As String,
    plausibilityPathName As String,
    domainString As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef declareSalaryResultFile As String
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibilityPathName
Type: SystemString
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
declareSalaryResultFile
Type: SystemString
The data resulting from the operation, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2StringGetResultFromSynchronizeContract Method

Transmitter4File2StringGetResultFromSynchronizeContract Method
Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringGetResultFromSynchronizeContract(
    string sourceFilePathName,
    string plausibilityPathName,
    string domainString,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string synchronizeContractResult
)
Public Sub File2StringGetResultFromSynchronizeContract (
    sourceFilePathName As String,
    plausibilityPathName As String,
    domainString As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef synchronizeContractResult As String
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibilityPathName
Type: SystemString
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
synchronizeContractResult
Type: SystemString
The salary declaration result data, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or parse the server response). A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class


Transmitter4.File2StringGetStatusFromDeclareSalary Method

Transmitter4File2StringGetStatusFromDeclareSalary Method
Retrieve the status and result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringGetStatusFromDeclareSalary(
    string sourceFilePathName,
    string jobKey,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string plausibility,
    out bool jobFinished
)
Public Sub File2StringGetStatusFromDeclareSalary (
    sourceFilePathName As String,
    jobKey As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef plausibility As String,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
plausibility
Type: SystemString
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2StringGetStatusFromSynchronizeContract Method

Transmitter4File2StringGetStatusFromSynchronizeContract Method
Retrieve the status and result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringGetStatusFromSynchronizeContract(
    string sourceFilePathName,
    string jobKey,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string plausibility,
    out bool jobFinished
)
Public Sub File2StringGetStatusFromSynchronizeContract (
    sourceFilePathName As String,
    jobKey As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef plausibility As String,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

sourceFilePathName
Type: SystemString
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
plausibility
Type: SystemString
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)


Transmitter4.File2StringSynchronizeContract Method

Transmitter4File2StringSynchronizeContract Method
Submit salary declaration to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringSynchronizeContract(
    string sourceFilePathName,
    out string result,
    out string messageSent,
    out string messageReceived,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub File2StringSynchronizeContract (
    sourceFilePathName As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageSent As String,
    <OutAttribute> ByRef messageReceived As String,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to send.
result
Type: SystemString
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: SystemString
The signed message containing the declaration, just before it was sent. To be saved in the transmission journal.
messageReceived
Type: SystemString
The signed raw server reply. To be saved in the transmission journal.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)


Transmitter4.File2StringSynchronizeContractLocal Method

Transmitter4File2StringSynchronizeContractLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void File2StringSynchronizeContractLocal(
    string sourceFilePathName,
    out string result,
    out string messageCreatedAndCrypted,
    out string messageCreated,
    out DateTime creationDateUtc
)
Public Sub File2StringSynchronizeContractLocal (
    sourceFilePathName As String,
    <OutAttribute> ByRef result As String,
    <OutAttribute> ByRef messageCreatedAndCrypted As String,
    <OutAttribute> ByRef messageCreated As String,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

sourceFilePathName
Type: SystemString
The salary declaration to process.
result
Type: SystemString
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCrypted
Type: SystemString
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreated
Type: SystemString
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. A valid SwissDecTX license is required to execute this method call.
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContractLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)


Transmitter4.GetLastDeclarationId Method

Transmitter4GetLastDeclarationId Method
Retrieve the declaration ID found in the last reply received from the server.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetLastDeclarationId(
    out string declarationId
)
Public Sub GetLastDeclarationId (
    <OutAttribute> ByRef declarationId As String
)

Parameters

declarationId
Type: SystemString
See Also

Reference

Transmitter4 Class


Transmitter4.GetLastRequestId Method

Transmitter4GetLastRequestId Method
Retrieve the request ID that was used during the last transmission. The returned identifier is either the one that was passed within the declaration document, or the one that was automatically created by the transmitter if the automatic request ID creation feature was used (i.e. the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId" in the document).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetLastRequestId(
    out string requestId
)
Public Sub GetLastRequestId (
    <OutAttribute> ByRef requestId As String
)

Parameters

requestId
Type: SystemString
See Also

Reference

Transmitter4 Class


Transmitter4.GetLastResponseId Method

Transmitter4GetLastResponseId Method
Retrieve the response ID of the last reply received from the server. The returned string can be empty if no transmission occurred, or if the last operation did not comprise a server reply (e.g. local EIV creation, or a server call that ended in an error with no result).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetLastResponseId(
    out string responseId
)
Public Sub GetLastResponseId (
    <OutAttribute> ByRef responseId As String
)

Parameters

responseId
Type: SystemString
See Also

Reference

Transmitter4 Class


Transmitter4.GetResultFromDeclareSalary Method

Transmitter4GetResultFromDeclareSalary Method
Retrieve the result associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetResultFromDeclareSalary(
    XmlDocument xmlDoc,
    XmlDocument plausibility,
    string domainString,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out XmlDocument declareSalaryResult
)
Public Sub GetResultFromDeclareSalary (
    xmlDoc As XmlDocument,
    plausibility As XmlDocument,
    domainString As String,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef declareSalaryResult As XmlDocument
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibility
Type: System.XmlXmlDocument
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
declareSalaryResult
Type: System.XmlXmlDocument
The salary declaration result data, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or parse the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.GetStatusFromDeclareSalary()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           XmlDocument result, messageSent, messageReceived, declareSalaryResult;

           tx.GetResultFromDeclareSalary(xmlDoc, plausibility, domainString, out result, out messageSent, out messageReceived, out declareSalaryResult); // xmlDoc, plausibility and domainString declared elsewhere

           // TODO: use messageSent, messageReceived, and salaryResult, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4GetStatusFromDeclareSalary(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
Transmitter4File2FileGetStatusFromDeclareSalary(String, String, String, String, String, String, Boolean)
Transmitter4File2StringGetStatusFromDeclareSalary(String, String, String, String, String, String, Boolean)


Transmitter4.GetResultFromSynchronizeContract Method

Transmitter4GetResultFromSynchronizeContract Method
Retrieve the result associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetResultFromSynchronizeContract(
    XmlDocument xmlDoc,
    XmlDocument plausibility,
    string domainString,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out XmlDocument synchronizeContractResult
)
Public Sub GetResultFromSynchronizeContract (
    xmlDoc As XmlDocument,
    plausibility As XmlDocument,
    domainString As String,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef synchronizeContractResult As XmlDocument
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
plausibility
Type: System.XmlXmlDocument
The plausibility data that was returned from the call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
domainString
Type: SystemString
The domain from which to retrieve data, one of AHV-AVS, UVG-LAA, UVGZ-LAAC, KTG-AMC, BVG-LPP, FAK-CAF, TaxAtSource or Statistic. When there are multiple possible entries for a domain, concatenate the desired institution ID without any blank, as in TaxAtSource#KantonBE
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
synchronizeContractResult
Type: System.XmlXmlDocument
The salary declaration result data, as returned by the server.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or parse the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.GetStatusFromSynchronizeContract()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           XmlDocument result, messageSent, messageReceived, synchronizeContractResult;

           tx.GetResultFromSynchronizeContract(xmlDoc, plausibility, domainString, out result, out messageSent, out messageReceived, out synchronizeContractResult); // xmlDoc, plausibility and domainString declared elsewhere

           // TODO: use messageSent, messageReceived, and salaryResult, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
Transmitter4File2FileGetStatusFromSynchronizeContract(String, String, String, String, String, String, Boolean)
Transmitter4File2StringGetStatusFromSynchronizeContract(String, String, String, String, String, String, Boolean)


Transmitter4.GetStatusFromDeclareSalary Method

Transmitter4GetStatusFromDeclareSalary Method
Retrieve the status associated with a previous call to DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetStatusFromDeclareSalary(
    XmlDocument xmlDoc,
    string jobKey,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out XmlDocument plausibility,
    out bool jobFinished
)
Public Sub GetStatusFromDeclareSalary (
    xmlDoc As XmlDocument,
    jobKey As String,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef plausibility As XmlDocument,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The original salary declaration previously sent using DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
plausibility
Type: System.XmlXmlDocument
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or parse the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.GetStatusFromDeclareSalary()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           bool jobFinished;
           XmlDocument result, messageSent, messageReceived, plausibility;

           tx.GetStatusFromDeclareSalary(xmlDoc, jobKey, out result, out messageSent, out messageReceived, out plausibility, out bool jobFinished); // xmlDoc and jobKey declared elsewhere

           // TODO: use messageSent, messageReceived, plausibility and jobFinished, else check result. Note that you must re-issue this call (retry) if the returned plausibility contains a single <ValidityPlausibilityChecking> node.

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4DeclareSalary(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4GetResultFromDeclareSalary(XmlDocument, XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument)
Transmitter4File2FileGetStatusFromDeclareSalary(String, String, String, String, String, String, Boolean)
Transmitter4File2StringGetStatusFromDeclareSalary(String, String, String, String, String, String, Boolean)


Transmitter4.GetStatusFromSynchronizeContract Method

Transmitter4GetStatusFromSynchronizeContract Method
Retrieve the status associated with a previous call to SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void GetStatusFromSynchronizeContract(
    XmlDocument xmlDoc,
    string jobKey,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out XmlDocument plausibility,
    out bool jobFinished
)
Public Sub GetStatusFromSynchronizeContract (
    xmlDoc As XmlDocument,
    jobKey As String,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef plausibility As XmlDocument,
    <OutAttribute> ByRef jobFinished As Boolean
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The original salary declaration previously sent using SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). Only the <RequestContext> part is required so you could pass a shortened version of the original data. The transmitter retrieves the request ID from the original declaration and automatically adds a suffix to it, to satisfy the requirement that states that a new request ID must be used with every call. If your application creates and passes an ad-hoc <RequestContext> block (instead of passing the entire original declaration) you can use an asterisk (*), the empty string "" or the string "reqId" and the function will create a new request identifier for you. Of course if the original declaration already used the auto-generation feature and still contains "*", "" or "reqId" then there is nothing special to do. If you set a request ID yourself in the block you created, the transmitter still appends a suffix to it.
jobKey
Type: SystemString
The job key returned for that declaration by SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. This message is different from the one that was sent previously with SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime). To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
plausibility
Type: System.XmlXmlDocument
The plausibility of the declaration, as returned by the server.
jobFinished
Type: SystemBoolean
A flag returned by the server indicating the status of the declaration job.
Remarks
If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.GetStatusFromSynchronizeContract()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           bool jobFinished;
           XmlDocument result, messageSent, messageReceived, plausibility;

           tx.GetStatusFromSynchronizeContract(xmlDoc, jobKey, out result, out messageSent, out messageReceived, out plausibility, out bool jobFinished); // xmlDoc and jobKey declared elsewhere

           // TODO: use messageCreated, messageReceived, plausibility and jobFinished, else check result. Note that you must re-issue this call (retry) if the returned plausibility contains a single <ValidityPlausibilityChecking> node.

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4GetResultFromSynchronizeContract(XmlDocument, XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument)
Transmitter4File2FileGetStatusFromSynchronizeContract(String, String, String, String, String, String, Boolean)
Transmitter4File2StringGetStatusFromSynchronizeContract(String, String, String, String, String, String, Boolean)


Transmitter4.InstallCertificates Method

Transmitter4InstallCertificates Method
Install signing/encryption certificates (used by SwissDecTX to secure SwissDec transmissions) in the appropriate certificate stores.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void InstallCertificates(
    string rootCertificatePathName,
    string receiverCertificatePathName,
    string transmitterCertificatePathName,
    string password
)
Public Sub InstallCertificates (
    rootCertificatePathName As String,
    receiverCertificatePathName As String,
    transmitterCertificatePathName As String,
    password As String
)

Parameters

rootCertificatePathName
Type: SystemString
The fully qualified path name of the file containing the SwissDec Root CA certificate to install. The file is typically named [Your-Product]-swissdecCA.crt
receiverCertificatePathName
Type: SystemString
The fully qualified path name of the file containing the SwissDec receiver certificate to install. The file is typically named Distributor.crt or Distributor2.crt
transmitterCertificatePathName
Type: SystemString
The fully qualified path name of the file containing the SwissDec transmitter certificate to install. The file is typically named [Your-Product].p12
password
Type: SystemString
The password associated with the transmitter certificate (*.p12)
Remarks
You need to call this routine only once per computer to install the three required certificates before making the first transmission. It is possible to install more than one set of certificates, for example a test set and a production set. The calling application can specify which certificate to use by calling SetTransmitterCertificate(String, Transmitter4CertificateSearchMode) and SetReceiverCertificate(String, Transmitter4CertificateSearchMode). You can completely remove the certificate from the machine (i.e. erase the files) after this call completed as they are not needed anymore. Note that your transmitter certificate (*.p12) and its associated password are SECRET and should be safeguarded, never leave them unprotected on the customer's computer.
Examples
Calling Transmitter.InstallCertificates()
Copy
try {

    var tx = new Transmitter4();

    tx.InstallCertificates(@"C:\Certs\XZYPayroll-swissdecCA.crt", @"C:\Certs\Distributor2.crt", @"C:\Certs\XYZPayroll.p12", "secretPassword");

} catch (Exception ex) {

    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

}
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetTransmitterCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4SetReceiverCertificate(String, Transmitter4CertificateSearchMode)


Transmitter4.LoadLicenseFile Method

Transmitter4LoadLicenseFile Method
Load the SwissDecTX license file to be used for this process

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void LoadLicenseFile(
    string licenseFilePathName
)
Public Sub LoadLicenseFile (
    licenseFilePathName As String
)

Parameters

licenseFilePathName
Type: SystemString
The fully qualified path name of the license file to load.
See Also

Reference

Transmitter4 Class


Transmitter4.Ping Method

Transmitter4Ping Method
Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void Ping(
    out DateTime serverTime
)
Public Sub Ping (
    <OutAttribute> ByRef serverTime As DateTime
)

Parameters

serverTime
Type: SystemDateTime
Contains the server's time upon return from the call.
Remarks
This method will throw an exception in case an error occurs, or if the echoed string does not match the sent string.
Examples
Calling Transmitter.Ping()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           DateTime serverTime;
           tx.Ping(out serverTime);

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class


Transmitter4.PingString Method

Transmitter4PingString Method
Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void PingString(
    out string serverTime,
    int lcid
)
Public Sub PingString (
    <OutAttribute> ByRef serverTime As String,
    lcid As Integer
)

Parameters

serverTime
Type: SystemString
Contains the server's time upon return from the call. Formatting depends on the lcid.
lcid
Type: SystemInt32
The locale identifier (see http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx) that tells the transmitter how to convert to/from string representation. Use 1033 (hexadecimal 0x409) for US-English convention. If you pass 0 the conversion will be made according to the current culture.
Remarks
This method will throw an exception in case an error occurs, or if the echoed string does not match the sent string.
Examples
Calling Transmitter.Ping()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           string serverTime;
           tx.PingString(out serverTime, 0x100c); // fr-CH    = 4108

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class


Transmitter4.SetCredentials Method

Transmitter4SetCredentials Method
Set user name and password required for the optional basic, digest, NTLM, or Kerberos authentication.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetCredentials(
    string userName,
    string password
)
Public Sub SetCredentials (
    userName As String,
    password As String
)

Parameters

userName
Type: SystemString
The user name needed to connect to the remote server
password
Type: SystemString
The password needed to connect to the remote server
Remarks
Network authentication is alluded to in the "SalaryDeclarationOverview" PDF document, page 91 (in the French edition, 20051202) along with the necessity to support SSL, digital signature and (optionally) point-to-point encryption (SwissDecTX supports all those options).
Examples
Calling Transmitter.SetCredentials()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           tx.SetCredentials("user", "password"); // SwissDecTX handles "HTTP 401 Unauthorized" and authenticates using these credentials

           // TODO: Set the certificates and / or URL, HTTP proxy... if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetUrl(String)


Transmitter4.SetEncryption Method

Transmitter4SetEncryption Method
Set encryption flag

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetEncryption(
    bool encryptTransmissionsFlag
)
Public Sub SetEncryption (
    encryptTransmissionsFlag As Boolean
)

Parameters

encryptTransmissionsFlag
Type: SystemBoolean
Set to true to crypt all salary transmission with the receiver's public key, or false to transmit the salary data in clear text (if the web service it using HTTPS the transmission will be encrypted at another level nevertheless). All transmissions are treated according to the value of this flag, except Ping(DateTime) which is never encrypted. SwissDec 4 requires encryption for all transmissions, the encryption is thus not optional but can be disabled for debugging purposes.
Remarks
Note that all transmissions (except Ping(DateTime)) are always digitally signed with the transmitter's certificate. SwissDecTX also requires that all server replies are signed and time stamped.
See Also

Reference

Transmitter4 Class


Transmitter4.SetHttpProxy Method

Transmitter4SetHttpProxy Method
Set the address and port number of the open HTTP proxy to be used to reach the Internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetHttpProxy(
    string host,
    int port
)
Public Sub SetHttpProxy (
    host As String,
    port As Integer
)

Parameters

host
Type: SystemString
IP address or name of the HTTP proxy server
port
Type: SystemInt32
Port number, e.g. 8080
Remarks
Calling this method is normally not needed. SwissDecTX supports automatic detection and execution of proxy configuration scripts. This feature is also known as Web Proxy Auto-Discovery (WPAD). When using automatic proxy configuration, a configuration script, typically named Wpad.dat, must be located, downloaded, compiled, and run. If these operations are successful, the script returns the proxies that can be used for a request.
Examples
Calling Transmitter.SetHttpProxy()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           tx.SetHttpProxy("webproxy", 8080);

           // TODO: Set the certificates and / or URL if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetHttpProxyWithCredentials(String, Int32, String, String)


Transmitter4.SetHttpProxyWithCredentials Method

Transmitter4SetHttpProxyWithCredentials Method
Set the address and port number of the secured HTTP proxy to be used to reach the Internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetHttpProxyWithCredentials(
    string host,
    int port,
    string proxyUserName,
    string proxyPassword
)
Public Sub SetHttpProxyWithCredentials (
    host As String,
    port As Integer,
    proxyUserName As String,
    proxyPassword As String
)

Parameters

host
Type: SystemString
IP address or name of the HTTP proxy server
port
Type: SystemInt32
Port number, e.g. 8080
proxyUserName
Type: SystemString
The user name needed to connect to the HTTP Proxy
proxyPassword
Type: SystemString
The password needed to connect to the HTTP Proxy
Remarks
Calling this method is normally not needed. SwissDecTX supports automatic detection and execution of proxy configuration scripts. This feature is also known as Web Proxy Auto-Discovery (WPAD). When using automatic proxy configuration, a configuration script, typically named Wpad.dat, must be located, downloaded, compiled, and run. If these operations are successful, the script returns the proxies that can be used for a request.
Examples
Calling Transmitter.SetHttpProxyWithCredentials()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           tx.SetHttpProxyWithCredentials("webproxy", 8080, "proxyUserName", "proxyPassword"); //  // SwissDecTX handles "HTTP 407 Proxy Authentication" and authenticates using these credentials

           // TODO: Set the certificates and / or URL if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetHttpProxy(String, Int32)


Transmitter4.SetReceiverCertificate Method

Transmitter4SetReceiverCertificate Method
Tell the SwissDecTX Transmitter what certificate to use to crypt the transmissions, this is the server's certificate and the server's public key it contains is used for encrypting outgoing messages. This call overrides the configured receiver certificate and can be used to switch programmatically between a test and a production certificate.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetReceiverCertificate(
    string certificateSearchString,
    Transmitter4CertificateSearchMode certificateSearchMode
)
Public Sub SetReceiverCertificate (
    certificateSearchString As String,
    certificateSearchMode As Transmitter4CertificateSearchMode
)

Parameters

certificateSearchString
Type: SystemString
The string to be used to locate the certificate (depends on the search mode).
certificateSearchMode
Type: SwissDecTXTransmitter4CertificateSearchMode
The search mode to be used to find the certificate, see Transmitter4CertificateSearchMode.
Remarks
It is not mandatory to call this method, you can configure the receiver certificate using the SwissDecTX configuration tool. The certificate to be used here has to be issued by SwissDec and must not contain a private key. Use the InstallCertificates(String, String, String, String) method to install the certificates you got from SwissDec in the computer. This method call only affects the current transmitter instance.
Examples
Calling Transmitter.SetReceiverCertificate()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           if (useTestCertificates) {
               tx.SetReceiverCertificate("SERIALNUMBER=4, CN=RefApp Receiver, O=Swissdec, C=CH", CertificateSearchMode.FindBySubjectDistinguishedName);
           } else {
               tx.SetReceiverCertificate("C=CH, O=Swissdec, CN=Distributor", CertificateSearchMode.FindBySubjectDistinguishedName);
           }

           // TODO: Set the transmitter certificate if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetTransmitterCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4InstallCertificates(String, String, String, String)


Transmitter4.SetSchemasLocation Method

Transmitter4SetSchemasLocation Method
Set (optional) external XSD schemas location.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetSchemasLocation(
    string schemasPathName
)
Public Sub SetSchemasLocation (
    schemasPathName As String
)

Parameters

schemasPathName
Type: SystemString
The fully qualified pathname of the folder where the XSD schemas to be used to validate XML documents are stored.
Remarks
The specified folder can be empty, or contain any number of XSD schemas. SwissDecTX will load all schemas found in this folder (using *.xsd) and validate outgoing and incoming messages against them. It is not necessary to call this method for normal use. SwissDecTX uses an internal schema set to perform validation, use only to test special schema configuration, or point to an empty folder to disable validation (not recommended).
See Also

Reference

Transmitter4 Class


Transmitter4.SetTransmitterCertificate Method

Transmitter4SetTransmitterCertificate Method
Tell the SwissDecTX Transmitter what certificate to use to sign the transmissions, this is the client's certificate uniquely identifying your software. The server will use your certificate's public key to encrypt the replies sent to your computer and SwissDecTX will use this certificate's private key to decrypt the messages. This call overrides the configured transmitter certificate and can be used to switch programmatically between a test and a production certificate.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetTransmitterCertificate(
    string certificateSearchString,
    Transmitter4CertificateSearchMode certificateSearchMode
)
Public Sub SetTransmitterCertificate (
    certificateSearchString As String,
    certificateSearchMode As Transmitter4CertificateSearchMode
)

Parameters

certificateSearchString
Type: SystemString
The string to be used to locate the certificate (depends on the search mode).
certificateSearchMode
Type: SwissDecTXTransmitter4CertificateSearchMode
The search mode to be used to find the certificate, see Transmitter4CertificateSearchMode.
Remarks
It is not mandatory to call this method, you can configure the transmitter certificate using the SwissDecTX configuration tool. The certificate to be used here has to be issued by SwissDec and must contain a private key. Use the InstallCertificates(String, String, String, String) method to install the certificates you got from SwissDec in the computer. This method call only affects the current transmitter instance.
Examples
Calling Transmitter.SetTransmitterCertificate()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           if (useTestCertificates) {
               tx.SetTransmitterCertificate("SERIALNUMBER=3, CN=Test, O=Swissdec, C=CH", CertificateSearchMode.FindBySubjectDistinguishedName);
           } else {
               tx.SetTransmitterCertificate("C=CH, L=City, O=You Company, CN=Your Product, OID.0.9.2342.19200300.100.1.1=2.1", CertificateSearchMode.FindBySubjectDistinguishedName);
           }

           // TODO: Set the receiver certificate if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetReceiverCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4InstallCertificates(String, String, String, String)


Transmitter4.SetUrl Method

Transmitter4SetUrl Method
Set the web service URL. Used to override the configured web service address, for example to programmatically switch between the test and production servers.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SetUrl(
    string url
)
Public Sub SetUrl (
    url As String
)

Parameters

url
Type: SystemString
The fully qualified URI of the service, starting with http://... or https://...
Examples
Calling Transmitter.SetUrl()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           tx.SetUrl("https://...");

           // TODO: Set the certificates and/or credentials, HTTP proxy... if needed

           // TODO: Use the transmitter...

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SetCredentials(String, String)


Transmitter4.SynchronizeContract Method

Transmitter4SynchronizeContract Method
Submit contract synchronization data to the SwissDec secure web service over the internet

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SynchronizeContract(
    XmlDocument xmlDoc,
    out XmlDocument result,
    out XmlDocument messageSent,
    out XmlDocument messageReceived,
    out string jobKey,
    out DateTime transmissionDateUtc
)
Public Sub SynchronizeContract (
    xmlDoc As XmlDocument,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageSent As XmlDocument,
    <OutAttribute> ByRef messageReceived As XmlDocument,
    <OutAttribute> ByRef jobKey As String,
    <OutAttribute> ByRef transmissionDateUtc As DateTime
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The salary declaration to send.
result
Type: System.XmlXmlDocument
The server's reply, contains the result of the operation or any error that might occur during the validation, transmission and processing of the salary declaration.
messageSent
Type: System.XmlXmlDocument
The signed message containing the declaration, just before it was sent. To be saved in the transmission journal.
messageReceived
Type: System.XmlXmlDocument
The signed raw server reply. To be saved in the transmission journal.
jobKey
Type: SystemString
The job key assigned by the server and associated with this submission. To be used later with GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
transmissionDateUtc
Type: SystemDateTime
The actual UTC date/time at which the transmission occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageSent text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.SynchronizeContract()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           string jobKey;
           DateTime transmissionDateUtc;
           XmlDocument result, messageSent;

           tx.SynchronizeContract(xmlDoc, out result, out messageSent, out jobKey, out transmissionDateUtc); // xmlDoc declared elsewhere

           // TODO: use messageCreated, jobKey and transmissionDateUtc, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContractLocal(XmlDocument, XmlDocument, XmlDocument, XmlDocument, DateTime)
Transmitter4GetStatusFromSynchronizeContract(XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument, Boolean)
Transmitter4GetResultFromSynchronizeContract(XmlDocument, XmlDocument, String, XmlDocument, XmlDocument, XmlDocument, XmlDocument)
Transmitter4File2FileSynchronizeContract(String, String, String, String, String, DateTime)
Transmitter4File2StringSynchronizeContract(String, String, String, String, String, DateTime)


Transmitter4.SynchronizeContractLocal Method

Transmitter4SynchronizeContractLocal Method
Create salary declaration message locally (EIV case, no transmission occurs, the message is created and returned without being transmitted, also useful for testing)

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void SynchronizeContractLocal(
    XmlDocument xmlDoc,
    out XmlDocument result,
    out XmlDocument messageCreatedAndCrypted,
    out XmlDocument messageCreated,
    out DateTime creationDateUtc
)
Public Sub SynchronizeContractLocal (
    xmlDoc As XmlDocument,
    <OutAttribute> ByRef result As XmlDocument,
    <OutAttribute> ByRef messageCreatedAndCrypted As XmlDocument,
    <OutAttribute> ByRef messageCreated As XmlDocument,
    <OutAttribute> ByRef creationDateUtc As DateTime
)

Parameters

xmlDoc
Type: System.XmlXmlDocument
The salary declaration to process.
result
Type: System.XmlXmlDocument
Any error that might be reported during the processing and validation of the declaration.
messageCreatedAndCrypted
Type: System.XmlXmlDocument
The signed and crypted EIV message containing the declaration, created by this function. Can be transmitted manually to the SwissDec web-based receiver.
messageCreated
Type: System.XmlXmlDocument
The signed (but not encrypted) message containing the declaration, created by this function. This message can be used for logging purposes.
creationDateUtc
Type: SystemDateTime
The actual UTC date/time at which the operation occurred.
Remarks
The UC005 (Replacement) and UC006 (Test) cases have to be handled at the application level, i.e. you simply insert the appropriate tag(s) in the XML declaration as described in the specification. There is absolutely no difference at the transmission level and the server will interpret your submission according to those options, if present. If the <RequestID> tag contains a single asterisk character "*", the empty string "" or the string "reqId", this method will generate a unique identifier for you automatically (you need to parse the messageCreated text to figure out the request ID that was created, or the server response). A valid SwissDecTX license is required to execute this method call.
Examples
Calling Transmitter.SynchronizeContractLocal()
Copy
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter4();

           DateTime creationDateUtc;
           XmlDocument result, messageCreatedAndCrypted, messageCreated;

           tx.SynchronizeContractLocal(xmlDoc, out result, out messageCreatedAndCrypted, out messageCreated, out creationDateUtc); // xmlDoc declared elsewhere

           // TODO: use messageCreated, else check result

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also

Reference

Transmitter4 Class
SwissDecTX Namespace
Transmitter4SynchronizeContract(XmlDocument, XmlDocument, XmlDocument, XmlDocument, String, DateTime)
Transmitter4File2FileSynchronizeContractLocal(String, String, String, String, DateTime)
Transmitter4File2StringSynchronizeContractLocal(String, String, String, String, DateTime)


Transmitter4.CertificateSearchMode Enumeration

Transmitter4CertificateSearchMode Enumeration
Tell SwissDecTX how to locate the certificate, in conjunction with the search string. See SetReceiverCertificate(String, Transmitter4CertificateSearchMode) and SetTransmitterCertificate(String, Transmitter4CertificateSearchMode).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public enum CertificateSearchMode
Public Enumeration CertificateSearchMode
Members
Member name | Value | Description
FindByThumbprint | 0 | "9a276e8669d584d2a4272864179fbcf3a3b0a541"
FindBySubjectName | 1 |
FindBySubjectDistinguishedName | 2 | "C=CH, O=Swissdec, CN=Distributor"
FindByIssuerName | 3 |
FindByIssuerDistinguishedName | 4 |
FindBySerialNumber | 5 | "303ffb2a69e3f6b9"
FindByTimeValid | 6 |
FindByTimeNotYetValid | 7 |
FindByTimeExpired | 8 |
FindByTemplateName | 9 |
FindByApplicationPolicy | 10 |
FindByCertificatePolicy | 11 |
FindByExtension | 12 |
FindByKeyUsage | 13 |
FindBySubjectKeyIdentifier | 14 | "QAMbB9m44uM="
See Also

Reference

SwissDecTX Namespace
Transmitter4SetTransmitterCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4SetReceiverCertificate(String, Transmitter4CertificateSearchMode)
Transmitter4InstallCertificates(String, String, String, String)


TransmitterUtilities4 Class

TransmitterUtilities4 Class
SwissDec Transmitter
Inheritance Hierarchy
SystemObject
SwissDecTXTransmitterUtilities4

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public class TransmitterUtilities4
Public Class TransmitterUtilities4

The TransmitterUtilities4 type exposes the following members.

Constructors
 | Name | Description
Public method | TransmitterUtilities4 | Initializes a new instance of the TransmitterUtilities4 class
Top
Methods
 | Name | Description
Public method | Convert | Run XSLT stylesheet on the xml input document.
Public method | ConvertData | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertDataFromFiles | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertDataFromFilesToFile | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertFromFiles | Run XSLT stylesheet on the xml input document.
Public method | ConvertFromFilesToFile | Run XSLT stylesheet on the xml input document.
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

SwissDecTX Namespace

Copyright © 2016 Axel Rietschin Software Developments. All rights reserved.

Send comments on this topic to info@swissdectx.ch


TransmitterUtilities4 Constructor

TransmitterUtilities4 Constructor
Initializes a new instance of the TransmitterUtilities4 class

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public TransmitterUtilities4()
Public Sub New
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4 Methods

TransmitterUtilities4 Methods

The TransmitterUtilities4 type exposes the following members.

Methods
 | Name | Description
Public method | Convert | Run XSLT stylesheet on the xml input document.
Public method | ConvertData | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertDataFromFiles | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertDataFromFilesToFile | Run XSLT stylesheet on the xml input document (data mode).
Public method | ConvertFromFiles | Run XSLT stylesheet on the xml input document.
Public method | ConvertFromFilesToFile | Run XSLT stylesheet on the xml input document.
Public method | Equals | (Inherited from Object.)
Protected method | Finalize | (Inherited from Object.)
Public method | GetHashCode | (Inherited from Object.)
Public method | GetType | (Inherited from Object.)
Protected method | MemberwiseClone | (Inherited from Object.)
Public method | ToString | (Inherited from Object.)
Top
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.Convert Method

TransmitterUtilities4Convert Method
Run XSLT stylesheet on the xml input document.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void Convert(
    XmlDocument xml,
    XslCompiledTransform stylesheet,
    out string output
)
Public Sub Convert (
    xml As XmlDocument,
    stylesheet As XslCompiledTransform,
    <OutAttribute> ByRef output As String
)

Parameters

xml
Type: System.XmlXmlDocument
Input document.
stylesheet
Type: System.Xml.XslXslCompiledTransform
XSLT stylesheet. Can be null, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
output
Type: SystemString
Output from the transformation.
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.ConvertData Method

TransmitterUtilities4ConvertData Method
Run XSLT stylesheet on the xml input document (data mode).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void ConvertData(
    XmlDocument xml,
    XslCompiledTransform stylesheet,
    out string output
)
Public Sub ConvertData (
    xml As XmlDocument,
    stylesheet As XslCompiledTransform,
    <OutAttribute> ByRef output As String
)

Parameters

xml
Type: System.XmlXmlDocument
Input document (contributions or synchronization data).
stylesheet
Type: System.Xml.XslXslCompiledTransform
XSLT stylesheet. Can be null, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
output
Type: SystemString
Output from the transformation.
Remarks
If you pass your own stylesheet, this function behaves identically as Convert(XmlDocument, XslCompiledTransform, String).
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.ConvertDataFromFiles Method

TransmitterUtilities4ConvertDataFromFiles Method
Run XSLT stylesheet on the xml input document (data mode).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void ConvertDataFromFiles(
    string xmlFile,
    string stylesheetFile,
    out string output
)
Public Sub ConvertDataFromFiles (
    xmlFile As String,
    stylesheetFile As String,
    <OutAttribute> ByRef output As String
)

Parameters

xmlFile
Type: SystemString
Input document file on disk (contributions or synchronization data).
stylesheetFile
Type: SystemString
XSLT stylesheet file on disk. Can be null or the empty string, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
output
Type: SystemString
Output from the transformation.
Remarks
If you pass your own stylesheet, this function behaves identically as ConvertFromFiles(String, String, String).
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.ConvertDataFromFilesToFile Method

TransmitterUtilities4ConvertDataFromFilesToFile Method
Run XSLT stylesheet on the xml input document (data mode).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void ConvertDataFromFilesToFile(
    string xmlFile,
    string stylesheetFile,
    string outputFile
)
Public Sub ConvertDataFromFilesToFile (
    xmlFile As String,
    stylesheetFile As String,
    outputFile As String
)

Parameters

xmlFile
Type: SystemString
Input document file on disk (contributions or synchronization data).
stylesheetFile
Type: SystemString
XSLT stylesheet file on disk. Can be null or the empty string, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
outputFile
Type: SystemString
Name of the file that will be created with the output from the transformation.
Remarks
If you pass your own stylesheet, this function behaves identically as ConvertFromFilesToFile(String, String, String).
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.ConvertFromFiles Method

TransmitterUtilities4ConvertFromFiles Method
Run XSLT stylesheet on the xml input document.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void ConvertFromFiles(
    string xmlFile,
    string stylesheetFile,
    out string output
)
Public Sub ConvertFromFiles (
    xmlFile As String,
    stylesheetFile As String,
    <OutAttribute> ByRef output As String
)

Parameters

xmlFile
Type: SystemString
Input document file on disk.
stylesheetFile
Type: SystemString
XSLT stylesheet file on disk. Can be null or the empty string, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
output
Type: SystemString
Output from the transformation.
See Also

Reference

TransmitterUtilities4 Class


TransmitterUtilities4.ConvertFromFilesToFile Method

TransmitterUtilities4ConvertFromFilesToFile Method
Run XSLT stylesheet on the xml input document.

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter4 (in SwissDecTX.Transmitter4.dll) Version: 4.0.0.0 (4.0.0.0)
Syntax
C#
VB
Copy
public void ConvertFromFilesToFile(
    string xmlFile,
    string stylesheetFile,
    string outputFile
)
Public Sub ConvertFromFilesToFile (
    xmlFile As String,
    stylesheetFile As String,
    outputFile As String
)

Parameters

xmlFile
Type: SystemString
Input document file on disk.
stylesheetFile
Type: SystemString
XSLT stylesheet file on disk. Can be null or the empty string, in which case one of the internal stylesheets is used, en, de, fr or it, depending on the language that was set in the configuration (or the language of the last transmitted declaration, if configured to 'auto'). When no language configuration is found, the function uses the language identifier from the calling thread.
outputFile
Type: SystemString
Name of the file that will be created with the output from the transformation.
See Also

Reference

TransmitterUtilities4 Class