Sends the specified document to BargeEx.
Namespace:
BargeExAssembly: BargeEx (in BargeEx.dll)
Version: 3.0.400.140 (3.0.400.140)
Syntax
C# |
---|
public SendDocumentReturnCode SendDocument( IDocument document, ref string errorDetails ) |
Visual Basic (Declaration) |
---|
Public Function SendDocument ( _ document As IDocument, _ ByRef errorDetails As String _ ) As SendDocumentReturnCode |
Visual C++ |
---|
public: SendDocumentReturnCode SendDocument( IDocument^ document, String^% errorDetails ) |
Parameters
- document
- Type: BargeEx..::.IDocument
The document to send to BargeEx.
- errorDetails
- Type:
System..::.String
%
Output - If this method returns any value other than Success, this parameter may contain additional details about the failure. This is used primarily for indicating why a document failed schema validation.
Return Value
A SendDocumentReturnCode value that indicates whether or not the document was successfully sent to BargeEx.Remarks
This method invokes the SendDocument method available from the BargeEx web service. A value of Success indicates the document was successfully sent. Any other value indicates a failure.
If the IDocument.Header.SenderTradingPartnerNumber property is not set, it will be set to BargeExService.TradingPartnerNumber before the document is sent to BargeEx.
Examples
The following example creates an instance of the
BargeExService class,
initializes it, and calls the
SendDocument
method, passing an
IDocument object.
CopyVisual Basic
' Create BargeExService instance Dim BargeExService As New BargeEx.BargeExService( _ "http://www.BargeExUri.com/", _ "12345678", _ "UserName", _ "Password") ' Send document result Dim SendDocumentResult As BargeEx.SendDocumentReturnCode ' Create a new BargeEx Document Dim BargeStatusDocument As New BargeEx.BargeStatus ' Error details varaible Dim ErrorDetails As String = String.Empty ' Set the Document Properties With BargeStatusDocument ' ... End With ' Send the BargeStatusDocument Document SendDocumentResult = BargeExService.SendDocument(BargeStatusDocument, ErrorDetails)
CopyC#
// BargeExService object BargeEx.BargeExService BargeExService = new BargeEx.BargeExService( "https://www.BargeEx.com/Beta/BargeExService.asmx", "12345678", "UserName", "Password"); // Send document result BargeEx.SendDocumentReturnCode SendDocumentResult; // Create a new BargeEx Document BargeEx.BargeStatus BargeStatusDocument = new BargeEx.BargeStatus(); // Error details varaible string ErrorDetails = string.Empty; // Set the Document Properties // ... // Send the BargeStatusDocument Document SendDocumentResult = BargeExService.SendDocument(BargeStatusDocument, ref ErrorDetails);
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | The value of the document parameter is a null reference (Nothing in Visual Basic). |