Solved

Webservice Exception handling

Posted on 2009-07-08
1
728 Views
Last Modified: 2013-11-24
Hi , I have a EJB web Service , in which i need to implement exception handling. can any one pls let me know how to do that .
here is the sample code for a method in Bean class
public class ExampleBean implements javax.ejb.SessionBean {
      public Info moveFile(String fileName, String sourcePath, String destinationPath ) throws Exception {
            Info info = new Info();
            String sourceFilePath = sourcePath + File.separatorChar + fileName;
            String retStr = FileUtils.moveFile(sourceFilePath, destinationPath);
            String retCode = "000";
            if (!retStr.equalsIgnoreCase("success"))
                  retCode = "100";
            info .setStatusCode(retCode);
            info .setStatusDescription(retStr);
            return info ;
      }
I have some more methods like above and i need a proper exception handling .. if some one can post some sample code it will be great.

thanks in adv


0
Comment
Question by:pkarka
1 Comment
 
LVL 4

Accepted Solution

by:
Ronb23 earned 500 total points
ID: 24816270
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem to setup 18 92
bigHeights  challenge 13 59
what technologies offer Authentication over Web Services? 4 103
print map entry 34 54
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now