Bahadur Shah

Greenhorn
+ Follow
since Feb 20, 2007
Merit badge: grant badges
For More
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 Bahadur Shah

It seems rampart configuration is not loaded properly.

Is there any alternative wayof loading rampart policy for Axis2 JAX-WS client?
13 years ago
I'm developing my Axis2 JAX-WS Client to consume the web service.
I'm using Axis2 1.5.4 and Rampart 1.5.1

When I ran the client with Axis2 1.4.1 and Rampart 1.4, it worked.
But when I try to use Axis2 1.5.x versions, I'm getting the null pointer exception
at org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)
at org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)


When I compare the debug log of both, I could see that, rampart is receiving the response.
I could see the statement
"*********************** RampartReceiver received"
But after that I could not see the statement
"*********************** WSDoAllReceiver recieved".
I could see the WSDoAllReceiver statement in the log which is working(Axis2 1.4.1+Rampart 1.4).


I'm attaching the debug log.


I'm engaging the rampart module in my client.axis2.xml.



My policy.xml contains just the below content
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
</ramp:RampartConfig>

I'm loading the Policy.xml in the client like this:


My crypto.properties is like below :
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.password=ABC5JHGFWWEDSWCT
org.apache.ws.security.crypto.merlin.file=srvc_claims_sit.jks


My WSDL has the below security configuration



Can some one please help me in resolving this issue please.
13 years ago
Yeah... I know that I've to use the Custom SMTPAppender but I do not know how to use that.

Can you please help me regarding that?

-Thanks
I need to send email only when a specific exception occurs.
How to achieve that using log4j?

By default, if I set a log level, SMTPAppender is sending mail for all the messages above that level.
But I dont want that. I want the mail to be sent only for specific exceptions.

Help me about that please
I created this test servlet just to test the application and do a POC
I tried using false to not to use transacted session. But am still getting the same error

My code is like below. I am clueless what is missing.
I am using SAP NetWeaver Application Server

In my below code, Even after I rollback my JTA UserTransaction, the JMS operations are not rolling back.

Can you please give some more details on how to achieve what you said?

I need to do this in my Servlet. I'm not using any EJB Components/Spring
I need to perform a distributed transaction in My Servlet.
My distributed transaction involves Updating to the DB and also publishing a message to a queue.
The queue is not present in my app server, where my Servlet is running.
It is there on a remote machine.

I'm using below code to achieve the same.
But I'm not getting the transactional behaviour working... That means
If I publish a message to queue and then if DB Operation fails, the transaction should roll back and the queue should not be having any contents.
But my queue is still showing me the contents...

Any glitches in my code???

In a single transaction, I need to perform
1. A DB Operation and
2. Send a Message to JMS Queue
I need to do this from a Servlet.

I'm trying to prepare a solution for this, and any inputs on this will be grateful

1. Since this is a distributed transaction, all the Participants in the transactions must support XA
So, I need to create XADatasource to perform DB Operations
and I need to use XAQueueConnectionFactory, XAQueueConnection, XAQueueSession for JMS Operations

Are they mandatory or any alternatives available?

2. Since Im running on Servlet where there is no CMT support, I need to use UserTransaction
UserTransaction utx = new UserTransaction();
utx.begin();
//Perform DB Operations
// Send JMS Messages
utx.commit();

Can somebody validate my understanding please... Is it a feasible solution?
Is there any alternative or better solution available?
// Perform DB Operation

My server is NetWeaverApplicationServer.
In My Servlet, I am using JTA transaction which is not a CMT.
I am running this on Oracle XADatasource.

When I'm trying to perform the DB operation, I'm getting the
Exception saying "COMMIT is not allowed in a subordinate session "

Any inputs on this please

My Servlet code is :



My Persistence.xml is
Is there any way i can be notified when the session timesout?

In Jsp, we can extend HttpSessionListener and override the destroy method.

In JSF also, we need to follow the similar procedure or any better ways of doing so?
14 years ago
JSF
I've a list of Student objects

List<Student> studentList;

class Student {
private String field1;
private String field2;
private String field3;
private String field4;
}

I want to sort this studentList dynamically by a given field name.

If I give (studentList, field1), the collection should be sorted based on field1.
If I give (studentList, field2), the collection should be sorted based on field2.


Is there any simple and best way to achieve the same?
14 years ago
I've a JSF page where I'm displaying a chart as an image.

I've a print button on my page.
When I click on print button, It should print the image in the page.

Can anybody please suggest me how to achieve this?
15 years ago
JSF
How to display bar charts in JSF pages?

I saw JFreeChart, but it is not having JSF tag library.

Though there is a opensource library http://jsf-comp.sourceforge.net/components/chartcreator/, I think it is quite old.

Are there any better alternatives available?
Wondering what is the common chart libraries used in developing large scale commercial applications
15 years ago
JSF
Is there any component which provides LOV(List Of Values) search dialog functionality?

Basically this is to implement a search functionality,
1. The page will have a text box and a button
2. On click of that button, it should open a search dialog as popup
3. In the popup search dialog, user can do some search and select a row of the search results
4. Once a row is selected in the search dialog, its corresponding value should be displayed in the text field of parent window and the pop up window should be closed.

I feel its a very generic requirement but I couldn't find a custom component to implement the same.

can anybody please point out any resouces to handle this requirement...
15 years ago
JSF