summaryrefslogtreecommitdiff
path: root/ext/soap/php_xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_xml.c')
-rw-r--r--ext/soap/php_xml.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c
index ce560b6f35..5e55e467b6 100644
--- a/ext/soap/php_xml.c
+++ b/ext/soap/php_xml.c
@@ -162,7 +162,24 @@ xmlNodePtr check_and_resolve_href(xmlNodePtr data)
if (!ret) {
php_error(E_ERROR,"Unresolved reference '%s'",href->children->content);
}
- data = ret;
+ return ret;
+ } else {
+ /* TODO: External href....? */
+ php_error(E_ERROR,"External reference '%s'",href->children->content);
+ }
+ }
+ /* SOAP 1.2 enc:id enc:ref */
+ href = get_attribute_ex(data->properties, "ref", SOAP_1_2_ENC_NAMESPACE);
+ if (href) {
+ /* Internal href try and find node */
+ if (href->children->content[0] == '#') {
+ xmlNodePtr ret = get_node_with_attribute_recursive_ex(data->doc->children, NULL, NULL, "id", &href->children->content[1], SOAP_1_2_ENC_NAMESPACE);
+ if (!ret) {
+ php_error(E_ERROR,"Unresolved reference '%s'",href->children->content);
+ } else if (ret == data) {
+ php_error(E_ERROR,"Violation of id and ref information items '%s'",href->children->content);
+ }
+ return ret;
} else {
/* TODO: External href....? */
php_error(E_ERROR,"External reference '%s'",href->children->content);