Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Vijay Chandran

Ranch Hand
+ Follow
since Jan 07, 2007
Vijay likes ...
Java
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 Vijay Chandran

Dear Friends,

In Page 56 of Martin Kalin's Java Web Services Up & Running, the following point is given:

Here are some downsides of the document style:

• In the unwrapped variant, the SOAP message does not carry the name of the service operation, which can complicate the dispatching of messages to the appropriate program code.

The request XML generated for both wrapped and unwrapped variants are same. I'm not able to understand that why unwrapped style does not carry the name of the service operation. The port types are generated differently for wrapped & unwrapped styles. But the request XML carries the same operation name in the WSDL for both the styles. Request you all to clarify why the unwrapped style SOAP message doesn't carry the service operation name.

Thanks & Regards,

Regards,
Vijay
Please try to understand what exactly web services is by reading some tutorials like below:

http://docs.oracle.com/javaee/6/tutorial/doc/gijti.html

You will automatically come to know how to get the headers from the request XML.

Thanks,
Vijay


5 years ago
(1) How did you generate the services.xml? You used any tool or hand-written?
(2) Are you using Contract First/Code First approach when developing the WS?
(3) Can you find a way to enable axis2 DEBUG/TRACE logging so that we can figure out what exactly is happening when loading the services.xml file?
(4) Did you try placing the services.xml in META-INF directory inside your aar file?

Thanks,
Vijay
5 years ago
This is a syntax error:

The url attribute of c:redirect should be a valid simple java.lang.String. c:redirect is like sendRedirect() of HttpServletResponse API

For Example:


The c:url tag is used to add encoding rules to the URL with c:param. This is equivalent to response.encodeURL()

Thanks,
Vijay
5 years ago
JSP
Hi Jeff,

If you use CXF framework there is a concept called "Interceptor" which will intercept the outgoing request from the client code and add the security headers for you. You need to write a password callback class and configure it in the WSS4J interceptor of CXF. That's it.. the framework will take care of adding the security headers for you.
Similar options should be available in Axis2 as well


Please refer:
CXF WS-Security

Simple jaxws-client authentication:
JAXWS-Client-Auth


Regards,
Vijay
5 years ago
Please clarify below:

(1) Are you using any web services frameworks like Axis or CXF?
(2) Is the client application you are coding is stand-alone or web application?
5 years ago
It depends on the class loader implementation on how the classes will be loaded. It is recommended to have a shared library instead of having multiple JAR files inside your EAR/WAR files. There may be possible duplicate JAR files in your class path which may behave inconsistently at run time/deploy time. So you can move all the common JAR files to a shared library and deploy it in the application server. You must keep only the most specific JAR files you need inside the lib folders of EAR/WAR files.

You must create a configuration XML which is standard for your app server (Example: weblogic.xml for Weblogic App server) and you can refer this shared library name in that configuration XML. This will reduce the EAR /WAR file size to a great extent.

Thanks,
Vijay
5 years ago
Dear Friends,

I'm trying to insert a record into a database using spring JDBC template. In our table there is a column 'VERSION' with data type as NUMBER. We're using Oracle 10g Database.

This is the Value object declaration:



I'm setting the 'VERSION' column value like this:



The 'VERSION' column is a NULLABLE column. There must be null value in a specific business scenario. The problem is instead of 'null' the column is getting updated as '0'. I checked the SQL that is getting executed and the query doesn't contain the 'VERSION' column itself in the insert query.

But if I change the 'version' type as 'String' in value object and do preparedStatement.setString(5, valueObj.getVersion()); , the 'VERSION' column is having the null value correctly.

My problem is even if I use Integer object the 'VERSION' column should have null value in the database.

Can you please resolve me this issue?

Thanks,
Vijay
6 years ago
Hi Lukas,

Thanks for your reply. As you pointed out i was using different schema which is unnecessary for all the tables. Creating single schema for all the tables resolved the issue.

Thanks,
Vijay
Dear Friends,

I have configured HSQL DB (v 2.2.9) and using it for Junit testing purpose. I have configured the following in the application context:




Whenever I'm executing a SQL select I'm getting the below exception:


I'm able to execute the same query in SQL developer without any errors and I confirmed it multiple times. I've created the HSQL schema for all the tables like this:


I've also executed the scripts for inserting the constants data. But I'm stuck up with this issue for a long time. Can you please help me out on this issue?
Really appreciate your help.

Thanks,
Vijay
Dear Friends,

I am trying to write a file download app. The file to be downloaded is a plain text file. I'm using the following JavaScript function, which will hit the server and get the file content.

A new window is opened but when i'm getting an error response like this:

Internet explorer cannot download somefile from localhost.



I'm setting the following headers in the HTTP response at the server side:


My browser version is IE 8. This is working in latest version of chrome.

Please help in resolving the issue. Also, how to get Open/Save/Cancel dialog box when window.open is triggered and the response is obtained from the server?

Thanks,
Vijay
Dear Friends,

I'm trying to write a file download method in Struts (v1.1) action. I need to download a plain text file but with different extension (For example: test.reg) Following is the code snippet:

As soon as i click the download button, the above method is called and 'Open/Save/Cancel' pop-up is displayed. When i click 'Open', the IE browser displays all the contents properly in the new window. But if i click save i'm getting an error like this : "Internet Explorer cannot download testAction.do from localhost."
I'm able to download the file in Chrome browser but not able to download it in Internet Explorer v8. I cant find any exception stack traces in any logs.

Kindly provide your help in resolving the issue.

Thanks,
Vijay
8 years ago
Hi Eric,

Thanks for your reply. It was just a cache issue. After deleting the Temporary Internet Files it started working fine in IE 8 also. Wonder how this browser is used by many people in this world..!


Thanks,
Vijay

Dear Friends,

I am invoking a JavaScript method on a button onclick, in the JSP it looks like this:



Following is the JS method: From this method i'm calling a Struts action.



The struts action is called successfully from firefox, but from IE 8 the action is not getting invoked. But i'm getting the error message 'File download failed' which i have declared as a struts action error in case of any exception. I have added logs inside the action method and also debugged the action using eclipse. The action is never getting called from the JavaScript in IE 8 but somehow the action error is thrown. There is no stacktrace also.

Please provide your help.

Thanks,
Vijay