I have created a .NET windows based application in c#.

Find the attached screenshot of my application.

Java web service is already created and maintained.

Now I want to send the values from windows application grid view to java web service.

Is this possible? If so how?

Am newbie to this type of application,

So please help me with a sample code for how to send the values from grid view to java web service.

Recommended Answers

All 3 Replies

It really depends on the interface to the java web service.
Is it public where we can see it?

Make a http call from your Windows application to the Java Web Services API.

solomon_13000 is right, you can pull the data as an http call without all of the other Web Services fanfare.
Since I don't immediately know the address of a Java Web Service, I have an example of parsing this ASMX call. The result type should be the same though (XML or text).

using System.IO;
using System.Net;
using System.Xml.Linq;

namespace DW_390211
   class CDW_390211
      static void Main(string[] args)
         string strWsCall =
         WebClient wc = new WebClient();
         StreamReader fileIn= new StreamReader(wc.OpenRead(strWsCall));
         XDocument xd = XDocument.Parse(fileIn.ReadToEnd());
         // do something here to further parse the xd (and get the elements)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.