Bharat Ruparel

Ranch Hand
+ Follow
since Jul 30, 2003
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 Bharat Ruparel

Thanks for your time.
You just got a new customer. When is the book scheduled to be released?
Regards,
Bharat
11 years ago
Hello Justin,
You wrote:


I'm looking forward to the day very soon where there are lots of Rails applications running on the JVM via JRuby (and on the CLR via RubyCLR).


I have a few questions on your comment above:
1. When do you think that will be possible?
2. Will the apps run pretty much unchanged?
3. Why would you want to do that? a) Speed, b) integration with Java Libraries?
4, 5, 6 ... Any other benefits?
I have a number of books both on Ruby and Ruby on Rails. I am quite impressed with their quality.
what is it in your opinion that differentiates your book from the rest? A number of people looking into Ruby and RoR are Java Developers Architects anyway.
Also, I have questions around Security in Ruby. When will there be support for PKI, WS-Security etc? What is the RoR community position on that? What is your opinion?
Can someone experienced in J2EE and Web frameworks like Struts leverage his/her knowledge to fast track learning Ruby on Rails? Does your book help on that front? If yes, then please elaborate.
I am sorry if I am bombarding you with questions, but this thread seems to have very nicely tried to hit on all the saliant points. You must be familiar with David Blacks book on Ruby on Rails. How doe your book differ from that?
Thanks in advance for your answers.
Regards,
Bharat
11 years ago
Try
Beginning XML, 3rd Edition. Wrox Press.
I like it.
Bharat
You may want to look at the Web Tools Project for Eclipse (WTP). Go to the main Eclipse site and then pick the Web Tools Project. It provides extensive support for Apache Axis. Everything works for both Axis 1.2.1 and Axis 1.3.
Regards,
Bharat
12 years ago
Hello Stefan,
Thanks for answering. The file system that I am using is ext3. I searched on Google for solutions. The good new is that, as you pointed out, there are a number of open source solutions out there. Which one should I use based on your experience.
Any pointers anyone?
Thanks.
Bharat
12 years ago
The bartender reminded me gently (may be not so gently) not to hijack a thread which I thought was related. So I am starting a new thread. Here we go:
I have a dual boot laptop with Windows XP Professional installed on one partition and RedHat Fedora Core 4 on another. I can access anything I want from my Windows partition while I am using Linux using auto mount. Is there something similar that I can do on the Windows side while I am working in Windows to access the Linux partition?
Any thoughts/advice anyone?
Thanks.
Bharat
12 years ago
While we are on this topic. I will ask this question. I have a dual boot laptop with Windows XP Professional installed on one partition and RedHat Fedora Core 4 on another. I can access anything I want from my Windows partition while I am using Linux using auto mount. Is there something similar that I can do on the Windows side while I am working in Windows to access the Linux partition?
12 years ago
You have to manually check the "Enable External Amplifier" check box in your sound setting. I have a Fedora Core 4 install on my Dell laptop and had the same problem. I found the answer using Google.
Regards,
Bharat
12 years ago
Hello Sunil,
Just delete the symbolic link in /usr/java which is pointing back to the alternate stuff and set $JAVA_HOME when you install a fresh copy to point to its location. That symbolic link is messing you up. To determine its location, issue a "which java" command, this will point to the link and then follow the link to /etc/alternate. This symbolic link is a whole lot more trouble that worth it. Just get rid of it.
Regards,
Bharat
12 years ago
Hello Tom and Scott,
I already own your book and have given you excellent reviews on Amazon. However, I must let you and others know that I am a bit disappointed with you two. I, along with other readers, had pointed out to you that there are a few Ant tasks missing in your book for earlier chapters. You had promised to take care of it, upload a corrected version and inform me. Todate, I have not heard from either of you. Have you done it and put a corrected version for download on your site?
Thanks.
Bharat
12 years ago
Hello Shannon,
I don't believe that there is a requirement to use the Observer pattern if you are using the MVC pattern. To the best of my knowledge, it should not matter.
Regards,
Bharat
Hello Ben and Balaji,
Thank you both. The problem is resolved. I appreciate your help.
Regards,
Bharat
12 years ago
Hello Gerardo,
Thanks for your quick response:

You wrote:

re you using ?

// Load Mapping
Mapping mapping = new Mapping();
mapping.loadMapping("mapping.xml");

The answer is yes:

Here is a snippet of my code that is attempting to read the mapping file:

package sc.webservices.services.castor;

import org.exolab.castor.xml.*;
import org.exolab.castor.mapping.*;

... Other imports

import java.io.FileReader;
import java.util.List;
import java.util.Iterator;


/**
* @author bruparel
* This class is used to transfer data read from the XML files to the
* ForceEntityArray used by the BlueForce/RedForce forces
*/
public class ForcesCastorMapper {


public ForcesCastorMapper(){ };

public static ForceEntity[] getForceEntityArray() {

ForceEntity[] forceEntityArray = null;
try {
// -- Load a mapping file
System.out.println("Before reading the mapping.xml file");
// Scott, this is what I was trying to resolve. I will work on it some more
// basically, we need to be able to get the servlet context here.
// System.out.println("WEB-INF real path:" +getServletContext().getRealPath("/WEB-INF"));
// System.out.println("axis real path:" +getServletContext().getRealPath("/axis"));

Mapping mapping = new Mapping();
mapping.loadMapping("/home/bruparel/mapping.xml");
System.out.println("After reading the mapping.xml file. Starting Unmarshaller");
Unmarshaller un = new Unmarshaller(Entities.class);
un.setMapping( mapping );


Note in the above code that I had to hard code the path to my mapping.xml file? I tried putting this file in the same directory within the Tomcat/Axis directories where the ForcesCastorMapper class resides, but it did not work. I even tried putting "./" in front of mapping.xml to make it read from the current directory but it didn't work either. You will see from my code that I have commented out the getRealPath code that I was trying to get to work, but gave up in frustration. The ServletContext needs to be obtained from Axis MsgContext object. I don't know how.

Thanks for trying to help.

Regards,
Bharat
12 years ago
I have deployed an Axis 1.2.1 web service within Tomcat 5.0.28 container. The web service is supposed to read an XML file. I have used Castor to serialize the XML file into Java Classes. I developed this application under Eclipse as a standalone Java application. It works perfectly. When I try to move it to the Axis Web Service running within the Tomcat Container however, I ran into trouble. Specifically, the Web Service cannot find the XML file (mapping.xml and the datafile containing XML data to be read into Java classes). I did some research and tried to copy this file just about everywhere, i.e. in the WEB-INF directory, in the classes directory, etc. but no luck, the web service cannot find it. I understand that within the Servlet container you get the path using getRealPath function of the ServletConfig object. However, that does not work either. I have seen various postings to the effect that Axis MsgContext object can give the ServletContext object, but do not know how. I would really appreciate it if someone can post a code snippet showing how to read the path for a file to be read from within an Axis web service running within the Tomcat container. The imports will help too.
Thanks in advance.
Bharat
12 years ago
Thanks Ken. This is precisely what I needed. It works.
12 years ago