Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Ram Murthy

Ranch Hand
+ Follow
since Aug 02, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ram Murthy

Yes that was the problem....i have to be in java 5 to use gson 1.3. Compiled with 5 and tried it worked like a champ. Gson rocks -

Thanks for your inputs Bear.
Thanks looks like that will work. When i tried using it am getting a java.lang.LinkageError: LinkageError when instantiating Gson.

We are using gson 1.3 jar and our project is a java 1.4 project. What version of Java does gson 1.3 jar use.. ??

Will I get a LinkageError if a java 1.4 project tries to use APIs in Java 5 ??

My dev server is WAS 6.0.

Is there any API in gson which will do what i am looking for. I checked the API's and dont see any which will do what i am looking for.
Currently I am making a AJAX call passing a JSON array to the server. The String which comes in to my Java class looks like this...

[{itemName: "apple",itemValue: "10.00"}, {itemName: "orange",itemValue: "20.10"}, {itemName: "banana", itemValue: "33.00"}]
I need to parse this into an array or List of Item.java classes



I tried JSONArray from org.json



but this just creates an array of JSONObject.

Are there any utilities which will take the json array string i have listed along with Item.class as input and give me back an array or list of Item classes.

Thanks,
Ram
Thanks, the file was having an extra space in the front.
9 years ago
I am new to Struts 2 and am trying to execute the tutorial in the below link.
http://java.dzone.com/articles/struts2-tutorial-part-27

Everything works fine, but the labels given in ApplicationResources.properties are not being picked, so the page loads with text boxes and buttons with no label text. Dont see any errors in the tomcat console. I have the tutorial line by line, double checked for typos and the entry in struts.xml

<constant name="struts.custom.i18n.resources" value="ApplicationResources" />

Any ideas what I am missing ?

Cheers,
Ram
9 years ago
Thanks a bunch....I got a Halo now -
11 years ago
Thanks that helped but I am not fully clear... probably let me state where my confusion..

1. In the service project on the web.xml the <servlet-class> is mapped as the service bean which is a regular java class does not extend HttpServlet. Is that allowed as per J2EE standards.

2. If yes then probably the server runtine in tandem with webservices.xml directs the httprequest to the service bean..is that a correct assumption.

11 years ago

1. The use of the WSDL at runtime depends, as far as I understand, on what kind of client you develop.
It is possible to develop clients that assemble SOAP messages and send them without ever using the WSDL while other types of clients generates portable artifacts, like JAXB beans, at runtime, based on the WSDL. Then there is also the kind of clients which use wsimport or similar tool to generate artifacts at development time using the WSDL.



I am genererating the client and service using RAD. The client is webproject as well, in that case does the WSDL get used at runtime. I have a feeling it does not since WSDL defines the service and using WSDL we generate the service and clients. A bunch of classes get created proxy, ser, desser etc..I am assuming these classes take care of the runtime and WSDL is not needed at runtime...atleast in my case.

2. The fact that you see the endpoint address in the web.xml deployment descriptor is because your endpoint uses a servlet to receive requests, which are then passed on to your endpont implementation class.
Strictly speaking, this is not necessary, since the endpoint address is also present in the WSDL, so for endpoints that uses other protocols, there will be no web.xml.



Where can I see the servlet(the class which extends HttpServlet) does that get generated, even then I am confused because in the web.xml the servlet-class attribute points to the service bean which is not a servlet. Once the http request is recieved it pure J2EE ...so it will invoke the service bean and find it is not a servlet. Wouldn' that lead to failure....


Also another question for those who use RAD IDE, how do I know if I am using JAX-WS or JAX-RPC ??
11 years ago
I am a beginer to WS and am working through some tutotrilas. I am using RAD to generate my service and client. The tutorials I am trying work fine but I have some questions...

1. Does WSDL get used during runtime
2. The Service bean gets mapped in the web.xml against the URL. Understand WS uses http protocol, so was curios how it works when the Service Bean does not implement HttpServlet. My understanding is when a class is mapped in servlet-class it should be a Servlet.

Thanks,
Ram
11 years ago
Any responses will be appreciated.. Thanks !
11 years ago
I am new to Spring..I am reading through the documentation and some tutorials. Looks like Spring is build using Java 1.5 since I see the use of Annotations, is it true that we need to use Java 1.5 or higher to use Spring. Also does the same apply to Struts 2.0

Is there a link or documentation which states what version of Java is needed for each of the Spring releases.
11 years ago
Thanks. Are there any books for SCDJWS 5 like how we have the RMH book for the prior version of the exam. I had actually bought the RMH book and had planned to study/take the old version of the exam..but never did. Now I see that the new version is out...is there any recommendations on which version to take. Are the topics in the old version still relevant an useful in the industry or is it too outdated ??

11 years ago
So there is no way I can use Eclipse IDE and integrate weblogic 10.3 server inside it. Isn't there a plugin like sysdeo for integrating Tomcat in Eclipse.
I am using Eclipse as my IDE and would like to use weblogic server and be able to start/shutdown server, add/remove projects, debug etc from the Eclipse IDE.

Also if anyone can help me download the 8.1 version that will be great. The client I am going to work for next uses Eclipse with weblogic 8.1

Thanks,
Ram
11 years ago
Thanks. Is there a eclipse plugin that can be used to integrate weblogic10 in eclipse 3.1. I searched in the oracle website and found some article which mentions about <WebLogic-Plugin (2.x)> , but couldn't find any link to download the plugin or how to install that.

Any inputs on how to get the plugin.
11 years ago