Kesava Krishna

Ranch Hand
+ Follow
since Sep 03, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Kesava Krishna

For each path if I need to have a separate operation, since the service functionality is same it might be duplicating the same code into two operations. What do you say?
1 year ago
I am building restful services using rest easy. I have few services which have to address different views of same Model/Resource.

Ex:- Model is Project Short View :- I have to return only few members of the resource Detailed View - I have to return all members of the resource

Want to know if there is jax-rs specification or Rest EASY API to support this. If not please throw some pointers on how to acheive it.

Let me know if i have to provide more background
1 year ago
Generally portlet throws "Temporary not available" in case if there is any exception thrown. In your case it seems you are not doing any null check for the list. Though the action is not performned, null check should avoid your portlet run into exceptions. Try doing it
3 years ago
Try writing a listener, which will get called on eviction of any element from the cache memory.
3 years ago
The url-pattern element of a servlet-mapping associates a servlet with a set of URLs. When a request arrives, the container uses a simple procedure for matching the URL in the request with a url-pattern

The url-pattern specification:

A string beginning with a ‘/’ character and ending with a ‘/*’ suffix is used for path mapping.
A string beginning with a ‘*.’ prefix is used as an extension mapping.
A string containing only the ’/’ character indicates the "default" servlet of the application. In this case the servlet path is the request URI minus the context path and the path info is null.
All other strings are used for exact matches only.

All the wild cards mentioned in the url-pattern will be virtual, there is no need that they have to exist in the physical file system.

In your case if your servlet is placed in the location com.company.servlet with the name TestServlet then it's upto you how you want frame url's so that this servlet resource will be accessed.
<url-pattern> /Beer/* </url-pattern>
There is no need that directory with name Beer should exist, it's a virtual mapping to your servlet to protect from external world for direct access and map it through any virtual url's using <url-pattern>
3 years ago
In ecllipse try to check in the console. Windows --> Show View --> Console. Try open this view and then run the tomcat and see if the catalina.out log is rolling the console.
3 years ago
I agree with Tim, /however to solve your problem can you paste <filter-name>, <servlet-name> mapping. It seems it is missing in the deployment descriptor which you pasted.
3 years ago
Hi Edward, Your approach is correct, but I will add a little more. Upon getting the necessary information from database create a VO(value object) with only getters and setters. Try to populate the VO with the information from requests and user objects. I am assuming here request and user has one to one mapping. Request here should not be confused with http request object, if my assumption is correct. Now these list of VO objects should be passed to jsp which is a good design.
ORM frame works should be used only if there is any complex data model involved. But in your case I don't think there is a complex data model involved.
I would rather suggest to go with your approach with my suggestions.
Try this and let me know your findings.
3 years ago
Assuming it is purely purely jax-ws based web service it is suggested.

Thanks,
Kesava
4 years ago
Please go through this link till the end http://cxf.apache.org/docs/ws-security.html which will clearly explains how to attach certificate to soap request message. This is applicable for jax-ws soap request, and not for jax-rs plain xml request.


Thanks,
Kesava
4 years ago
Please try using cxf framework, which will take care of all the complex code. You need to use a configuration file in cxf where you can set the keystore file path and pwd and small code snippet, which will take care of adding certificate to request message

Thanks,
Kesava
4 years ago
Please use SOAPHeader saopHeader = <SOAPEnvelope object>.addHeader() and let me know the results. Also make sure while setting the SOAPAction the service should be available in that url

Thanks,
Kesava.
4 years ago
Please paste the error you got. Also please convert your database queries output to value objects which are nothing but xml beans. Your web service operations should output these xml beans and axis automatically takes care of converting the xml bean to xml(soap message). And your deal done here.

Thanks,
Kesava
4 years ago
Nothing we can see here related to webservice. Looks like it is more specifically to deployment of application in jboss.
If you believe issue with web service, I suggest to write a test client and make sure it is working perfectly alright.

Thanks,
Kesava.
4 years ago
Please try using Jersey's ContainerRequestFilters interface. Write a class implementing this interface. Override the method public ContainerRequest filter(ContainerRequest request).
ContainerRequest will provide you with all the references to get the Authorization header of the client request, which contains the request credentials. Use your custom auth module from here.
Add the above filter to your servlet definition in web.xml.

This will definitely help you to achieve your functionality.

Let me know if needed sample code snippet for this.

Thanks,
Kesava.
4 years ago