You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.
When I try to create a SOAPFault using the constructor on SOAPFactory:
soapFactory.createFault(reasonText, null);
it throws exception as:
java.lang.IllegalArgumentException: faultCode argument for createFault was
passed NULL
com.sun.xml.messaging.saaj.soap.ver1_2.SOAPFactory1_2Impl.createFault(SOAPFactory1_2Impl.java:56)
This is not as per the javadoc. the implementation could easily interpret the
null fault code with the whatever default SOAP spec defines. Here is what the
javadoc of the API say:
/**
*Creates a new SOAPFault object initialized with the given reasonText
and faultCode
*@param reasonText the ReasonText/FaultString for the fault
*@param faultCode the FaultCode for the fault
*@return a SOAPFault object
*@throws SOAPException if there is a SOAP error
*@SInCE SAAJ 1.3
*/
public abstract SOAPFault createFault(String reasonText, QName faultCode)
throws SOAPException;
Its a clear violation of the SAAJ API. I would think createFault(null, null)
should not be throwing exception as the API is silent about it and user can
always set some value using setter methods.
There is workaround to use the SOAPFactory.createFault(). since it is API
compliance issue, it needs to be fixed.
Environment
Operating System: All
Platform: All
Affected Versions
[current]
The text was updated successfully, but these errors were encountered:
@vbkumarjayanti said:
Here is what the Javadoc of SAAJ 1.3 says :
abstract SOAPFault createFault()
Creates a new default SOAPFault object
abstract SOAPFault createFault(java.lang.String reasonText,
javax.xml.namespace.QName faultCode)
Creates a new SOAPFault object initialized with the given reasonText
and faultCode
The 2nd createFault needs to use the given reasonText and faultCode. So i do
not think this a Spec NonCompliance.
The 2nd method should only be used when someone has a valid reasonText and
faultCode. In all other cases one can use the first method to create a default
Fault object.
I admit that more clarity is required in the Javadoc w.r.t the behavior when
arguments are null. I can plan on updating the Javadocs for the next release of
GlassFish.
When I try to create a SOAPFault using the constructor on SOAPFactory:
soapFactory.createFault(reasonText, null);
it throws exception as:
java.lang.IllegalArgumentException: faultCode argument for createFault was
passed NULL
com.sun.xml.messaging.saaj.soap.ver1_2.SOAPFactory1_2Impl.createFault(SOAPFactory1_2Impl.java:56)
This is not as per the javadoc. the implementation could easily interpret the
null fault code with the whatever default SOAP spec defines. Here is what the
javadoc of the API say:
/**
*Creates a new
SOAPFault
object initialized with the givenreasonText
faultCode
*@param reasonText the ReasonText/FaultString for the fault
*@param faultCode the FaultCode for the fault
*@return a
SOAPFault
object*@throws SOAPException if there is a SOAP error
*@SInCE SAAJ 1.3
*/
public abstract SOAPFault createFault(String reasonText, QName faultCode)
throws SOAPException;
Its a clear violation of the SAAJ API. I would think createFault(null, null)
should not be throwing exception as the API is silent about it and user can
always set some value using setter methods.
There is workaround to use the SOAPFactory.createFault(). since it is API
compliance issue, it needs to be fixed.
Environment
Operating System: All
Platform: All
Affected Versions
[current]
The text was updated successfully, but these errors were encountered: