-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Implement request #61105: Support Soap 1.2 SoapFault Reason Text lang attribute #18701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… attribute This is on the border line of a bugfix and a new feature. Anyway, this is necessary to fix compatibility with .NET clients.
ZVAL_EMPTY_STRING(Z_FAULT_STRING_P(obj)); | ||
ZVAL_NULL(Z_FAULT_CODE_P(obj)); | ||
ZVAL_NULL(Z_FAULT_CODENS_P(obj)); | ||
ZVAL_NULL(Z_FAULT_ACTOR_P(obj)); | ||
ZVAL_NULL(Z_FAULT_DETAIL_P(obj)); | ||
ZVAL_NULL(Z_FAULT_NAME_P(obj)); | ||
ZVAL_NULL(Z_FAULT_HEADERFAULT_P(obj)); | ||
ZVAL_NULL(Z_FAULT_LANG_P(obj)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this maybe be:
ZVAL_NULL(Z_FAULT_LANG_P(obj)); | |
ZVAL_EMPTY_STRING(Z_FAULT_LANG_P(obj)); |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm uncertain. The other things are nullable too. The language attribute is actually only applicable if the client requested SOAP 1.2, it's unimportant in SOAP 1.1. I suppose this should be changed to an empty string for simplicity but I'd have to think a bit.
add_soap_fault_ex(&exception_object, this_ptr, "Server", ZSTR_VAL(msg), NULL, NULL, SOAP_GLOBAL(lang_en)); | ||
zend_string_release_ex(msg, 0); | ||
} else { | ||
add_soap_fault_ex(&exception_object, this_ptr, "Server", "Internal Error", NULL, NULL); | ||
add_soap_fault_ex(&exception_object, this_ptr, "Server", "Internal Error", NULL, NULL, SOAP_GLOBAL(lang_en)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe having two new add_soap_fault_en{_ex}()
APIs is better than passing that global into every call?
Similar to what you did with soap_server_fault_en()
The logic seems reasonable from really quick look and with my limited knowledge of SOAP. :) |
This is on the border line of a bugfix and a new feature. Anyway, this is necessary to fix compatibility with .NET clients.