Ejemplo n.º 1
0
        private void abrirWSDLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ofdBO.InitialDirectory = this.basePath;

            DialogResult result = ofdBO.ShowDialog();

            if (result == DialogResult.OK)
            {
                string   file = ofdBO.FileName;
                FileInfo f    = new FileInfo(file);

                wsdlManager = new WSDLManager();

                //wsdlManager.UseDirectory = false;
                //wsdlManager.WsdlsPath = f.DirectoryName;

                XmlDocument doc = new XmlDocument();
                doc.Load(file);



                wsdlManager.LoadWSDL(doc);

                CargarDatosWSDL();
            }
            else
            {
                MessageBox.Show("Debe seleccionar un un archivo");
            }
        }
 public frmParametersCreator(Capacity capacity, WSDLManager wsdlManager, ParametersType parametersType)
 {
     InitializeComponent();
     this.capacity = capacity;
     this.bOs = wsdlManager.BussinesObjects;
     this.wsdlManager = wsdlManager;
     this.parametersType = parametersType;
     CargarBOs();
     LoadContainers();
 }
 public frmParametersCreator(Capacity capacity, WSDLManager wsdlManager, ParametersType parametersType)
 {
     InitializeComponent();
     this.capacity       = capacity;
     this.bOs            = wsdlManager.BussinesObjects;
     this.wsdlManager    = wsdlManager;
     this.parametersType = parametersType;
     CargarBOs();
     LoadContainers();
 }
Ejemplo n.º 4
0
        public void importWSDL()
        {
            EAMetaModel meta = new EAMetaModel().setupSOAPackage();


            string filename = @"..\..\Resources\service.wsdl";

            WSDLManager mgr = new WSDLManager();

            mgr.importWSDL(filename, EARepository.Repository, meta.soaDiagram);
        }
Ejemplo n.º 5
0
        public void importWSDL()
        {
            EAMetaModel meta = new EAMetaModel().setupSOAPackage();


            String filename = @"D:\SOA\Modelling\Schema\CommunicationManagement_implementation_v1_datarich.wsdl";

            WSDLManager mgr = new WSDLManager();

            mgr.importWSDL(filename, EARepository.Repository, meta.soaDiagram);
        }
Ejemplo n.º 6
0
        public frmWSDLCreator()
        {
            InitializeComponent();
            txtNombreServicio.Focus();
            btnNuevoEntrada.Enabled    = false;
            btnNuevoSalida.Enabled     = false;
            btnEditarEntrada.Enabled   = false;
            btnEliminarEntrada.Enabled = false;
            btnEditarSalida.Enabled    = false;
            btnEditar.Enabled          = false;
            btnEliminarSalida.Enabled  = false;

            wsdlManager = new WSDLManager();
            basePath    = ConfigurationManager.AppSettings["BASE_FOLDER__PATH"];
        }
Ejemplo n.º 7
0
        public void exportWSDL()
        {
            EAMetaModel meta = new EAMetaModel();

            EA.Element component = new EAElement();
            component.Name    = "CommunicationManagement";
            component.Version = "http://usermodel.namespace";

            {
                object    obj = component.Methods.AddNew("operation1", "");
                EA.Method op1 = (EA.Method)obj;
                op1.Name = "DoSomething1";
                object       objParam = op1.Parameters.AddNew("paramString", "");
                EA.Parameter param    = (EA.Parameter)objParam;
                param.Name = "paramStringName";
                param.Type = "String";
                param.Kind = "Input";
            }
            {
                object    obj = component.Methods.AddNew("operation2", "");
                EA.Method op1 = (EA.Method)obj;
                op1.Name = "DoSomething2";
                object       objParam = op1.Parameters.AddNew("paramString", "");
                EA.Parameter param    = (EA.Parameter)objParam;
                param.Name = "paramStringName";
                param.Type = "String";
                param.Kind = "Input";
            }

            WSDLManager mgr = new WSDLManager();

            ServiceDescription sd = mgr.exportWSDL(EARepository.Repository, component);


            sd.Write(@"service.wsdl");

            Assert.IsNotNull(sd);
            Assert.AreEqual(1, sd.PortTypes.Count);
        }
Ejemplo n.º 8
0
        static void Run()
        {
            HttpResponseMessage response = null;
            switch(command.ToLower()){

            case "get":
                HttpClient client = new HttpClient ();
                client.BaseAddress = new Uri (arguments ["uri"]);

                client.DefaultRequestHeaders.Accept.Add(
                    new MediaTypeWithQualityHeaderValue("text/plain"));
                //response = await client.GetAsync ("");
                if (response.IsSuccessStatusCode) {
                    Console.WriteLine(response.ToString ());
                }
                else {
                    ProcessResponseCode ((int)response.StatusCode);
                }
                break;
            case "post":
                HttpClient postClient = new HttpClient ();
                postClient.BaseAddress = new Uri (arguments ["uri"]);
                var content = new FormUrlEncodedContent (new[] {
                    new KeyValuePair<string, string> ("", arguments ["body"])
                });
                //response = await postClient.PostAsync (arguments ["uri"], content);
                if (response.IsSuccessStatusCode) {
                    Console.WriteLine(response.ToString ());
                } else {
                    ProcessResponseCode ((int)response.StatusCode);
                }
                break;
            case "wsdl":
                WSDLManager wsdl = new WSDLManager ();
                wsdl.runService (arguments.get("service"),arguments);//arguments["wsdl"],arguments);
                break;
            default:
                throw new Exception ("Invalid command '"+command+"'");
            }
        }