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( IXPathNavigable document, ref string errorDetails ) |
Visual Basic (Declaration) |
---|
Public Function SendDocument ( _ document As IXPathNavigable, _ ByRef errorDetails As String _ ) As SendDocumentReturnCode |
Visual C++ |
---|
public: SendDocumentReturnCode SendDocument( IXPathNavigable^ document, String^% errorDetails ) |
Parameters
- document
- Type: System.Xml.XPath..::.IXPathNavigable
An object implementing the IXPathNavigable interface. In the Microsoft .NET Framework, this can be either an XmlNode (typically an XmlDocument), or an XPathDocument containing the document to be sent 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.
Examples
The following example creates an instance of the
BargeExService class,
initializes it, and calls the
SendDocument
method, passing an XML document.
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 XML Document Dim XmlStatusDocument As New System.Xml.XmlDocument() ' Load the Status document from XML file XmlStatusDocument.Load("MyStatusDocument.xml") ' Error details varaible Dim ErrorDetails As String = String.Empty ' Send the BargeStatusDocument Document SendDocumentResult = BargeExService.SendDocument(XmlStatusDocument, 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 XML Document System.Xml.XmlDocument XmlStatusDocument = new System.Xml.XmlDocument(); // Load the Status document from XML file XmlStatusDocument.Load("MyStatusDocument.xml"); // Error details varaible string ErrorDetails = string.Empty; // Send the BargeStatusDocument Document SendDocumentResult = BargeExService.SendDocument(XmlStatusDocument, ref ErrorDetails);
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | The value of the document parameter is a null reference (Nothing in Visual Basic). |