0

I have created .NET web services. I want to run it on a remote server and have the Java Applications (clients) contact the server for data. How should I implement the Server such that the Clients can make use of the org.apache.xmlrpc.client.XmlRpcClient package?

I just want the clients to generate a request for data and does not want to have any other dependencies.

Here is a good material on using eclipse for this purpose: http://wso2.org/library/tutorials/creating-web-service-client-3-steps-using-eclipse

Thanks.

Gates
  • 3
  • 1
  • 3
  • 1
    If you say "created .net web services" I assume you have created SOAP services, correct? And if you say "org.apache.xmlrpc.client.XmlRpcClient" that refers to the older, not SOAP compatible XML-RPC style webservices. Are my assumptions correct? – fvu Jan 21 '13 at 17:14
  • Your assumptions are right. – Gates Jan 21 '13 at 17:23

3 Answers3

0

If you have the Web Services on the .NET side, you must have a Web Service Description Language (WSDL) (if you are not talking about REST), you can easily create the client classes to consume this Web Service using an IDE, check this link here: http://netbeans.org/kb/docs/websvc/client.html

the_marcelo_r
  • 1,847
  • 22
  • 35
  • Thanks theMarceloR, I already have the Java application written using Eclipse. I want to transform all database calls to Web services. Moreover, I do not want the clients to run any server for such calls. The goal is to have the application on any windows system and still contact the server with no additional requirements. – Gates Jan 21 '13 at 17:20
0

If you are using Eclipse I suggest you this tutorial to build a simple WS client.

You can adapt this example application to your real needs.

NOTE the example uses an old version of Eclipse, but the wizard is very similar also in newer versions.

davioooh
  • 23,742
  • 39
  • 159
  • 250
0

Although both are rightfully called "web services" the SOAP based web services usually created in .net are incompatible with web services following the older XML-RPC standard.

In my opinion you can follow 2 routes to solve your problem:

  • either you go the SOAP route under Java, one of the most common API's for that purpose would be jax-ws - some excellent pointers to tutorials here, in Pascal Thivent's answer
  • or you transform your .net webservices to XMl-RPC by using xml-rpc.net

Both routes have advantages and disadvantages, it's hard to make that choice for you without knowing more about your project. A priori choosing the SOAP route might look "safer" as there the entire communication will be based on standard components.

Community
  • 1
  • 1
fvu
  • 32,488
  • 6
  • 61
  • 79
  • Some of my constraints are the Client is written as a Java application, so it cannot be a web project and the Server(where the web services will be deployed) will serve as a source for various platforms(laptop and mobile devices). Using your second option, will I still be able to use the older java XML-RPC? – Gates Jan 21 '13 at 18:38
  • @Gates A web service client app doesn't have to be a "web project" at all - see [the simpleclient implementation in the tutorial](http://docs.oracle.com/javaee/5/tutorial/doc/bnayn.html). But yes, if you (re)develop a server using the xmlrpc.net library you can use these services with your existing xmp-rpc client. – fvu Jan 21 '13 at 18:58