insert xml in a form

Please help me!

I have a comunication with web server, but the return this web server is xml, i need to know how i get xml and insert this xml in a form in Visual Cobol

  • Can you please provide some more detail here?

    What Visual COBOL product are you using Visual COBOL for Visual Studio or Visual COBOL for Eclipse?

    Are you using native code or managed code (.NET or .JVM)

    What form technology are you using?

    Visual COBOL currently supports calling SOAP Web Services in native COBOL projects and client programs can be generated using the WSDL file from the web service.

    In managed .NET code you can create and consume SOAP (ASP.NET) and WCF Web Services quite easily so that the data is returned using standard COBOL types and you do not have to concern yourself with the xml format at all.

    Please take a look at the documentation here:

    There are also examples of Web Services in the Samples Browser.

  • Hello, Chris.

    Thanks for answer.

    I'm using Visual COBOL for Visual Studio.

    I'm going to work SOAP, but i don't know to do this, my question is

    how i do?

    I read the document you sent me, but I need to know the syntax.

    This my link i need to do

    ws.dbdireto.com.br/.../Service.asmx

    Thanks for your help.

  • Hey, Chris.

    I need to have something like this for visual cobol for windows

    www.linhadecodigo.com.br/.../soap-e-webservices.aspx

    Thanks

  • You can do exactly what is shown in that article.

    I have attached an example containing a simple VC ASP.NET Web Service and a Winform client project that calls it and displays the returned value.

    ASP.NET Web Services using SOAP are the older method of creating Web Services but they are still supported. You can create a new ASP.NET Web Service by selecting New-->Web Site-->ASP.NET Web Service. The newer method is using WCF and we have a number of examples that demonstrate this.

    To call an ASP.NET Web Service from a client application right click on the project name in Solution Explorer and select Add Service Reference. If the Web Service is located on the same computer you can select Discover to find it. If it is on a different computer then you should place the URL to its WSDL file in the field provided. Once you have added the reference to the project you can instantiate the class and call its methods.

    Thanks.

    vcwebservice.zip
  • Thanks, Chris.

    i did download of vcwebservice.zip.

    But i tried to run, but he gave error.

    I took a screen shot -  www.dropbox.com/.../Capturar.PNG

    so for you to know I do not have much experience in this matter, but thank you

  • Sorry about that. When I saved the solution file for these two projects it was saved to a folder outside of what I included in the zip file so it wasn't included.

    I have attached a new zip file that contains the .sln.

    Please unzip it to your C drive and then open up c:\vcwebservice.sln in Visual COBOL.

    Thanks.

    vcwebservice2.zip