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

  • Home
  • SEARCH
  • 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 6029515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:53:53+00:00 2026-05-23T04:53:53+00:00

I have some WSDL from which I need to generate a web service implementation.

  • 0

I have some WSDL from which I need to generate a web service implementation. I’m using Eclipse, and Axis1.4, and running on Weblogic9.2.

Generating the server stubs goes fine, and I’ve implemented the code I need to. However, for compatibility with the exising implementation we are emulating, I need to return SOAP faults for some specified error conditions.

That is, I need the SOAP body of the response to look like this example:

<soapenv:Body>
    <soapenv:Fault>
        <faultcode xmlns:ns1="foobar">ns1:1234</faultcode>
        <faultstring>The supplied parameter name ABCD is not recognised.</faultstring>
        <detail>
            <FaultDetail>An error processing the web service [MyService]: Unknown parameter:ABCD</FaultDetail>
            <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">planet</ns2:hostname>
        </detail>
    </soapenv:Fault>
</soapenv:Body>

From (much) googling, I think I should be able to do this by throwing a SOAPFaultException. But the message stub throws only java.rmi.RemoteException, so I’ve tried passing the SOAPFaultException to the RemoteException. That gives me something like this:

   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server.userException</faultcode>
         <faultstring>java.rmi.RemoteException: My remote exception; nested exception is: 
    javax.xml.rpc.soap.SOAPFaultException: soap fault string</faultstring>
         <detail>
            <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">myhostname</ns1:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body>

… in other words, it hasn’t resulted in a SOAP fault.

I’ve tried a lot of other stuff, and I’m pretty much stuck. So can someone tell me (ideally with an example) how to return a SOAP fault response with content I can specify, in my environment?

I’m not wedded to using Axis (but I’ve more experience with that than anything else). If you suggest an alternative, please note I need in the web service method to invoke another (authenticated) web service, and I’ve only been able to get that to work in Axis1.4…

  • 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-23T04:53:54+00:00Added an answer on May 23, 2026 at 4:53 am

    Your second code post is a SOAP fault (note the soapenv:Fault inside the soapenv:Body).

    Basically all of the frameworks’s default behavior is to return the standard SOAP fault and provide you the ability to enter your own information in the fault code, fault string, and fault detail fields.

    See the docs on the Axis 1 exception: http://ws.apache.org/axis/java/apiDocs/org/apache/axis/AxisFault.html

    It has constructors for setting the qname of various fields, so you should be able to reference your own items there.

    Many people will use the fault detail field and serialize their own XML type inside it using DOM.

    Last but not least Axis1’s prime time was circa 2000-2004, you will find it difficult to get answers and support around it. Most people have moved from Axis1 to Apache CXF, Axis2, or just straight up
    JAX-WS (now included in JDK6+). There is also the Spring Web Services project, which provides full customization of all of the behaviors in the stack (marshalling, which bean gets executed, etc).

    Just all of these frameworks use WSS4J for their web service security, and can support the standard username token, x509 token, etc. Nevertheless, once you get the basic messages being passed back and forth, you’ll likely have to work through the details of WS-Security.

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

Sidebar

Related Questions

I have a WSDL which I need to trigger some commands from. I need
I have this in some WSDL: <element name="startDate" type="xsd:dateTime"/> <element name="endDate" type="xsd:dateTime"/> Which results
I have some ASP.NET web services which all share a common helper class they
We have a large system of physical devices which all run a web service
I generated a Soap Service from a WSDL and now I need to deploy
Given a public SOAP web service and no WSDL, I need to build a
i have a input tag which is non editable, but some times i need
I have some C# / asp.net code I inherited which has a textbox which
I'm building a traditional ASP.NET Web Service -- the style built using asmx. It's
I need to generate a WCF proxy for a service exposed by our client.

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.