Transmitter5DeclareSalary Method |
Submit salary declaration data to the SwissDec secure web service over the internet
Namespace: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic 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
)
public:
virtual void DeclareSalary(
XmlDocument^ xmlDoc,
[OutAttribute] XmlDocument^% result,
[OutAttribute] XmlDocument^% messageSent,
[OutAttribute] XmlDocument^% messageReceived,
[OutAttribute] String^% jobKey,
[OutAttribute] DateTime% transmissionDateUtc
) sealed
function DeclareSalary(xmlDoc, result, messageSent, messageReceived, jobKey, transmissionDateUtc);
Parameters
- xmlDoc XmlDocument
- The salary declaration to send.
- result XmlDocument
- 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 XmlDocument
- The signed message containing the declaration, just before it was encrypted and sent. To be saved in the transmission journal.
- messageReceived XmlDocument
- The signed raw server reply just after decryption. To be saved in the transmission journal.
- jobKey String
- 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 DateTime
- The actual UTC date/time at which the transmission occurred.
RemarksThe 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. There is a 1-hour timeout on this call, as the Swissdec distributor 'thinks' for a while before returning from this call.
ExampleCalling Transmitter.DeclareSalary()
using SwissDecTX;
try {
var tx = new Transmitter5();
string jobKey;
DateTime transmissionDateUtc;
XmlDocument plausibility, messageSent;
tx.DeclareSalary(xmlDoc, out result, out messageSent, out jobKey, out transmissionDateUtc);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also