Represents the CICA document called Document Acknowledgment Document (D_31).

Namespace:  BargeEx
Assembly:  BargeEx (in BargeEx.dll)
Version: 3.0.400.140 (3.0.400.140)

Syntax

C#
[SerializableAttribute]
public class DocumentAcknowledgment : DocumentBase
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class DocumentAcknowledgment _
	Inherits DocumentBase
Visual C++
[SerializableAttribute]
public ref class DocumentAcknowledgment : public DocumentBase

Remarks

The Document Acknowledgment Document provides syntax level acknowledgment of a received XML document.

Examples

The following example creates an instance of the DocumentAcknowledgment class and sets its common properties.
CopyVisual Basic
' Create a new BargeEx DocumentAcknowledgment object
Dim DocumentAcknowledgment As New BargeEx.DocumentAcknowledgment()

' DocumentError object
Dim DocumentError As New BargeEx.DocumentError()

' Update the DocumentAcknowledgment properties before
' returning the object to the user
With DocumentAcknowledgment

    ' Update the DocumentHeader property
    .Header.SenderTradingPartnerNumber = "12345678"
    .Header.ReceiverTradingPartnerNumber = "87654321"
    .Header.InstanceIdentifier = "ABC123"
    .Header.CreateDateTime = DateTime.Parse("01/01/2008 16:00")

    ' Update the AcknowledgedDocumentHeader's properties
    With .AcknowledgedDocumentHeader

        .SenderTradingPartnerNumber = "12345678"
        .ReceiverTradingPartnerNumber = "87654321"
        .InstanceIdentifier = "XYZ123"
        .CreateDateTime = DateTime.Parse("01/01/2008 16:00")

    End With ' .AcknowledgedDocumentHeader


    .DocumentResponse = BargeEx.CicaDocumentResponseCode.AcceptedWithErrors
    .ErrorCode = BargeEx.CicaDocumentErrorCode.Validation
    .ErrorDescription = "There was an invalid barge number error."

    ' Set the DocumentError properties
    With DocumentError

        .ErrorCode = BargeEx.CicaDocumentErrorCode.Validation
        .ErrorDescription = "CSG123 is an invalid barge number."
        .XPath = "/BargeStatus/Detail/Equipment/Barge/Name"

    End With

    ' Add this DocumentError to the DocumentErrors collection
    .DocumentErrors.Add(DocumentError)

End With ' DocumentAcknowledgment
CopyC#
// Create a new BargeEx DocumentAcknowledgment object
BargeEx.DocumentAcknowledgment DocumentAcknowledgment = new BargeEx.DocumentAcknowledgment();

// DocumentError object
BargeEx.DocumentError DocumentError = new BargeEx.DocumentError();

// Update the DocumentAcknowledgment properties before
// returning the object to the user

// Update the DocumentHeader property
DocumentAcknowledgment.Header.SenderTradingPartnerNumber = "12345678";
DocumentAcknowledgment.Header.ReceiverTradingPartnerNumber = "87654321";
DocumentAcknowledgment.Header.InstanceIdentifier = "ABC123";
DocumentAcknowledgment.Header.CreateDateTime = DateTime.Parse("01/01/2008 16:00");

// Update the AcknowledgedDocumentHeader's properties
DocumentAcknowledgment.AcknowledgedDocumentHeader.SenderTradingPartnerNumber = "12345678";
DocumentAcknowledgment.AcknowledgedDocumentHeader.ReceiverTradingPartnerNumber = "87654321";
DocumentAcknowledgment.AcknowledgedDocumentHeader.InstanceIdentifier = "XYZ123";
DocumentAcknowledgment.AcknowledgedDocumentHeader.CreateDateTime = DateTime.Parse("01/01/2008 16:00");

DocumentAcknowledgment.DocumentResponse = BargeEx.CicaDocumentResponseCode.AcceptedWithErrors;
DocumentAcknowledgment.ErrorCode = BargeEx.CicaDocumentErrorCode.Validation;
DocumentAcknowledgment.ErrorDescription = "There was an invalid barge number error.";

// Set the DocumentError properties
DocumentError.ErrorCode = BargeEx.CicaDocumentErrorCode.Validation;
DocumentError.ErrorDescription = "CSG123 is an invalid barge number.";
DocumentError.XPath = "/BargeStatus/Detail/Equipment/Barge/Name";

// Add this DocumentError to the DocumentErrors collection
DocumentAcknowledgment.DocumentErrors.Add(DocumentError);

Inheritance Hierarchy

System..::.Object
  BargeEx.Internal..::.SerializableBase
    BargeEx.Internal..::.DocumentBase
      BargeEx..::.DocumentAcknowledgment

See Also