private static void DoPublishDiscover(ILEXSPublishDiscoverPortType proxy, string sampleInstancePath, string sampleXmlInstance)
        {
            DoPublishType requestType = Deserialize(sampleInstancePath,
                sampleXmlInstance, "doPublish", "http://usdoj.gov/leisp/lexs/publishdiscover/3.1",
                typeof(DoPublishType)) as DoPublishType;

            doPublish message = new doPublish(requestType.PublishMessageContainer);

            proxy.doPublish(message);
       }
        public virtual void doPublish(doPublish request)
        {
            try
            {
                string appDataDir = HostingEnvironment.ApplicationPhysicalPath;

                string samplesFolder = ConfigurationManager.AppSettings["SamplesFolder"];

                string samplesDir = string.Empty;

                if (appDataDir == null)
                {
                    samplesDir = samplesFolder;
                }
                else
                {
                    samplesDir = appDataDir + Path.DirectorySeparatorChar + samplesFolder;
                }

                DoPublishType publish = new DoPublishType();
                publish.PublishMessageContainer = request.PublishMessageContainer;

                string xmlPublish = SerializationUtils.SerializeToXmlString(publish,
                    "doPublish", "http://usdoj.gov/leisp/lexs/publishdiscover/3.1");


                string xmlFilePath = samplesDir + Path.DirectorySeparatorChar + "PublishDiscoverRequest.xml";

                XmlDocument outputXmlDoc = new XmlDocument();
                outputXmlDoc.LoadXml(xmlPublish);

                outputXmlDoc.Save(xmlFilePath);
            }
            catch (Exception e)
            {
                Debug.WriteLine("Server exception: " + e.ToString());

                throw;
            }
        }