Closed Tomas-Kraus closed 16 years ago
@glassfishrobot Commented Reported by sjones4
@glassfishrobot Commented @vbkumarjayanti said: Thanks for filing the issue.
I have made a Fix, Please pickup the latest from :
https://saaj.dev.java.net/servlets/ProjectDocumentList?folderID=5118&expandFolder=5118&folderID=0
If you are satisfied, please close the issue.
Thanks.
@glassfishrobot Commented sjones4 said: Thanks for the fast response.
Unfortunately this fix brings to light another issue.
When a "Standard" fault code is used and the namespace is not SOAP 1.1 the following exception is thrown:
Namespace Error, Standard Faultcode: Client, should be in SOAP 1.1 Namespace
I agree that it is bad practice to use standard local names for faultcodes outside of the SOAP 1.1 namespace, but perhaps this could just be logged at FINE or INFO rather than SEVERE logging plus exception.
I've reopened this issue, but if you would prefer this raised as a separate issue please close and comment to that effect.
Thanks for your help.
@glassfishrobot Commented @vbkumarjayanti said: Fixed.
@glassfishrobot Commented sjones4 said: Closing issue.
I originally found this problem with JAX-WS and a work around (in case someone is not able to update the the latest SAAJ with this fix) is to implement a SOAPHandler.
The SOAPHandler can modify the message structure to create a strictly correct Fault (faultcode prefix, namespaces, etc). This fault fixing would need to occur in both the "handleFault" and "handleMessage" methods (as "handleMessage" is called if the response HTTP status code is not 500).
@glassfishrobot Commented Was assigned to saaj-issues
@glassfishrobot Commented This issue was imported from java.net JIRA SAAJ-28
@glassfishrobot Commented Marked as fixed on Thursday, November 22nd 2007, 1:23:00 am
When a fault contains a faultcode element without a prefix an exception is thrown:
"No NamespaceURI, SOAP requires faultcode content to be a QName"
As far as I can tell it is perfectly valid for a qualified name to have only a local part:
"[7] QName ::= PrefixedName | UnprefixedName" http://www.w3.org/TR/REC-xml-names/#ns-qualnames
the soap specification does say that elements must be namespace qualified:
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507 (last para)
but does not say this applies to the faultcode qualified name also.
This would seem to allow unprefixed QNames in the default namespace URI:
However, even if the specifications do not support this, it seems better to be tolerant of non-compliant fault formats than to throw this error (which will make the actual fault information harder to locate)
Environment
Operating System: All Platform: All
Affected Versions
[current]