Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8314713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:54:58+00:00 2026-06-08T20:54:58+00:00

I have a code which is java wrapper around a web service, on exception

  • 0

I have a code which is java wrapper around a web service, on exception it throws an AxisFault exception ( as given below)

org.apache.axis2.AxisFault: Policy enforcement failed to authenticate the request.
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at com.tibco.n2.de.services.EntityResolverServiceStub.lookupUser(EntityResolverServiceStub.java:261)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)

and the code looks like as given below,

try {
                lookupUserResponse = myIntializedObject.lookupUser("someuser", null, null, true);
            } catch (InvalidServiceRequestFault e) {
                // TODO Auto-generated catch block
                //e.printStackTrace();
            } catch (InternalServiceFault e) {
                // TODO Auto-generated catch block
                //e.printStackTrace();
            } catch (SecurityFault e) {
                // TODO Auto-generated catch block
                //e.printStackTrace();
            }
            finally{
                if(lookupUserResponse==null)
                    return false;
            }

I also tried replacing all catch block with only single block of Exception e , but still it’s not capturing the exception

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:54:59+00:00Added an answer on June 8, 2026 at 8:54 pm

    I am able to catch AxisFault errors with the following :

    try {
        ...
    } catch (RemoteException ex) {
        if(ex instanceof AxisFault){
            logger.error("Axis Fault error: " + ((AxisFault)ex).getFaultString());
        }
    }
    

    AxisFault is a subclass of java.rmi.RemoteException. You can know this by looking at the API docs. The class hierarchy is shown in the upper, left-hand corner of the page.

    As for why this was not caught when you used java.lang.Exception in a catch statement, perhaps you could post the relevant code?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wrote the code below which was taken from Java How to program
I have this method in my java code which returns byte array for given
In my source tree have Java code which is automatically generated from XSD files.
I have a java code which gets the function names, their return types, their
I have some Java code which performs bitwise operations on a BitSet. I have
I have some Java code which looks roughly like this: String urlString = ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1.glo_30m.dp.200601.grb2;
I have this Java code which is used for JSF pagination: public List<ActiveSessionObj> list(int
I have some code which I think should compile, but doesn't: import java.io.InputStream; import
I have a Java handler code which Im using in android to run a
Let's assume I have a framework written in Java and some C++ code which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.