private void JobDocument_Click(object sender, EventArgs e) { //JobJobDocumentTransmit // setup EMsgAPI object - EM EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitService EM = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitService(); // setup Authentication objects EMsgAPI_JobDocumentTransmit2011.RequestAuthentication reqAuth = new EMsgAPI_JobDocumentTransmit2011.RequestAuthentication(); EMsgAPI_JobDocumentTransmit2011.XDDSAuthType XDDSAuth = new EMsgAPI_JobDocumentTransmit2011.XDDSAuthType(); EMsgAPI_JobDocumentTransmit2011.UIDType uid = new EMsgAPI_JobDocumentTransmit2011.UIDType(); // init Authentication objects XDDSAuth.Password = txtAccessCode.Text; uid.Value = txtUserId.Text; XDDSAuth.RequesterID = uid; reqAuth.Item = XDDSAuth; // Setup Request and JobJobDocumentTransmit object EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.Request Request = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.Request(); EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.Response Response = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.Response(); EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequest DT_Request = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequest(); EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitResult DT_Result = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitResult(); EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobIdType JobID = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobIdType(); DT_Request = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequest(); //DT_Request.JobDocument[] JobDoc = new EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequest.JobDocument[1]; DT_Request.JobDocument = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequestJobDocument[1]; DT_Request.JobDocument[0] = new EMsgAPI_Demo.EMsgAPI_JobDocumentTransmit2011.JobDocumentTransmitRequestJobDocument(); // Setup Proxy server and EMsgAPIConnect URL for posting data Set_Server_and_Proxy(EM); // Setup Reqeust Object Request.ReceiverKey = EM.Url; Request.Authentication = reqAuth; Request.RequestID = "RequestID"; DT_Request.SubmitId = "SubmitId"; JobID.XDN = ""; //pass in from file or gui JobID.MRN = ""; //pass in from file or gui DT_Request.JobDocument[0].JobId = JobID; // Assign Reqeust and Response objects to EM Object EM.RequestValue = Request; EM.ResponseValue = Response; try { if (cmbServer.Text.Contains("Async")) { EM.JobDocumentTransmit(DT_Request); DT_Result = null; } else DT_Result = EM.JobDocumentTransmit(DT_Request); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.Read(); return; } if (DT_Result != null) { if (DT_Result.Status.StatusCode != null) { //string JobNumber; //JobNumber = DT_Result.[0].JobId.XDN + ":" + DT_Result.MessageResult[0].JobId.MRN; //txtJobNumber.Text = JobNumber; } } string emfilename = "emresponse.xml"; string resfilename = "result.xml"; string reqfilename = "request.xml"; try { //This will output the response, result and request(if uncommented) to XML files in the //installed directory. This can be very usefull for debugging or ir help is requested from //the EMAPI support team if (chkResult) { serializeResult(emfilename, EM.ResponseValue); serializeResult(resfilename, DT_Result); serializeResult(reqfilename, DT_Request); } } catch (IOException io_error) { MessageBox.Show("Error - " + io_error, "Error", MessageBoxButtons.OK); } } }