Python web service for a java application?

That depends on how you mean this. Do you mean to use the service as a library within the app? If so, you may want to look at Jython and make it into a plugin.

That depends on how you mean this. Do you mean to use the service as a library within the app? If so, you may want to look at Jython and make it into a plugin.

If, however, you want to run the service as a separate app, then use the web interface to call it from Java, that should be no problem. In theory, the end user of a web service (in this case, the user is your app) should never have to worry about what language the service is written in; as long as the standards are kept to (JSON, XML, etc), most languages will have the capability to work together.

I think it is possible. Let's assume that your webservice method returns a json string. You can use this string, convert into a HashMap in Java and work with the data.

I personally prefer cherrypy, for the ease of creating a webservice. It has an inbuilt server too. You can use FlexJSON to convert json string into a HashMap.

The method deserialize will help in doing so. This is how I did it. Public Map JsonToMap(String data) { Map dataMap; dataMap = new JSONDeserializer().

Deserialize(data); return dataMap; } Here, String data is the json string that your python webservice method is supposed to return.

When developing in a framework, it is generally simpler to develop with the language of the framework than it is to develop with a different language. Servlets are components of the web server (which is also called a Servlet container). The Servlet container and the required Servlet API is all Java.

While you could Frankenstein in some sort of Python code, odds are good that the integration effort would eventually make that "simplicity" far more complex than you particularly desire. If you want a Python web application, use a Python web framework. If you want a Java web application, use a Java framework.

Don't try to make the two cross compatible, as the integration points (and used / offered conveniences) are not even guaranteed to be present on the "other side" of the fence.

There are many web frameworks for java, some are better than others. For a fairly comprehensive reference, consider consulting en.wikipedia.org/wiki/Comparison_of_web_.... Python is indeed a fairly intuitive language and because it is frequently used as a server side scripting language, a lot of respectable web frameworks (like webpy and django) have emerged.It depends what tasks you are trying to implement.

If your project requires a java applet, you may be able to embed it within a web page which you dynamically compose using a python framework. However, if you are looking for interoperability between java and python, you will wish to read more about Jython (and it's limitations) as lacqui has suggested. Personally, I'm a fan of webpy over cherrypy for quick, lightweight, practical and easy web development and templating, however, if speed is a major concern, you may wish to consider this before adopting a dynamically typed interpreted language.

Python 3 is on average around 50 times slower than Java 6 over the JVM (shootout.alioth.debian.org/u32q/benchmar...) For more information regarding the comparison of java versus python, take a look at pythonconquerstheuniverse.wordpress.com/....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions