Esempio n. 1
0
        private string SubmitSoapServiceRequest(string xmlRequest, CredentialsProvider credentials)
        {
            /* NOTE:
             * This code is intended to be used for reference only and it
             * may not return any response or meaningful response during
             * the execution of the program.  Appropriate code change needs
             * to be made to work with your specific SOAP based service provider.
             */

            MohawkTransportLayer transportLayer = new MohawkTransportLayer();

            RequestMessage requestMessage = null;

            try
            {
                requestMessage = SimpleRequestMessage.Create(new DocumentFactory().CreateFromString(xmlRequest));
            }
            catch (TransportLayerException e)
            {
                Console.WriteLine(e.StackTrace);
            }
            String xmlResponse = transportLayer.SendRequestAndGetResponse(credentials, requestMessage);

            return(xmlResponse);
        }
Esempio n. 2
0
        public virtual void ShouldRun()
        {
            var transportLayer = new MohawkTransportLayer();

            var credentialsProvider = new _CredentialsProvider_35();

            var requestMessage
                = SimpleRequestMessage.Create(new DocumentFactory().CreateFromStream(Platform.ResourceLoader.GetResource
                                                                                         (typeof(MohawkSender), "findCandidatesQuery.xml")));

            string response = transportLayer.SendRequestAndGetResponse(credentialsProvider, requestMessage);

            Console.Out.WriteLine(response);
        }
Esempio n. 3
0
        private string SubmitRestServiceRequest(string xmlRequest, CredentialsProvider credentials)
        {
            /* NOTE:
             * This code is intended to be used for reference only and it
             * may not return any response or meaningful response during
             * the execution of the program.  Appropriate code change needs
             * to be made to work with your specific REST based service provider.
             */

            string serviceURL = "http://tl7.intelliware.ca/rest";

            string xmlResponse = new RestTransportLayer(serviceURL).SendRequestAndGetResponse(
                credentials, SimpleRequestMessage.Create(xmlRequest));

            return(xmlResponse);
        }
Esempio n. 4
0
        public virtual void ShouldMapToCorrectService()
        {
            var method = transport.CreatePostMethod(SimpleRequestMessage.Create("<REPC_IN000012CA></REPC_IN000012CA>"));

            Assert.AreEqual(new Uri("http://142.222.45.132:8080/soap/hl7/v3/ca/v2.04.2/Service.svc/", true), method.Uri, "url");
        }
Esempio n. 5
0
 private RequestMessage CreateMessage()
 {
     return(SimpleRequestMessage.Create("<myXml></myXml>"));
 }