Questions tagged [soapfault]

The SOAP Fault element is defined as part of the W3C SOAP specification. The SOAP Fault element is used to carry error information within a SOAP message.

The SOAP Fault element defines the following four subelements:

faultcode
The faultcode element is intended for use by software to provide an algorithmic mechanism for identifying the fault. The faultcode MUST be present in a SOAP Fault element and the faultcode value MUST be a qualified name.

faultstring
The faultstring element is intended to provide a human readable explanation of the fault and is not intended for algorithmic processing. The faultstring element is similar to the 'Reason-Phrase' defined by HTTP. It MUST be present in a SOAP Fault element and SHOULD provide at least some information explaining the nature of the fault.

faultactor
The faultactor element is intended to provide information about who caused the fault to happen within the message path. It is similar to the SOAP actor attribute but instead it indicates the source of the fault. The value of the faultactor attribute is a URI identifying the source.

detail
The detail element is intended for carrying application specific error information related to the Body element. It MUST be present if the contents of the Body element could not be successfully processed.

Refer to the W3C Simple Object Access Protocol (SOAP) specification (Section 4.4) for additional information: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507

139 questions
63
votes
4 answers

SOAP faults or results object?

I was having a discussion about this with a co-worker and we couldn't come to an agreement, so I wanted to get your thoughts. I have my own opinions on this, but I won't spoil it for you. When should I be returning a SOAP fault and when should I be…
Nelson Rothermel
  • 9,436
  • 8
  • 62
  • 81
35
votes
2 answers

How to throw a custom fault on a JAX-WS web service?

How do you throw a custom soap fault on a JAX-WS web service? How can I specify the faultCode, faultString and detail of the soap fault? Is it possible to set the value of the detail as bean instead of a String? Please note that I'm developing using…
Arci
  • 6,647
  • 20
  • 70
  • 98
10
votes
1 answer

How to get SOAP fault's faultcode when handling custom fault exception

Our system consumes SOAP Web Service, using JAX-WS client stubs generated based on service's WSDL. In case of error server returns SOAP faults like this:
Nikoloz
  • 453
  • 1
  • 3
  • 11
8
votes
1 answer

WCF FaultException Without Sending StackTrace

I have some WCF services with predefined FaultContract attributes. When the FaultException exceptions are thrown, they're sending StackTrace, Source and other potentially unsave information. Is it possible to return only: Detail (from the…
reifnir
  • 143
  • 1
  • 5
8
votes
2 answers

SoapFault - faultcode: 'ns1:unexpected-error' android SOAP call

I am trying to call SOAP web service using one WSDL file. I have added all required parameters in it. But I am getting error as below: SoapFault - faultcode: 'ns1:unexpected-error' faultstring: 'Fault occurred while processing.' faultactor: 'null'…
Asfak Saiyed
  • 303
  • 1
  • 14
8
votes
1 answer

Why WCF SoapFault responses are encrypted in some situations?

I am creating a WCF webservice whose requests/responses are supposed to be signed only. For this, on ServiceContract attribute I have set ProtectionLevel = ProtectionLevel.Sign That works ok. Due to requirements some SoapFaults are supposed to be…
csg
  • 2,047
  • 2
  • 22
  • 35
8
votes
2 answers

How to set a faultCode in a SOAPFault?

Why can I set a faulString, but can't I set a custom fault code in a SOAPFault? When I throw the exception, the text "Code X" does not appear in the SoapFaultException. Someone could tell me why? Thanks. SOAPFault soapFault =…
David
  • 269
  • 1
  • 3
  • 10
6
votes
5 answers

WCF Web Service, Java Web Client, MustUnderstand headers not understood?

I'm hosting a WCF Web Service with the following WSDL (a simple service using wsHttpBinding and SSL for transport security):
Jay Sullivan
  • 17,332
  • 11
  • 62
  • 86
6
votes
1 answer

How do I return a (custom) SOAPFault from an Axis web service?

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 Archetypal Paul
  • 41,321
  • 20
  • 104
  • 134
6
votes
2 answers

NoClassDefFoundError for com.sun.xml.internal.ws.fault.SOAPFaultBuilder

Our web service client in live environment recently got the exception: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder at…
xli
  • 2,420
  • 2
  • 20
  • 27
6
votes
0 answers

What could be the reason for the Soap Fault (faultcode: soapenv:Client, faultstring:Bad Request)

I am writing a client to consume a SOAP web service in Android using ksoap2. And I have received a SOAP FAULT exception. Here is an excerpt from the LogCat.
Solace
  • 8,612
  • 22
  • 95
  • 183
6
votes
2 answers

Apache Axis WSDL2Java error - Missing element

We are integrating a third party SOAP web services in our application. The WSDL is used with SOAPUI tool, where sample requests and responses worked fine. When we try to integrate with apache Axis 1.3, where we tried WSDL2JAVA with the WSDL. We…
Pearl
  • 61
  • 1
  • 1
  • 4
6
votes
2 answers

Catching webservice exception with CXF: NoClassDefFoundError: SOAPFaultBuilder

I've been using Apache CXF wsdl2java generated code to call methods from a webservice for some time now, which so far has been working fine.. The problem I'm having is that when the webservice (implemented just down the hall from me) legitimately…
Tim
  • 19,793
  • 8
  • 70
  • 95
6
votes
2 answers

WCF UserName authentication and fault contracts

I have a WCF service configured to use custom UserName validation via the overriden Validate() method of the System.IdentityModel.Selectors.UserNamePasswordValidator class. All methods of the contract have been decorated with the…
6
votes
1 answer

How to Return Errors from an ASMX Web Service?

My web service method returns a collection object, this will serialize nicely, thanks to the way C# web services work! But if my code throws an uncaught exception, I want to instead return a custom error object. Is this possible using C# ASP.NET…
JL.
  • 78,954
  • 126
  • 311
  • 459
1
2 3
9 10