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 5979395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:39:11+00:00 2026-05-22T21:39:11+00:00

I generate my web service from WSDL file. But I need t o define

  • 0

I generate my web service from WSDL file. But I need t o define in this file that my methods in SkeletonInterface thow Axis Fault Exception.
Smth like:

void method() throws AxisFault{....}

In which way I can do this (in WSDL).

Thanks.

  • 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-05-22T21:39:12+00:00Added an answer on May 22, 2026 at 9:39 pm

    In short, it’s bad practice to reuse AxisFault for your own application faults. When I see AxisFault, it signals that something internal to the Axis autogen code failed. This could include your exception wrapped inside of it.

    First, I want to address your pseudcode.

    void method() throws AxisFault{....}
    

    This pseudocode indicates that you want a method with no input, no output, but still have an exception. If I assume this, then that design is not recommended (I’m not even sure if it is possible). If you want something to trigger something to happen with no output, an empty output message is preferable to an exception. Exceptions should only be used when something uncommon happens.

    If you meant the above code as an abstract example and you do have input/output, then the correct approach would be to make up your own fault. Using your own fault allows you to control behavior and more accurately describe what is failing. You may also need several faults in the future so using AxisFault is not beneficial in that case.

    <wsdl:definitions ...>
     ...
      <wsdl:message name="MyFault">
        <wsdl:part name="parameters" element="def:MyFault">
        </wsdl:part>
      </wsdl:message>
    
      <wsdl:portType name="MyPortType">
        <wsdl:operation name="doStuff">
          <wsdl:input message="tns:MyRequest">
        </wsdl:input>
          <wsdl:output message="tns:MyResponse">
        </wsdl:output>
          <wsdl:fault name="MyFault" message="tns:MyFault">
        </wsdl:fault>
        </wsdl:operation>
      </wsdl:portType>
    
      <wsdl:binding name="MyBinding" type="tns:MyPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="doStuff">
          <soap:operation soapAction="namespace/operationName"/>
          <wsdl:input name="MyRequest">
            <soap:body use="literal"/>
          </wsdl:input>
          <wsdl:output name="MyResponse">
            <soap:body use="literal"/>
          </wsdl:output>
          <wsdl:fault name="MyFault">
        <soap:body use="literal"/>
          </wsdl:fault>
        </wsdl:operation>
      </wsdl:binding>
    
      ...
    </wsdl:definitions>
    

    That said, AxisFault does happen for web service operation calls. For your client stub code, it should throw a RemoteException. If you take a look at your autogen Stub code, you should see that does in fact throw an AxisFault which extends RemoteException.

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

Sidebar

Related Questions

I have a .NET web-service client that has been autogenerated from a wsdl-file using
I have an WSDL / Web Service and I need to generate an set
I have a WSDL file for a web service. I'm using JAX-WS/wsimport to generate
I need to write a WSDL file to an existing web service which is
I have a large set of data that is generated from a web service
Im trying to consume a Java web-service, that uses a certificate. I could generate
Given a public SOAP web service and no WSDL, I need to build a
I have a web service that I want to access through SOAP. But I
I have a basic SOAP service that I generated from a provided WSDL. The
I need to talk to some web service and thus I imported the WSDL.

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.