Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.net to java conversion

Posted on 2011-09-02
2
Medium Priority
?
303 Views
Last Modified: 2012-05-12
I have a complicated  .net web services application that I personally would like to convert into java.

What is the best way of approaching this if I am to do this myself. It would appear that the .net world uses lots of wizards in visual studio to generate code. What is the best way of understanding the .net code in order to create a java equivalent.

Following on from this, what are the current java technologies that deal with web services and integrating with a database. I have an adobe flex based client application that connects to the web services.

Any help much appreciated.

Paul
0
Comment
Question by:plambkin1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 1600 total points
ID: 36476724
look at this:
http://stackoverflow.com/questions/2400357/is-there-an-efficient-tool-to-convert-the-net-c-webservice-to-java-webservice
and read this answer below.
Sounds to me like the words of a wise man:
-----------------------

Don't waste your time looking for a transition tool. If you were working with Java 1.4 and maybe C# 1.x, there was a beta utility from Microsoft that did on-par conversion between the two. But that was a long time ago, and they don't publish the utility any longer. Even then, the utility would only convert source code at the language level, as opposed to dealing with the separate languages' implementation, i.e. in a Windows service, web service, console app, etc.

Having ported applications in both directions (C#->Java and Java->C#), the manual effort IS your shortest path. Any tool that suggests otherwise is likely a poor implementation. You're making modifications in either case. Convert-and-update is slower than writing-from-scratch.

Not to suggest this, but if the basis for your approach is not time-savings but rather a lack of understanding C#, then a conversion tool is only going to cause you more problems because it will hide the true intention of the source code.

Basically, take your lumps and roll your own. Follow @Padmarag's suggestion and stick with simplicity. The closest agreement between your two options (C# and Java) is a generated WSDL. This is a great way to get started with your base objects and operations.
---------------------------------

These are some  tutorials for building web services with Java

http://www.roseindia.net/webservices/buildingsimplewebservice.shtml

http://download.oracle.com/docs/cd/E17802_01/webservices/webservices/reference/tutorials/wsit/doc/Examples_glassfish4.html



0
 
LVL 28

Assisted Solution

by:dpearson
dpearson earned 400 total points
ID: 36481231
I would agree that the best approach is to just convert the code manually.  You may be unaware of the history but C# was originally Microsoft's implementation of Java.  Sun didn't like what they were doing over in Redmond (since Microsoft was adding features that would only work on Windows) and eventually Microsoft broke it off as a separate language.

But as a result C# and Java are exceptionally close.  A lot of the libraries are the same and a lot of the "porting" work is merely changing the names of types - sometimes as trivially as "String -> string" etc.

I've ported from Java to C# before and it's not a lot of work to do by hand.

Doug
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question