Somak Dalui

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

Recent posts by Somak Dalui

My httpd.conf in IHS looks like this

Now as per Apache documentation I am expecting values in environment variables :
System.getenv("AUTHENTICATE_MAIL") and

but all I get is NULL. I am only getting the authenticated email id in request.getRemoteUser(). I also tried System.getProperties(), but nothing there also. Please let me know how I can get the other informations.

Thanks in advance.
5 years ago
When using Spring RMI (RmiServiceExporter) rather than normal RMI API, does it in any way affects the serialization process of the remoting objects ? I heard an argument that in case of Spring RMI, Objects get serialized after finally {} method. I dont have that much knowledge about Spring's internal working and hence the question.

7 years ago
I have generated the stub files through wsimport from the remote wsdl and have created a standalone client. Now when I am running the client, the HTTP request that is produced is this :

---[HTTP request -]---
Content-type: text/xml;charset="utf-8"
Soapaction: ""
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
<?xml version="1.0" ?>
<S:Envelope xmlns:S="">
<wsse:Security xmlns:wsse="">
<wsse:Password Type="">PASSWORD</wsse:Password>
<GetGridReference xmlns="">

Now, the SOAP Envelope part is perfectly alright as I have tested it with SOAP tools and have got correct output. But the above HTTP request is always giving me

---[HTTP response -
annerSynchronousService.asmx - 500]---
null: HTTP/1.1 500 Internal Server Error
Cache-control: private
X-ua-compatible: IE=EmulateIE7
Content-type: text/html; charset=utf-8
Content-length: 7424
Connection: close
X-powered-by: ASP.NET

followed by lots of html tags, describing some error.

My Java client code looks like this -

Can you please tell me what am I missing here ? Please let me know if you want to see more code.


9 years ago
Just set this VM property to view the detailed response
9 years ago
Hi, I have generated the client Java files by accessing the remote WSDL file through 'wsimport' tool.
Now when I am trying to invoke the service I am getting this UnsupportedMediaException : Unsupported content-type:text/html; charset=utf-8 Supported ones are: [text/xml].

I have seen the others posts related to the same topic but are of little use to me. I dont have any kind of local WSDL file, my @WebServiceClient annotation attributes are all fine and I am just running a standalone Java class as client.

Here's my Ant wsimport task

And this is my Java client code -

Please help me on this. I can understand instead of xml what I am getting back is text/html, but have little clue how to advance further.
Let me know of you need to see more code of anything.
9 years ago
The scenario is I have to consume a webservice and I know only the URL of the wsdl file.

Q1. Is it a good option to generate the stub classes locally through 'wsimport' (JAX-WS API) ?
If so, how often should I execute this ? Is there a way to know that the remote wsdl has been modified ?

Q2. I just need the Java client - so, do I really need a server running in my local machine ?

Thanks in advance.

9 years ago
WOW !! Thanks Jesper.
11 years ago

How is this possible ?.
And even when I try to run a program which needs JAVA_HOME (eg. Tomcat) it says "JAVA_HOME" variable is not specified.

I know its actually not a Java problem, but I dont know where to start looking for solution. Please help.
11 years ago
Thank you Joe. Setting it in the CLASSPATH worked.
11 years ago
My EAR structure is like this :

Inside lib I have all the external libraries required. When I am deploying, I am getting this -

Log4j is already there in the server lib folder, which means we dont have to supply it within the .ear - isn't that right ? After this, I even pushed the log4j.jar into my lib - but still I get this error.
Obviously I am making a simple mistake here, can you please point me out ?

I have created one domain and I am deploying the application under that.

11 years ago
Thanks for the reply Freddy.

The code below works and I get the path exactly as written -

but this is so much more work than -

Guess I have no other choice, huh ? :-)
11 years ago
I am trying to read a .properties file through java.util.Properties class. And I have to read a directory path (Windows) as one of the items in the properties file.
So, if have log_dir=D:\log\today, in java I am getting this as - D:logtoday.

I know putting D:\\log\\today is a workaround because of the escape character '\', but this property will be user defined, and I don't know what they will write.

Is there (another) way around this ?

11 years ago
How can I specify OR condition between 2 criteria.setFetchMode() statements.
I am using this code in JUnit to setup Hibernate with HSQLDB. This is without any hibernate.cfg.xml /

But I once I run some insert/load I am getting unnecessary errors like
DataIntegrityViolationException: Hibernate operation: could not insert:
which otherwise works fine in a Spring+Hibernate environment.

Even simple load operations is not working. Can anyone please tell me what is wrong with this approach ?