Somak Dalui

Ranch Hand
+ Follow
since Apr 19, 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
1
Given in last 30 days
0
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_CN"),
System.getenv("AUTHENTICATE_MAIL") and
System.getenv("AUTHENTICATE_DEPT")

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.

Thanks.
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 - http://www.transportdirect.info/EnhancedExposedServices/CarJourneyPlannerSynchronous/v1/CarJourneyPlannerSynchronousService.asmx]---
Content-type: text/xml;charset="utf-8"
Soapaction: "http://www.transportdirect.info/TransportDirect.EnhancedExposedServices.CarJourneyPlannerSynchronous.V1/GetGridReference"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>USERNAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</S:Header>
<S:Body>
<GetGridReference xmlns="http://www.transportdirect.info/TransportDirect.EnhancedExposedServices.CarJourneyPlannerSynchronous.V1">
<transactionId>bfe2ccbe-9197-4992-9073-cd3a3c0e5c47</transactionId>
<locationType>Postcode</locationType>
<locationValue>W11</locationValue>
</GetGridReference>
</S:Body>
</S:Envelope>
--------------------

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 - http://www.transportdirect.info/EnhancedExposedServices/CarJourneyPlannerSynchronous/v1/CarJourneyPl
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.

Thanks.


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.

Somak
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 :
|--lib
|--app.jar
|--app.war

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.

Thanks.
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 ?

Thanks.
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 / hibernate.properties.


But I once I run some insert/load I am getting unnecessary errors like
DataIntegrityViolationException: Hibernate operation: could not insert:
org.hibernate.TransientObjectException
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 ?

Thanks,
Somak