summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/soap/php_encoding.c236
-rw-r--r--ext/soap/php_http.c5
-rw-r--r--ext/soap/php_packet_soap.c27
-rw-r--r--ext/soap/php_schema.c4
-rw-r--r--ext/soap/php_sdl.c46
-rw-r--r--ext/soap/php_soap.h2
-rw-r--r--ext/soap/soap.c502
-rwxr-xr-xext/soap/tests/any.phpt29
-rw-r--r--ext/soap/tests/bugs/bug28969.phpt9
-rw-r--r--ext/soap/tests/bugs/bug28985.phpt195
-rw-r--r--ext/soap/tests/bugs/bug29109.phpt9
-rw-r--r--ext/soap/tests/bugs/bug29236.phpt11
-rw-r--r--ext/soap/tests/bugs/bug29844.phpt2
-rw-r--r--ext/soap/tests/bugs/bug30106.phpt34
-rw-r--r--ext/soap/tests/bugs/bug30175.phpt9
-rw-r--r--ext/soap/tests/bugs/bug30928.phpt18
-rw-r--r--ext/soap/tests/bugs/bug32776.phpt8
-rwxr-xr-xext/soap/tests/bugs/bug35142.phpt46
-rwxr-xr-xext/soap/tests/bugs/bug36226.phpt49
-rwxr-xr-xext/soap/tests/bugs/bug38005.phpt3
-rwxr-xr-xext/soap/tests/bugs/bug38067.phpt3
-rw-r--r--ext/soap/tests/classmap002.phpt8
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt2
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt2
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt14
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt21
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt28
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt28
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt28
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phptbin1026 -> 1104 bytes
-rw-r--r--ext/soap/tests/schema/schema004.phpt7
-rw-r--r--ext/soap/tests/schema/schema009.phpt5
-rw-r--r--ext/soap/tests/schema/schema010.phpt5
-rw-r--r--ext/soap/tests/schema/schema011.phpt5
-rw-r--r--ext/soap/tests/schema/schema012.phpt5
-rw-r--r--ext/soap/tests/schema/schema013.phpt5
-rw-r--r--ext/soap/tests/schema/schema014.phpt5
-rw-r--r--ext/soap/tests/schema/schema015.phpt5
-rw-r--r--ext/soap/tests/schema/schema016.phpt5
-rw-r--r--ext/soap/tests/schema/schema017.phpt5
-rw-r--r--ext/soap/tests/schema/schema018.phpt5
-rw-r--r--ext/soap/tests/schema/schema019.phpt5
-rw-r--r--ext/soap/tests/schema/schema020.phpt5
-rw-r--r--ext/soap/tests/schema/schema021.phpt5
-rw-r--r--ext/soap/tests/schema/schema022.phpt5
-rw-r--r--ext/soap/tests/schema/schema030.phpt10
-rw-r--r--ext/soap/tests/schema/schema031.phpt10
-rw-r--r--ext/soap/tests/schema/schema032.phpt9
-rw-r--r--ext/soap/tests/schema/schema033.phpt13
-rw-r--r--ext/soap/tests/schema/schema034.phpt13
-rw-r--r--ext/soap/tests/schema/schema035.phpt13
-rw-r--r--ext/soap/tests/schema/schema036.phpt13
-rw-r--r--ext/soap/tests/schema/schema037.phpt10
-rw-r--r--ext/soap/tests/schema/schema038.phpt10
-rw-r--r--ext/soap/tests/schema/schema039.phpt10
-rw-r--r--ext/soap/tests/schema/schema040.phpt10
-rw-r--r--ext/soap/tests/schema/schema041.phpt10
-rw-r--r--ext/soap/tests/schema/schema042.phpt10
-rw-r--r--ext/soap/tests/schema/schema043.phpt12
-rw-r--r--ext/soap/tests/schema/schema044.phpt10
-rw-r--r--ext/soap/tests/schema/schema045.phpt10
-rw-r--r--ext/soap/tests/schema/schema046.phpt12
-rw-r--r--ext/soap/tests/schema/schema047.phpt10
-rw-r--r--ext/soap/tests/schema/schema048.phpt10
-rw-r--r--ext/soap/tests/schema/schema049.phpt8
-rw-r--r--ext/soap/tests/schema/schema050.phpt10
-rw-r--r--ext/soap/tests/schema/schema051.phpt15
-rw-r--r--ext/soap/tests/schema/schema052.phpt10
-rw-r--r--ext/soap/tests/schema/schema053.phpt8
-rw-r--r--ext/soap/tests/schema/schema054.phpt10
-rw-r--r--ext/soap/tests/schema/schema055.phpt10
-rw-r--r--ext/soap/tests/schema/schema062.phpt10
-rw-r--r--ext/soap/tests/schema/schema064.phpt22
-rw-r--r--ext/soap/tests/schema/schema065.phpt10
-rw-r--r--ext/soap/tests/schema/schema066.phpt10
-rw-r--r--ext/soap/tests/schema/schema067.phpt10
-rw-r--r--ext/soap/tests/schema/schema069.phpt10
-rw-r--r--ext/soap/tests/schema/schema070.phpt10
-rw-r--r--ext/soap/tests/schema/schema074.phpt10
-rw-r--r--ext/soap/tests/schema/schema075.phpt12
-rw-r--r--ext/soap/tests/schema/schema076.phpt12
-rw-r--r--ext/soap/tests/schema/schema077.phpt12
-rw-r--r--ext/soap/tests/schema/schema078.phpt12
-rw-r--r--ext/soap/tests/schema/schema079.phpt12
-rw-r--r--ext/soap/tests/schema/schema080.phpt12
-rw-r--r--ext/soap/tests/schema/test_schema.inc2
-rw-r--r--ext/soap/tests/server007.phpt8
-rw-r--r--ext/soap/tests/server008.phpt8
89 files changed, 1640 insertions, 275 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 0760a2aec0..79a983a629 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -128,6 +128,7 @@ encode defaultEncoding[] = {
{{IS_NULL, "nil", XSI_NAMESPACE, NULL}, to_zval_null, to_xml_null},
{{IS_STRING, XSD_STRING_STRING, XSD_NAMESPACE, NULL}, to_zval_string, to_xml_string},
+ {{IS_UNICODE, XSD_STRING_STRING, XSD_NAMESPACE, NULL}, to_zval_string, to_xml_string},
{{IS_LONG, XSD_INT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{IS_DOUBLE, XSD_FLOAT_STRING, XSD_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{IS_BOOL, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL}, to_zval_bool, to_xml_bool},
@@ -333,30 +334,43 @@ xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr par
zend_class_entry *ce = Z_OBJCE_P(data);
HashPosition pos;
zval **tmp;
- char *type_name = NULL;
+ zstr type_name = NULL_ZSTR;
uint type_len;
ulong idx;
for (zend_hash_internal_pointer_reset_ex(SOAP_GLOBAL(class_map), &pos);
zend_hash_get_current_data_ex(SOAP_GLOBAL(class_map), (void **) &tmp, &pos) == SUCCESS;
zend_hash_move_forward_ex(SOAP_GLOBAL(class_map), &pos)) {
- if (Z_TYPE_PP(tmp) == IS_STRING &&
- ce->name_length == Z_STRLEN_PP(tmp) &&
- /* FIXME: Unicode support??? */
- zend_binary_strncasecmp(ce->name.s, ce->name_length, Z_STRVAL_PP(tmp), ce->name_length, ce->name_length) == 0 &&
- zend_hash_get_current_key_ex(SOAP_GLOBAL(class_map), &type_name, &type_len, &idx, 0, &pos) == HASH_KEY_IS_STRING) {
-
- /* TODO: namespace isn't stored */
- encodePtr enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)->target_ns, type_name);
- if (enc) {
- encode = enc;
- } else if (SOAP_GLOBAL(sdl)) {
- enc = find_encoder_by_type_name(SOAP_GLOBAL(sdl), type_name);
- if (enc) {
- encode = enc;
+ if ((!UG(unicode) &&
+ Z_TYPE_PP(tmp) == IS_STRING &&
+ ce->name_length == Z_STRLEN_PP(tmp) &&
+ zend_binary_strncasecmp(ce->name.s, ce->name_length, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), ce->name_length) == 0) ||
+ (UG(unicode) &&
+ Z_TYPE_PP(tmp) == IS_UNICODE &&
+ ce->name_length == Z_USTRLEN_PP(tmp) &&
+ zend_u_binary_strncasecmp(ce->name.u, ce->name_length, Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), ce->name_length) == 0)) {
+
+ zend_uchar utype = zend_hash_get_current_key_ex(SOAP_GLOBAL(class_map), &type_name, &type_len, &idx, 0, &pos);
+
+ if (utype == HASH_KEY_IS_STRING || utype == HASH_KEY_IS_UNICODE) {
+ if (utype == HASH_KEY_IS_UNICODE) {
+ type_name.s = soap_unicode_to_string(type_name.u, type_len TSRMLS_CC);
}
- }
- break;
+ /* TODO: namespace isn't stored */
+ encodePtr enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)->target_ns, type_name.s);
+ if (enc) {
+ encode = enc;
+ } else if (SOAP_GLOBAL(sdl)) {
+ enc = find_encoder_by_type_name(SOAP_GLOBAL(sdl), type_name.s);
+ if (enc) {
+ encode = enc;
+ }
+ }
+ if (utype == HASH_KEY_IS_UNICODE) {
+ efree(type_name.v);
+ }
+ break;
+ }
}
}
}
@@ -559,7 +573,11 @@ static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data)
if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
TSRMLS_FETCH();
- if (SOAP_GLOBAL(encoding) != NULL) {
+ if (UG(unicode)) {
+ /* TODO: unicode support */
+ ZVAL_STRING(ret, (char*)data->children->content, 1);
+ zval_string_to_unicode_ex(ret, UG(utf8_conv) TSRMLS_CC);
+ } else if (SOAP_GLOBAL(encoding) != NULL) {
xmlBufferPtr in = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
xmlBufferPtr out = xmlBufferCreate();
int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
@@ -595,7 +613,11 @@ static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data)
TSRMLS_FETCH();
whiteSpace_replace(data->children->content);
- if (SOAP_GLOBAL(encoding) != NULL) {
+ if (UG(unicode)) {
+ /* TODO: unicode support */
+ ZVAL_STRING(ret, (char*)data->children->content, 1);
+ zval_string_to_unicode_ex(ret, UG(utf8_conv) TSRMLS_CC);
+ } else if (SOAP_GLOBAL(encoding) != NULL) {
xmlBufferPtr in = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
xmlBufferPtr out = xmlBufferCreate();
int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
@@ -631,7 +653,11 @@ static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data)
TSRMLS_FETCH();
whiteSpace_collapse(data->children->content);
- if (SOAP_GLOBAL(encoding) != NULL) {
+ if (UG(unicode)) {
+ /* TODO: unicode support */
+ ZVAL_STRING(ret, (char*)data->children->content, 1);
+ zval_string_to_unicode_ex(ret, UG(utf8_conv) TSRMLS_CC);
+ } else if (SOAP_GLOBAL(encoding) != NULL) {
xmlBufferPtr in = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
xmlBufferPtr out = xmlBufferCreate();
int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
@@ -737,37 +763,41 @@ static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNo
xmlAddChild(parent, ret);
FIND_ZVAL_NULL(data, ret, style);
- if (Z_TYPE_P(data) == IS_STRING) {
- str = estrndup(Z_STRVAL_P(data), Z_STRLEN_P(data));
- new_len = Z_STRLEN_P(data);
+ if (Z_TYPE_P(data) == IS_UNICODE) {
+ str = soap_unicode_to_string(Z_USTRVAL_P(data), Z_USTRLEN_P(data) TSRMLS_CC);
+ new_len = strlen(str);
} else {
- zval tmp = *data;
+ if (Z_TYPE_P(data) == IS_STRING) {
+ str = estrndup(Z_STRVAL_P(data), Z_STRLEN_P(data));
+ new_len = Z_STRLEN_P(data);
+ } else {
+ zval tmp = *data;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
- new_len = Z_STRLEN(tmp);
- zval_dtor(&tmp);
- }
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ str = estrndup(Z_STRVAL(tmp), Z_STRLEN(tmp));
+ new_len = Z_STRLEN(tmp);
+ zval_dtor(&tmp);
+ }
- if (SOAP_GLOBAL(encoding) != NULL) {
- xmlBufferPtr in = xmlBufferCreateStatic(str, new_len);
- xmlBufferPtr out = xmlBufferCreate();
- int n = xmlCharEncInFunc(SOAP_GLOBAL(encoding), out, in);
+ if (SOAP_GLOBAL(encoding) != NULL) {
+ xmlBufferPtr in = xmlBufferCreateStatic(str, new_len);
+ xmlBufferPtr out = xmlBufferCreate();
+ int n = xmlCharEncInFunc(SOAP_GLOBAL(encoding), out, in);
- if (n >= 0) {
- efree(str);
- str = estrdup((char*)xmlBufferContent(out));
- new_len = n;
+ if (n >= 0) {
+ efree(str);
+ str = estrdup((char*)xmlBufferContent(out));
+ new_len = n;
+ } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) {
+ soap_error1(E_ERROR, "Encoding: string '%s' is not a valid utf-8 string", str);
+ }
+ xmlBufferFree(out);
+ xmlBufferFree(in);
} else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) {
soap_error1(E_ERROR, "Encoding: string '%s' is not a valid utf-8 string", str);
}
- xmlBufferFree(out);
- xmlBufferFree(in);
- } else if (!php_libxml_xmlCheckUTF8(BAD_CAST(str))) {
- soap_error1(E_ERROR, "Encoding: string '%s' is not a valid utf-8 string", str);
}
-
text = xmlNewTextLen(BAD_CAST(str), new_len);
xmlAddChild(ret, text);
efree(str);
@@ -1043,7 +1073,7 @@ static zval* get_zval_property(zval* object, char* name TSRMLS_DC)
ZVAL_STRING(&member, name, 0);
old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(object);
+ EG(scope) = Z_OBJCE_P(object);
data = Z_OBJ_HT_P(object)->read_property(object, &member, BP_VAR_IS TSRMLS_CC);
if (data == EG(uninitialized_zval_ptr)) {
/* Hack for bug #32455 */
@@ -1077,7 +1107,7 @@ static void unset_zval_property(zval* object, char* name TSRMLS_DC)
ZVAL_STRING(&member, name, 0);
old_scope = EG(scope);
- EG(scope) = Z_OBJCE_P(object);
+ EG(scope) = Z_OBJCE_P(object);
Z_OBJ_HT_P(object)->unset_property(object, &member TSRMLS_CC);
EG(scope) = old_scope;
} else if (Z_TYPE_P(object) == IS_ARRAY) {
@@ -1093,33 +1123,33 @@ static void model_to_zval_any(zval *ret, xmlNodePtr node TSRMLS_DC)
if (get_zval_property(ret, (char*)node->name TSRMLS_CC) == NULL) {
zval* val = master_to_zval(get_conversion(XSD_ANYXML), node);
if (get_attribute_ex(node->properties,"type", XSI_NAMESPACE) == NULL &&
- Z_TYPE_P(val) == IS_STRING) {
+ (Z_TYPE_P(val) == IS_STRING || Z_TYPE_P(val) == IS_UNICODE)) {
while (node->next != NULL &&
get_zval_property(ret, (char*)node->next->name TSRMLS_CC) == NULL &&
get_attribute_ex(node->next->properties,"type", XSI_NAMESPACE) == NULL) {
zval* val2 = master_to_zval(get_conversion(XSD_ANYXML), node->next);
- if (Z_TYPE_P(val2) != IS_STRING) {
+ if (Z_TYPE_P(val2) != IS_STRING && Z_TYPE_P(val2) != IS_UNICODE) {
break;
}
add_string_to_string(val, val, val2);
zval_ptr_dtor(&val2);
- node = node->next;
+ node = node->next;
}
}
if (any == NULL) {
any = val;
} else {
if (Z_TYPE_P(any) != IS_ARRAY) {
- /* Convert into array */
- zval *arr;
+ /* Convert into array */
+ zval *arr;
- MAKE_STD_ZVAL(arr);
- array_init(arr);
- add_next_index_zval(arr, any);
- any = arr;
- }
- /* Add array element */
- add_next_index_zval(any, val);
+ MAKE_STD_ZVAL(arr);
+ array_init(arr);
+ add_next_index_zval(arr, any);
+ any = arr;
+ }
+ /* Add array element */
+ add_next_index_zval(any, val);
}
}
node = node->next;
@@ -1247,8 +1277,9 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e
zend_class_entry *tmp;
if (zend_hash_find(SOAP_GLOBAL(class_map), type->type_str, strlen(type->type_str)+1, (void**)&classname) == SUCCESS &&
- Z_TYPE_PP(classname) == IS_STRING &&
- (tmp = zend_fetch_class(Z_STRVAL_PP(classname), Z_STRLEN_PP(classname), ZEND_FETCH_CLASS_AUTO TSRMLS_CC)) != NULL) {
+ (Z_TYPE_PP(classname) == IS_STRING ||
+ Z_TYPE_PP(classname) == IS_UNICODE) &&
+ (tmp = zend_u_fetch_class(Z_TYPE_PP(classname), Z_UNIVAL_PP(classname), Z_UNILEN_PP(classname), ZEND_FETCH_CLASS_AUTO TSRMLS_CC)) != NULL) {
ce = tmp;
}
}
@@ -1380,22 +1411,22 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e
prop = get_zval_property(ret, (char*)trav->name TSRMLS_CC);
if (!prop) {
- set_zval_property(ret, (char*)trav->name, tmpVal TSRMLS_CC);
+ set_zval_property(ret, (char*)trav->name, tmpVal TSRMLS_CC);
} else {
- /* Property already exist - make array */
- if (Z_TYPE_P(prop) != IS_ARRAY) {
- /* Convert into array */
- zval *arr;
-
- MAKE_STD_ZVAL(arr);
- array_init(arr);
- prop->refcount++;
- add_next_index_zval(arr, prop);
- set_zval_property(ret, (char*)trav->name, arr TSRMLS_CC);
- prop = arr;
- }
- /* Add array element */
- add_next_index_zval(prop, tmpVal);
+ /* Property already exist - make array */
+ if (Z_TYPE_P(prop) != IS_ARRAY) {
+ /* Convert into array */
+ zval *arr;
+
+ MAKE_STD_ZVAL(arr);
+ array_init(arr);
+ prop->refcount++;
+ add_next_index_zval(arr, prop);
+ set_zval_property(ret, (char*)trav->name, arr TSRMLS_CC);
+ prop = arr;
+ }
+ /* Add array element */
+ add_next_index_zval(prop, tmpVal);
}
}
trav = trav->next;
@@ -1755,28 +1786,35 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
for (;i > 0;i--) {
xmlNodePtr property;
zval **zprop;
- char *str_key;
+ zstr key;
+ uint key_len;
ulong index;
- int key_type;
+ zend_uchar key_type;
- key_type = zend_hash_get_current_key(prop, &str_key, &index, FALSE);
+ key_type = zend_hash_get_current_key_ex(prop, &key, &key_len, &index, FALSE, NULL);
zend_hash_get_current_data(prop, (void **)&zprop);
property = master_to_xml(get_conversion((*zprop)->type), (*zprop), style, xmlParam);
- if (key_type == HASH_KEY_IS_STRING) {
- char *prop_name;
+ if (key_type != HASH_KEY_IS_LONG) {
+ char *prop_name;
+ if (key_type == IS_UNICODE) {
+ key.s = soap_unicode_to_string(key.u, key_len TSRMLS_CC);
+ }
if (Z_TYPE_P(data) == IS_OBJECT) {
char *class_name;
- zend_unmangle_property_name(str_key, &class_name, &prop_name);
+ zend_unmangle_property_name(key.s, &class_name, &prop_name);
} else {
- prop_name = str_key;
+ prop_name = key.s;
}
if (prop_name) {
xmlNodeSetName(property, BAD_CAST(prop_name));
}
+ if (key_type == IS_UNICODE) {
+ efree(key.v);
+ }
}
zend_hash_move_forward(prop);
}
@@ -2400,10 +2438,12 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
i = zend_hash_num_elements(Z_ARRVAL_P(data));
zend_hash_internal_pointer_reset(data->value.ht);
for (;i > 0;i--) {
+ zend_uchar key_type;
xmlNodePtr xparam, item;
xmlNodePtr key;
zval **temp_data;
- char *key_val;
+ zstr key_val;
+ uint key_len;
ulong int_val;
zend_hash_get_current_data(data->value.ht, (void **)&temp_data);
@@ -2412,11 +2452,22 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
xmlAddChild(xmlParam, item);
key = xmlNewNode(NULL, BAD_CAST("key"));
xmlAddChild(item,key);
- if (zend_hash_get_current_key(data->value.ht, &key_val, &int_val, FALSE) == HASH_KEY_IS_STRING) {
+ key_type = zend_hash_get_current_key_ex(data->value.ht, &key_val, &key_len, &int_val, FALSE, NULL);
+ if (key_type == HASH_KEY_IS_STRING) {
if (style == SOAP_ENCODED) {
set_xsi_type(key, "xsd:string");
}
- xmlNodeSetContent(key, BAD_CAST(key_val));
+ xmlNodeSetContent(key, BAD_CAST(key_val.s));
+ } else if (key_type == HASH_KEY_IS_UNICODE) {
+ char *str;
+ TSRMLS_FETCH();
+
+ if (style == SOAP_ENCODED) {
+ set_xsi_type(key, "xsd:string");
+ }
+ str = soap_unicode_to_string(key_val.u, key_len TSRMLS_CC);
+ xmlNodeSetContent(key, BAD_CAST(str));
+ efree(str);
} else {
smart_str tmp = {0};
smart_str_append_long(&tmp, int_val);
@@ -2471,8 +2522,8 @@ static zval *to_zval_map(encodeTypePtr type, xmlNodePtr data)
key = master_to_zval(NULL, xmlKey);
value = master_to_zval(NULL, xmlValue);
- if (Z_TYPE_P(key) == IS_STRING) {
- zend_hash_update(Z_ARRVAL_P(ret), Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &value, sizeof(zval *), NULL);
+ if (Z_TYPE_P(key) == IS_STRING || Z_TYPE_P(key) == IS_UNICODE) {
+ zend_u_hash_update(Z_ARRVAL_P(ret), Z_TYPE_P(key), Z_UNIVAL_P(key), Z_UNILEN_P(key) + 1, &value, sizeof(zval *), NULL);
} else if (Z_TYPE_P(key) == IS_LONG) {
zend_hash_index_update(Z_ARRVAL_P(ret), Z_LVAL_P(key), &value, sizeof(zval *), NULL);
} else {
@@ -2646,6 +2697,13 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
efree(buf);
} else if (Z_TYPE_P(data) == IS_STRING) {
xmlNodeSetContentLen(xmlParam, BAD_CAST(Z_STRVAL_P(data)), Z_STRLEN_P(data));
+ } else if (Z_TYPE_P(data) == IS_UNICODE) {
+ char *str;
+ TSRMLS_FETCH();
+
+ str = soap_unicode_to_string(Z_USTRVAL_P(data), Z_USTRLEN_P(data) TSRMLS_CC);
+ xmlNodeSetContent(xmlParam, BAD_CAST(str));
+ efree(str);
}
if (style == SOAP_ENCODED) {
@@ -2810,11 +2868,15 @@ static zval *to_zval_any(encodeTypePtr type, xmlNodePtr data)
{
xmlBufferPtr buf;
zval *ret;
+ TSRMLS_FETCH();
buf = xmlBufferCreate();
xmlNodeDump(buf, NULL, data, 0, 0);
MAKE_STD_ZVAL(ret);
ZVAL_STRING(ret, (char*)xmlBufferContent(buf), 1);
+ if (UG(unicode)) {
+ zval_string_to_unicode_ex(ret, UG(utf8_conv) TSRMLS_CC);
+ }
xmlBufferFree(buf);
return ret;
}
@@ -3122,7 +3184,7 @@ static int is_map(zval *array)
zend_hash_internal_pointer_reset(Z_ARRVAL_P(array));
for (i = 0;i < count;i++) {
- if (zend_hash_get_current_key_type(Z_ARRVAL_P(array)) == HASH_KEY_IS_STRING) {
+ if (zend_hash_get_current_key_type(Z_ARRVAL_P(array)) != HASH_KEY_IS_LONG) {
return TRUE;
}
zend_hash_move_forward(Z_ARRVAL_P(array));
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index e7cb9810d9..4fa014e6cd 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -630,7 +630,7 @@ try_again:
/* Send cookies along with request */
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS) {
zval **data;
- char *key;
+ zstr key;
int i, n;
n = zend_hash_num_elements(Z_ARRVAL_PP(cookies));
@@ -639,6 +639,7 @@ try_again:
smart_str_append_const(&soap_headers, "Cookie: ");
for (i = 0; i < n; i++) {
zend_hash_get_current_data(Z_ARRVAL_PP(cookies), (void **)&data);
+ /* TODO: unicode support */
zend_hash_get_current_key(Z_ARRVAL_PP(cookies), &key, NULL, FALSE);
if (Z_TYPE_PP(data) == IS_ARRAY) {
@@ -652,7 +653,7 @@ try_again:
(zend_hash_index_find(Z_ARRVAL_PP(data), 2, (void**)&tmp) == FAILURE ||
in_domain(phpurl->host,Z_STRVAL_PP(tmp))) &&
(use_ssl || zend_hash_index_find(Z_ARRVAL_PP(data), 3, (void**)&tmp) == FAILURE)) {
- smart_str_appendl(&soap_headers, key, strlen(key));
+ smart_str_appendl(&soap_headers, key.s, strlen(key.s));
smart_str_appendc(&soap_headers, '=');
smart_str_appendl(&soap_headers, Z_STRVAL_PP(value), Z_STRLEN_PP(value));
smart_str_appendc(&soap_headers, ';');
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index 9ed55d2b1d..5f14eb8c5d 100644
--- a/ext/soap/php_packet_soap.c
+++ b/ext/soap/php_packet_soap.c
@@ -192,15 +192,25 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
tmp = get_node(fault->children, "faultstring");
if (tmp != NULL && tmp->children != NULL) {
zval *zv = master_to_zval(get_conversion(IS_STRING), tmp);
- faultstring = Z_STRVAL_P(zv);
- FREE_ZVAL(zv);
+ if (Z_TYPE_P(zv) == IS_STRING) {
+ faultstring = Z_STRVAL_P(zv);
+ FREE_ZVAL(zv);
+ } else {
+ faultstring = soap_unicode_to_string(Z_USTRVAL_P(zv), Z_USTRLEN_P(zv) TSRMLS_CC);
+ zval_ptr_dtor(&zv);
+ }
}
tmp = get_node(fault->children, "faultactor");
if (tmp != NULL && tmp->children != NULL) {
zval *zv = master_to_zval(get_conversion(IS_STRING), tmp);
- faultactor = Z_STRVAL_P(zv);
- FREE_ZVAL(zv);
+ if (Z_TYPE_P(zv) == IS_STRING) {
+ faultactor = Z_STRVAL_P(zv);
+ FREE_ZVAL(zv);
+ } else {
+ faultactor = soap_unicode_to_string(Z_USTRVAL_P(zv), Z_USTRLEN_P(zv) TSRMLS_CC);
+ zval_ptr_dtor(&zv);
+ }
}
tmp = get_node(fault->children, "detail");
@@ -222,8 +232,13 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
tmp = get_node(tmp->children,"Text");
if (tmp != NULL && tmp->children != NULL) {
zval *zv = master_to_zval(get_conversion(IS_STRING), tmp);
- faultstring = Z_STRVAL_P(zv);
- FREE_ZVAL(zv);
+ if (Z_TYPE_P(zv) == IS_STRING) {
+ faultstring = Z_STRVAL_P(zv);
+ FREE_ZVAL(zv);
+ } else {
+ faultstring = soap_unicode_to_string(Z_USTRVAL_P(zv), Z_USTRLEN_P(zv) TSRMLS_CC);
+ zval_ptr_dtor(&zv);
+ }
}
}
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 9040eec57d..a5b6d5cca2 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -2070,7 +2070,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
zend_hash_internal_pointer_reset((*tmp)->attributes);
while (zend_hash_get_current_data((*tmp)->attributes,(void**)&tmp_attr) == SUCCESS) {
if (zend_hash_get_current_key_type((*tmp)->attributes) == HASH_KEY_IS_STRING) {
- char* key;
+ zstr key;
uint key_len;
sdlAttributePtr newAttr;
@@ -2091,7 +2091,7 @@ static void schema_attributegroup_fixup(sdlCtx *ctx, sdlAttributePtr attr, HashT
}
zend_hash_get_current_key_ex((*tmp)->attributes, &key, &key_len, NULL, 0, NULL);
- zend_hash_add(ht, key, key_len, &newAttr, sizeof(sdlAttributePtr), NULL);
+ zend_hash_add(ht, key.s, key_len, &newAttr, sizeof(sdlAttributePtr), NULL);
zend_hash_move_forward((*tmp)->attributes);
} else {
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 29ada5f054..c6d0c4b098 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -1063,7 +1063,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
return ctx.sdl;
}
-#define WSDL_CACHE_VERSION 0x0e
+#define WSDL_CACHE_VERSION 0x2e
#define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type);
#define WSDL_CACHE_GET_INT(ret,buf) ret = ((unsigned char)(*buf)[0])|((unsigned char)(*buf)[1]<<8)|((unsigned char)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4;
@@ -1686,13 +1686,13 @@ static void sdl_serialize_string(const char *str, smart_str *out)
static void sdl_serialize_key(HashTable *ht, smart_str *out)
{
- char *key;
+ zstr key;
uint key_len;
ulong index;
if (zend_hash_get_current_key_ex(ht, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
WSDL_CACHE_PUT_INT(key_len, out);
- WSDL_CACHE_PUT_N(key, key_len, out);
+ WSDL_CACHE_PUT_N(key.s, key_len, out);
} else {
WSDL_CACHE_PUT_INT(0, out);
}
@@ -2330,7 +2330,7 @@ static HashTable* make_persistent_sdl_function_headers(HashTable *headers, HashT
encodePtr *penc;
sdlTypePtr *ptype;
ulong index;
- char *key;
+ zstr key;
uint key_len;
pheaders = malloc(sizeof(HashTable));
@@ -2367,7 +2367,7 @@ static HashTable* make_persistent_sdl_function_headers(HashTable *headers, HashT
}
if (zend_hash_get_current_key_ex(headers, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(pheaders, key, key_len, (void*)&pheader, sizeof(sdlSoapBindingFunctionHeaderPtr), NULL);
+ zend_hash_add(pheaders, key.s, key_len, (void*)&pheader, sizeof(sdlSoapBindingFunctionHeaderPtr), NULL);
} else {
zend_hash_next_index_insert(pheaders, (void*)&pheader, sizeof(sdlSoapBindingFunctionHeaderPtr), NULL);
}
@@ -2398,7 +2398,7 @@ static HashTable* make_persistent_sdl_parameters(HashTable *params, HashTable *p
sdlTypePtr *ptype;
encodePtr *penc;
ulong index;
- char *key;
+ zstr key;
uint key_len;
pparams = malloc(sizeof(HashTable));
@@ -2428,7 +2428,7 @@ static HashTable* make_persistent_sdl_parameters(HashTable *params, HashTable *p
}
if (zend_hash_get_current_key_ex(params, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(pparams, key, key_len, (void*)&pparam, sizeof(sdlParamPtr), NULL);
+ zend_hash_add(pparams, key.s, key_len, (void*)&pparam, sizeof(sdlParamPtr), NULL);
} else {
zend_hash_next_index_insert(pparams, (void*)&pparam, sizeof(sdlParamPtr), NULL);
}
@@ -2445,7 +2445,7 @@ static HashTable* make_persistent_sdl_function_faults(sdlFunctionPtr func, HashT
HashTable *pfaults;
sdlFaultPtr *tmp, pfault;
ulong index;
- char *key;
+ zstr key;
uint key_len;
pfaults = malloc(sizeof(HashTable));
@@ -2477,7 +2477,7 @@ static HashTable* make_persistent_sdl_function_faults(sdlFunctionPtr func, HashT
}
if (zend_hash_get_current_key_ex(faults, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(pfaults, key, key_len, (void*)&pfault, sizeof(sdlParamPtr), NULL);
+ zend_hash_add(pfaults, key.s, key_len, (void*)&pfault, sizeof(sdlParamPtr), NULL);
} else {
zend_hash_next_index_insert(pfaults, (void*)&pfault, sizeof(sdlParamPtr), NULL);
}
@@ -2494,7 +2494,7 @@ static sdlAttributePtr make_persistent_sdl_attribute(sdlAttributePtr attr, HashT
{
sdlAttributePtr pattr;
ulong index;
- char *key;
+ zstr key;
uint key_len;
pattr = malloc(sizeof(sdlAttribute));
@@ -2541,7 +2541,7 @@ static sdlAttributePtr make_persistent_sdl_attribute(sdlAttributePtr attr, HashT
}
if (zend_hash_get_current_key_ex(attr->extraAttributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(pattr->extraAttributes, key, key_len, (void*)&pextra, sizeof(sdlExtraAttributePtr), NULL);
+ zend_hash_add(pattr->extraAttributes, key.s, key_len, (void*)&pextra, sizeof(sdlExtraAttributePtr), NULL);
}
zend_hash_move_forward(attr->extraAttributes);
@@ -2605,7 +2605,7 @@ static sdlContentModelPtr make_persistent_sdl_model(sdlContentModelPtr model, Ha
static sdlTypePtr make_persistent_sdl_type(sdlTypePtr type, HashTable *ptr_map, HashTable *bp_types, HashTable *bp_encoders)
{
ulong index;
- char *key;
+ zstr key;
uint key_len;
sdlTypePtr ptype = NULL;
@@ -2693,7 +2693,7 @@ static sdlTypePtr make_persistent_sdl_type(sdlTypePtr type, HashTable *ptr_map,
while (zend_hash_get_current_data(type->elements, (void **)&tmp) == SUCCESS) {
pelem = make_persistent_sdl_type(*tmp, ptr_map, bp_types, bp_encoders);
if (zend_hash_get_current_key_ex(type->elements, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(ptype->elements, key, key_len, (void*)&pelem, sizeof(sdlTypePtr), NULL);
+ zend_hash_add(ptype->elements, key.s, key_len, (void*)&pelem, sizeof(sdlTypePtr), NULL);
} else {
zend_hash_next_index_insert(ptype->elements, (void*)&pelem, sizeof(sdlTypePtr), NULL);
}
@@ -2712,7 +2712,7 @@ static sdlTypePtr make_persistent_sdl_type(sdlTypePtr type, HashTable *ptr_map,
while (zend_hash_get_current_data(type->attributes, (void **)&tmp) == SUCCESS) {
pattr = make_persistent_sdl_attribute(*tmp, ptr_map, bp_types, bp_encoders);
if (zend_hash_get_current_key_ex(type->attributes, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(ptype->attributes, key, key_len, (void*)&pattr, sizeof(sdlAttributePtr), NULL);
+ zend_hash_add(ptype->attributes, key.s, key_len, (void*)&pattr, sizeof(sdlAttributePtr), NULL);
} else {
zend_hash_next_index_insert(ptype->attributes, (void*)&pattr, sizeof(sdlAttributePtr), NULL);
}
@@ -2839,7 +2839,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
HashTable ptr_map;
HashTable bp_types, bp_encoders;
ulong index;
- char *key;
+ zstr key;
uint key_len;
zend_hash_init(&bp_types, 0, NULL, NULL, 0);
@@ -2867,7 +2867,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(sdl->groups, (void **)&tmp) == SUCCESS) {
ptype = make_persistent_sdl_type(*tmp, &ptr_map, &bp_types, &bp_encoders);
if (zend_hash_get_current_key_ex(sdl->groups, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->groups, key, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
+ zend_hash_add(psdl->groups, key.s, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
} else {
zend_hash_next_index_insert(psdl->groups, (void*)&ptype, sizeof(sdlTypePtr), NULL);
}
@@ -2887,7 +2887,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(sdl->types, (void **)&tmp) == SUCCESS) {
ptype = make_persistent_sdl_type(*tmp, &ptr_map, &bp_types, &bp_encoders);
if (zend_hash_get_current_key_ex(sdl->types, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->types, key, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
+ zend_hash_add(psdl->types, key.s, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
} else {
zend_hash_next_index_insert(psdl->types, (void*)&ptype, sizeof(sdlTypePtr), NULL);
}
@@ -2907,7 +2907,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(sdl->elements, (void **)&tmp) == SUCCESS) {
ptype = make_persistent_sdl_type(*tmp, &ptr_map, &bp_types, &bp_encoders);
if (zend_hash_get_current_key_ex(sdl->elements, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->elements, key, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
+ zend_hash_add(psdl->elements, key.s, key_len, (void*)&ptype, sizeof(sdlTypePtr), NULL);
} else {
zend_hash_next_index_insert(psdl->elements, (void*)&ptype, sizeof(sdlTypePtr), NULL);
}
@@ -2927,7 +2927,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(sdl->encoders, (void **)&tmp) == SUCCESS) {
penc = make_persistent_sdl_encoder(*tmp, &ptr_map, &bp_types, &bp_encoders);
if (zend_hash_get_current_key_ex(sdl->encoders, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->encoders, key, key_len, (void*)&penc, sizeof(encodePtr), NULL);
+ zend_hash_add(psdl->encoders, key.s, key_len, (void*)&penc, sizeof(encodePtr), NULL);
} else {
zend_hash_next_index_insert(psdl->encoders, (void*)&penc, sizeof(encodePtr), NULL);
}
@@ -2974,7 +2974,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(sdl->bindings, (void **)&tmp) == SUCCESS) {
pbind = make_persistent_sdl_binding(*tmp, &ptr_map);
if (zend_hash_get_current_key_ex(sdl->bindings, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->bindings, key, key_len, (void*)&pbind, sizeof(sdlBindingPtr), NULL);
+ zend_hash_add(psdl->bindings, key.s, key_len, (void*)&pbind, sizeof(sdlBindingPtr), NULL);
} else {
zend_hash_next_index_insert(psdl->bindings, (void*)&pbind, sizeof(sdlBindingPtr), NULL);
}
@@ -2992,7 +2992,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
while (zend_hash_get_current_data(&sdl->functions, (void **)&tmp) == SUCCESS) {
pfunc = make_persistent_sdl_function(*tmp, &ptr_map);
if (zend_hash_get_current_key_ex(&sdl->functions, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(&psdl->functions, key, key_len, (void*)&pfunc, sizeof(sdlFunctionPtr), NULL);
+ zend_hash_add(&psdl->functions, key.s, key_len, (void*)&pfunc, sizeof(sdlFunctionPtr), NULL);
} else {
zend_hash_next_index_insert(&psdl->functions, (void*)&pfunc, sizeof(sdlFunctionPtr), NULL);
}
@@ -3015,7 +3015,7 @@ static sdlPtr make_persistent_sdl(sdlPtr sdl TSRMLS_DC)
}
*tmp = *preq;
if (zend_hash_get_current_key_ex(sdl->requests, &key, &key_len, &index, 0, NULL) == HASH_KEY_IS_STRING) {
- zend_hash_add(psdl->requests, key, key_len, (void*)&preq, sizeof(sdlFunctionPtr), NULL);
+ zend_hash_add(psdl->requests, key.s, key_len, (void*)&preq, sizeof(sdlFunctionPtr), NULL);
}
zend_hash_move_forward(sdl->requests);
}
@@ -3237,7 +3237,7 @@ cache_in_memory:
zend_hash_move_forward_ex(SOAP_GLOBAL(mem_cache), &pos)) {
if (q->time < latest) {
latest = q->time;
- zend_hash_get_current_key_ex(SOAP_GLOBAL(mem_cache), &key, &key_len, &idx, 0, &pos);
+ zend_hash_get_current_key_ex(SOAP_GLOBAL(mem_cache), (zstr*)&key, &key_len, &idx, 0, &pos);
}
}
if (key) {
diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h
index d6988cd0f0..03037b9d13 100644
--- a/ext/soap/php_soap.h
+++ b/ext/soap/php_soap.h
@@ -222,4 +222,6 @@ zval* add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *faul
#define soap_error3(severity, format, param1, param2, param3) \
php_error(severity, "SOAP-ERROR: " format, param1, param2, param3)
+char* soap_unicode_to_string(UChar *ustr, int ustr_len TSRMLS_DC);
+
#endif
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 41f6bc8ef7..5a2fbc8e9b 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -395,6 +395,17 @@ ZEND_GET_MODULE(soap)
# define OnUpdateLong OnUpdateInt
#endif
+char* soap_unicode_to_string(UChar *ustr, int ustr_len TSRMLS_DC)
+{
+ UErrorCode errCode = 0;
+ char *tmp;
+ int tmp_len;
+
+ zend_convert_from_unicode(UG(utf8_conv), &tmp, &tmp_len, ustr, ustr_len, &errCode);
+ return tmp;
+}
+
+
ZEND_INI_MH(OnUpdateCacheEnabled)
{
long *p;
@@ -804,18 +815,27 @@ PHP_METHOD(SoapFault, SoapFault)
char *fault_string = NULL, *fault_code = NULL, *fault_actor = NULL, *name = NULL, *fault_code_ns = NULL;
int fault_string_len, fault_actor_len, name_len, fault_code_len = 0;
zval *code = NULL, *details = NULL, *headerfault = NULL;
+ zend_uchar name_type, fault_string_type, fault_actor_type, fault_code_type, fault_code_ns_type;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|s!z!s!z",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zt|t!z!t!z",
&code,
- &fault_string, &fault_string_len,
- &fault_actor, &fault_actor_len,
- &details, &name, &name_len, &headerfault) == FAILURE) {
+ &fault_string, &fault_string_len, &fault_string_type,
+ &fault_actor, &fault_actor_len, &fault_actor_type,
+ &details,
+ &name, &name_len, &name_type,
+ &headerfault) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
}
+
+ fault_code_type = Z_TYPE_P(code);
+ fault_code_ns_type = IS_NULL;
if (Z_TYPE_P(code) == IS_NULL) {
} else if (Z_TYPE_P(code) == IS_STRING) {
fault_code = Z_STRVAL_P(code);
fault_code_len = Z_STRLEN_P(code);
+ } else if (Z_TYPE_P(code) == IS_UNICODE) {
+ fault_code = soap_unicode_to_string(Z_USTRVAL_P(code), Z_USTRLEN_P(code) TSRMLS_CC);
+ fault_code_len = strlen(fault_code);
} else if (Z_TYPE_P(code) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL_P(code)) == 2) {
zval **t_ns, **t_code;
@@ -823,10 +843,22 @@ PHP_METHOD(SoapFault, SoapFault)
zend_hash_get_current_data(Z_ARRVAL_P(code), (void**)&t_ns);
zend_hash_move_forward(Z_ARRVAL_P(code));
zend_hash_get_current_data(Z_ARRVAL_P(code), (void**)&t_code);
- if (Z_TYPE_PP(t_ns) == IS_STRING && Z_TYPE_PP(t_code) == IS_STRING) {
- fault_code_ns = Z_STRVAL_PP(t_ns);
- fault_code = Z_STRVAL_PP(t_code);
- fault_code_len = Z_STRLEN_PP(t_code);
+ if ((Z_TYPE_PP(t_ns) == IS_STRING || Z_TYPE_PP(t_ns) == IS_UNICODE) &&
+ (Z_TYPE_PP(t_code) == IS_STRING || Z_TYPE_PP(t_code) == IS_UNICODE)) {
+ fault_code_ns_type = Z_TYPE_PP(t_ns);
+ if (Z_TYPE_PP(t_ns) == IS_STRING) {
+ fault_code_ns = Z_STRVAL_PP(t_ns);
+ } else {
+ fault_code_ns = soap_unicode_to_string(Z_USTRVAL_PP(t_ns), Z_USTRLEN_PP(t_ns) TSRMLS_CC);
+ }
+ fault_code_type = Z_TYPE_PP(t_code);
+ if (Z_TYPE_PP(t_code) == IS_STRING) {
+ fault_code = Z_STRVAL_PP(t_code);
+ fault_code_len = Z_STRLEN_PP(t_code);
+ } else {
+ fault_code = soap_unicode_to_string(Z_USTRVAL_PP(t_code), Z_USTRLEN_PP(t_code) TSRMLS_CC);
+ fault_code_len = strlen(fault_code);
+ }
} else {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters. Invalid fault code.");
}
@@ -839,11 +871,35 @@ PHP_METHOD(SoapFault, SoapFault)
if (name != NULL && name_len == 0) {
name = NULL;
}
+ if (name && name_type == IS_UNICODE) {
+ name = soap_unicode_to_string((UChar*)name, name_len TSRMLS_CC);
+ }
+ if (fault_string && fault_string_type == IS_UNICODE) {
+ fault_string = soap_unicode_to_string((UChar*)fault_string, fault_string_len TSRMLS_CC);
+ }
+ if (fault_actor && fault_actor_type == IS_UNICODE) {
+ fault_actor = soap_unicode_to_string((UChar*)fault_actor, fault_actor_len TSRMLS_CC);
+ }
set_soap_fault(this_ptr, fault_code_ns, fault_code, fault_string, fault_actor, details, name TSRMLS_CC);
if (headerfault != NULL) {
add_property_zval(this_ptr, "headerfault", headerfault);
}
+ if (fault_code && fault_code_type == IS_UNICODE) {
+ efree(fault_code);
+ }
+ if (fault_code_ns && fault_code_ns_type == IS_UNICODE) {
+ efree(fault_code_ns);
+ }
+ if (name && name_type == IS_UNICODE) {
+ efree(name);
+ }
+ if (fault_string && fault_string_type == IS_UNICODE) {
+ efree(fault_string);
+ }
+ if (fault_actor && fault_actor_type == IS_UNICODE) {
+ efree(fault_actor);
+ }
}
/* }}} */
@@ -943,19 +999,23 @@ PHP_METHOD(SoapVar, SoapVar)
PHP_METHOD(SoapServer, SoapServer)
{
soapServicePtr service;
- zval *wsdl, *options = NULL;
+ zval *zwsdl, *options = NULL;
+ char *wsdl = NULL;
int ret;
int version = SOAP_1_1;
zend_bool cache_wsdl;
SOAP_SERVER_BEGIN_CODE();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &wsdl, &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &zwsdl, &options) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
}
- if (Z_TYPE_P(wsdl) == IS_STRING) {
- } else if (Z_TYPE_P(wsdl) == IS_NULL) {
+ if (Z_TYPE_P(zwsdl) == IS_STRING) {
+ wsdl = estrndup(Z_STRVAL_P(zwsdl), Z_STRLEN_P(zwsdl));
+ } else if (Z_TYPE_P(zwsdl) == IS_UNICODE) {
+ wsdl = soap_unicode_to_string(Z_USTRVAL_P(zwsdl), Z_USTRLEN_P(zwsdl) TSRMLS_CC);
+ } else if (Z_TYPE_P(zwsdl) == IS_NULL) {
wsdl = NULL;
} else {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
@@ -977,29 +1037,41 @@ PHP_METHOD(SoapServer, SoapServer)
}
}
- if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- service->uri = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
- } else if (wsdl == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. 'uri' option is required in nonWSDL mode.");
- return;
+ if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ service->uri = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ service->uri = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
}
-
- if (zend_hash_find(ht, "actor", sizeof("actor"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- service->actor = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+
+ if (zend_hash_find(ht, "actor", sizeof("actor"), (void**)&tmp) == SUCCESS) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ service->actor = estrndup(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ service->actor = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
}
if (zend_hash_find(ht, "encoding", sizeof("encoding"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
xmlCharEncodingHandlerPtr encoding;
-
- encoding = xmlFindCharEncodingHandler(Z_STRVAL_PP(tmp));
- if (encoding == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%s'.", Z_STRVAL_PP(tmp));
- } else {
- service->encoding = encoding;
- }
+ char *str;
+
+ if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ str = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ } else {
+ str = Z_STRVAL_PP(tmp);
+ }
+ encoding = xmlFindCharEncodingHandler(str);
+ if (encoding == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. Invalid 'encoding' option - '%v'.", Z_TYPE_PP(tmp), Z_UNIVAL_PP(tmp));
+ } else {
+ service->encoding = encoding;
+ }
+ if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ efree(str);
+ }
}
if (zend_hash_find(ht, "classmap", sizeof("classmap"), (void**)&tmp) == SUCCESS &&
@@ -1007,7 +1079,7 @@ PHP_METHOD(SoapServer, SoapServer)
zval *ztmp;
ALLOC_HASHTABLE(service->class_map);
- zend_hash_init(service->class_map, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_u_hash_init(service->class_map, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
zend_hash_copy(service->class_map, (*tmp)->value.ht, (copy_ctor_func_t) zval_add_ref, (void *) &ztmp, sizeof(zval *));
}
@@ -1020,19 +1092,22 @@ PHP_METHOD(SoapServer, SoapServer)
Z_TYPE_PP(tmp) == IS_LONG) {
cache_wsdl = Z_LVAL_PP(tmp);
}
+ }
- } else if (wsdl == NULL) {
+ if (wsdl == NULL && service->uri == NULL) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid arguments. 'uri' option is required in nonWSDL mode.");
+ return;
}
+
service->version = version;
service->type = SOAP_FUNCTIONS;
service->soap_functions.functions_all = FALSE;
service->soap_functions.ft = emalloc(sizeof(HashTable));
- zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_u_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
if (wsdl) {
- service->sdl = get_sdl(this_ptr, Z_STRVAL_P(wsdl), cache_wsdl TSRMLS_CC);
+ service->sdl = get_sdl(this_ptr, wsdl, cache_wsdl TSRMLS_CC);
if (service->uri == NULL) {
if (service->sdl->target_ns) {
service->uri = estrdup(service->sdl->target_ns);
@@ -1041,6 +1116,7 @@ PHP_METHOD(SoapServer, SoapServer)
service->uri = estrdup("http://unknown-uri/");
}
}
+ efree(wsdl);
}
ret = zend_list_insert(service, le_service);
@@ -1226,9 +1302,9 @@ PHP_METHOD(SoapServer, setClass)
WRONG_PARAM_COUNT;
}
- if (Z_TYPE_PP(argv[0]) == IS_STRING) {
+ if (Z_TYPE_PP(argv[0]) == IS_STRING || Z_TYPE_PP(argv[0]) == IS_UNICODE) {
#ifdef ZEND_ENGINE_2
- found = zend_lookup_class(Z_STRVAL_PP(argv[0]), Z_STRLEN_PP(argv[0]), &ce TSRMLS_CC);
+ found = zend_u_lookup_class(Z_TYPE_PP(argv[0]), Z_UNIVAL_PP(argv[0]), Z_UNILEN_PP(argv[0]), &ce TSRMLS_CC);
#else
char *class_name = estrdup(Z_STRVAL_PP(argv[0]));
found = zend_hash_find(EG(class_table), php_strtolower(class_name, Z_STRLEN_PP(argv[0])), Z_STRLEN_PP(argv[0]) + 1, (void **)&ce);
@@ -1288,7 +1364,7 @@ PHP_METHOD(SoapServer, getFunctions)
zend_hash_internal_pointer_reset_ex(service->soap_functions.ft, &pos);
while (zend_hash_get_current_data_ex(service->soap_functions.ft, (void **)&name, &pos) != FAILURE) {
- add_next_index_string(return_value, Z_STRVAL_PP(name), 1);
+ add_next_index_text(return_value, Z_UNIVAL_PP(name), 1);
zend_hash_move_forward_ex(service->soap_functions.ft, &pos);
}
}
@@ -1299,7 +1375,7 @@ PHP_METHOD(SoapServer, getFunctions)
while (zend_hash_get_current_data_ex(ft, (void **)&f, &pos) != FAILURE) {
if ((service->type != SOAP_CLASS) || (f->common.fn_flags & ZEND_ACC_PUBLIC)) {
/* FIXME: Unicode support??? */
- add_next_index_string(return_value, f->common.function_name.s, 1);
+ add_next_index_text(return_value, f->common.function_name, 1);
}
zend_hash_move_forward_ex(ft, &pos);
}
@@ -1335,57 +1411,54 @@ PHP_METHOD(SoapServer, addFunction)
if (service->soap_functions.ft == NULL) {
service->soap_functions.functions_all = FALSE;
service->soap_functions.ft = emalloc(sizeof(HashTable));
- zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_u_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
}
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(function_name), &pos);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(function_name), (void **)&tmp_function, &pos) != FAILURE) {
- char *key;
- int key_len;
+ zstr key;
+ unsigned int key_len;
zend_function *f;
- if (Z_TYPE_PP(tmp_function) != IS_STRING) {
+ if (Z_TYPE_PP(tmp_function) != IS_STRING &&
+ Z_TYPE_PP(tmp_function) != IS_UNICODE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Tried to add a function that isn't a string");
}
- key_len = Z_STRLEN_PP(tmp_function);
- key = emalloc(key_len + 1);
- zend_str_tolower_copy(key, Z_STRVAL_PP(tmp_function), key_len);
+ key = zend_u_str_case_fold(Z_TYPE_PP(tmp_function), Z_UNIVAL_PP(tmp_function), Z_UNILEN_PP(tmp_function), 0, &key_len);
- if (zend_hash_find(EG(function_table), key, key_len+1, (void**)&f) == FAILURE) {
+ if (zend_u_hash_find(EG(function_table), Z_TYPE_PP(tmp_function), key, key_len+1, (void**)&f) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Tried to add a non existant function '%s'", Z_STRVAL_PP(tmp_function));
}
MAKE_STD_ZVAL(function_copy);
ZVAL_TEXT(function_copy, f->common.function_name, 1);
- zend_hash_update(service->soap_functions.ft, key, key_len+1, &function_copy, sizeof(zval *), NULL);
+ zend_u_hash_update(service->soap_functions.ft, Z_TYPE_PP(tmp_function), key, key_len+1, &function_copy, sizeof(zval *), NULL);
- efree(key);
+ efree(key.v);
zend_hash_move_forward_ex(Z_ARRVAL_P(function_name), &pos);
}
}
- } else if (function_name->type == IS_STRING) {
- char *key;
- int key_len;
+ } else if (Z_TYPE_P(function_name) == IS_STRING ||
+ Z_TYPE_P(function_name) == IS_UNICODE) {
+ zstr key;
+ unsigned int key_len;
zend_function *f;
- key_len = Z_STRLEN_P(function_name);
- key = emalloc(key_len + 1);
- zend_str_tolower_copy(key, Z_STRVAL_P(function_name), key_len);
-
- if (zend_hash_find(EG(function_table), key, key_len+1, (void**)&f) == FAILURE) {
+ key = zend_u_str_case_fold(Z_TYPE_P(function_name), Z_UNIVAL_P(function_name), Z_UNILEN_P(function_name), 0, &key_len);
+ if (zend_u_hash_find(EG(function_table), Z_TYPE_P(function_name), key, key_len+1, (void**)&f) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Tried to add a non existant function '%s'", Z_STRVAL_P(function_name));
}
if (service->soap_functions.ft == NULL) {
service->soap_functions.functions_all = FALSE;
service->soap_functions.ft = emalloc(sizeof(HashTable));
- zend_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_u_hash_init(service->soap_functions.ft, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
}
MAKE_STD_ZVAL(function_copy);
ZVAL_TEXT(function_copy, f->common.function_name, 1);
- zend_hash_update(service->soap_functions.ft, key, key_len+1, &function_copy, sizeof(zval *), NULL);
- efree(key);
+ zend_u_hash_update(service->soap_functions.ft, Z_TYPE_P(function_name), key, key_len+1, &function_copy, sizeof(zval *), NULL);
+ efree(key.v);
} else if (function_name->type == IS_LONG) {
if (Z_LVAL_P(function_name) == SOAP_FUNCTIONS_ALL) {
if (service->soap_functions.ft != NULL) {
@@ -1487,45 +1560,55 @@ PHP_METHOD(SoapServer, handle)
}
if (ZEND_NUM_ARGS() == 0) {
- if (zend_hash_find(&EG(symbol_table), HTTP_RAW_POST_DATA, sizeof(HTTP_RAW_POST_DATA), (void **) &raw_post)!=FAILURE
- && ((*raw_post)->type==IS_STRING)) {
- zval **server_vars, **encoding;
-
- zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
- if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
- Z_TYPE_PP(server_vars) == IS_ARRAY &&
- zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_CONTENT_ENCODING", sizeof("HTTP_CONTENT_ENCODING"), (void **) &encoding)==SUCCESS &&
- Z_TYPE_PP(encoding) == IS_STRING) {
- zval func;
- zval retval;
- zval param;
- zval *params[1];
-
- if ((strcmp(Z_STRVAL_PP(encoding),"gzip") == 0 ||
- strcmp(Z_STRVAL_PP(encoding),"x-gzip") == 0) &&
- zend_hash_exists(EG(function_table), "gzinflate", sizeof("gzinflate"))) {
- ZVAL_STRING(&func, "gzinflate", 0);
- params[0] = &param;
- ZVAL_STRINGL(params[0], Z_STRVAL_PP(raw_post)+10, Z_STRLEN_PP(raw_post)-10, 0);
- INIT_PZVAL(params[0]);
- } else if (strcmp(Z_STRVAL_PP(encoding),"deflate") == 0 &&
- zend_hash_exists(EG(function_table), "gzuncompress", sizeof("gzuncompress"))) {
- ZVAL_STRING(&func, "gzuncompress", 0);
- params[0] = &param;
- ZVAL_STRINGL(params[0], Z_STRVAL_PP(raw_post), Z_STRLEN_PP(raw_post), 0);
- INIT_PZVAL(params[0]);
- } else {
- php_error_docref(NULL TSRMLS_CC, E_ERROR,"Request is compressed with unknown compression '%s'",Z_STRVAL_PP(encoding));
- }
- if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, 1, params TSRMLS_CC) == SUCCESS &&
- Z_TYPE(retval) == IS_STRING) {
- doc_request = soap_xmlParseMemory(Z_STRVAL(retval),Z_STRLEN(retval));
- zval_dtor(&retval);
+ if (zend_hash_find(&EG(symbol_table), HTTP_RAW_POST_DATA, sizeof(HTTP_RAW_POST_DATA), (void **) &raw_post) != FAILURE &&
+ (Z_TYPE_PP(raw_post) == IS_STRING ||
+ Z_TYPE_PP(raw_post) == IS_UNICODE)) {
+ if (Z_TYPE_PP(raw_post) == IS_STRING) {
+ zval **server_vars, **encoding;
+
+ zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC);
+ if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &server_vars) == SUCCESS &&
+ Z_TYPE_PP(server_vars) == IS_ARRAY &&
+ zend_hash_find(Z_ARRVAL_PP(server_vars), "HTTP_CONTENT_ENCODING", sizeof("HTTP_CONTENT_ENCODING"), (void **) &encoding)==SUCCESS &&
+ (Z_TYPE_PP(encoding) == IS_STRING || Z_TYPE_PP(encoding) == IS_UNICODE)) {
+ zval func;
+ zval retval;
+ zval param;
+ zval *params[1];
+
+ if ((ZEND_U_EQUAL(Z_TYPE_PP(encoding), Z_UNIVAL_PP(encoding), Z_UNILEN_PP(encoding), "gzip", sizeof("gzip")-1) ||
+ ZEND_U_EQUAL(Z_TYPE_PP(encoding), Z_UNIVAL_PP(encoding), Z_UNILEN_PP(encoding), "x-gzip", sizeof("x-gzip")-1)) &&
+ zend_hash_exists(EG(function_table), "gzinflate", sizeof("gzinflate"))) {
+ ZVAL_STRING(&func, "gzinflate", 0);
+ params[0] = &param;
+ ZVAL_STRINGL(params[0], Z_STRVAL_PP(raw_post)+10, Z_STRLEN_PP(raw_post)-10, 0);
+ INIT_PZVAL(params[0]);
+ } else if (ZEND_U_EQUAL(Z_TYPE_PP(encoding), Z_UNIVAL_PP(encoding), Z_UNILEN_PP(encoding), "deflate", sizeof("deflate")-1) &&
+ zend_hash_exists(EG(function_table), "gzuncompress", sizeof("gzuncompress"))) {
+ ZVAL_STRING(&func, "gzuncompress", 0);
+ params[0] = &param;
+ ZVAL_STRINGL(params[0], Z_STRVAL_PP(raw_post), Z_STRLEN_PP(raw_post), 0);
+ INIT_PZVAL(params[0]);
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR,"Request is compressed with unknown compression '%s'",Z_STRVAL_PP(encoding));
+ }
+ if (call_user_function(CG(function_table), (zval**)NULL, &func, &retval, 1, params TSRMLS_CC) == SUCCESS &&
+ Z_TYPE(retval) == IS_STRING) {
+ doc_request = soap_xmlParseMemory(Z_STRVAL(retval),Z_STRLEN(retval));
+ zval_dtor(&retval);
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_ERROR,"Can't uncompress compressed request");
+ }
} else {
- php_error_docref(NULL TSRMLS_CC, E_ERROR,"Can't uncompress compressed request");
+ doc_request = soap_xmlParseMemory(Z_STRVAL_PP(raw_post),Z_STRLEN_PP(raw_post));
}
- } else {
- doc_request = soap_xmlParseMemory(Z_STRVAL_PP(raw_post),Z_STRLEN_PP(raw_post));
+ } else {
+ /* unicode */
+ /* TODO: remove unicode->string conversion */
+ char *str_req = soap_unicode_to_string(Z_USTRVAL_PP(raw_post), Z_USTRLEN_PP(raw_post) TSRMLS_CC);
+ doc_request = soap_xmlParseMemory(str_req, strlen(str_req));
+ efree(str_req);
+
}
} else {
if (SG(request_info).request_method &&
@@ -1592,19 +1675,22 @@ PHP_METHOD(SoapServer, handle)
/* If new session or something wierd happned */
if (soap_obj == NULL) {
zval *tmp_soap;
+#ifdef ZEND_ENGINE_2
+ zend_function *constructor_fn;
+#endif
MAKE_STD_ZVAL(tmp_soap);
object_init_ex(tmp_soap, service->soap_class.ce);
/* Call constructor */
#ifdef ZEND_ENGINE_2
- if (zend_hash_exists(&Z_OBJCE_P(tmp_soap)->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME))) {
+ if ((constructor_fn = zend_std_get_constructor(tmp_soap TSRMLS_CC))) {
zval c_ret, constructor;
INIT_ZVAL(c_ret);
INIT_ZVAL(constructor);
- ZVAL_STRING(&constructor, ZEND_CONSTRUCTOR_FUNC_NAME, 1);
+ ZVAL_TEXT(&constructor, constructor_fn->common.function_name, 1);
if (call_user_function(NULL, &tmp_soap, &constructor, &c_ret, service->soap_class.argc, service->soap_class.argv TSRMLS_CC) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Error calling constructor");
}
@@ -1818,6 +1904,8 @@ PHP_METHOD(SoapServer, handle)
php_output_discard(TSRMLS_C);
if (doc_return) {
+ UConverter *old_runtime_conv, *old_output_conv;
+
/* xmlDocDumpMemoryEnc(doc_return, &buf, &size, XML_CHAR_ENCODING_UTF8); */
xmlDocDumpMemory(doc_return, &buf, &size);
@@ -1834,7 +1922,13 @@ PHP_METHOD(SoapServer, handle)
}
xmlFreeDoc(doc_return);
+ old_runtime_conv = UG(runtime_encoding_conv);
+ old_output_conv = UG(output_encoding_conv);
+ UG(runtime_encoding_conv) = UG(utf8_conv);
+ UG(output_encoding_conv) = UG(utf8_conv);
php_write(buf, size TSRMLS_CC);
+ UG(runtime_encoding_conv) = old_runtime_conv;
+ UG(output_encoding_conv) = old_output_conv;
xmlFree(buf);
} else {
sapi_add_header("HTTP/1.1 202 Accepted", sizeof("HTTP/1.1 202 Accepted")-1, 1);
@@ -1941,6 +2035,7 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
char cont_len[30];
int size;
xmlDocPtr doc_return;
+ UConverter *old_runtime_conv, *old_output_conv;
soap_version = SOAP_GLOBAL(soap_version);
@@ -1960,7 +2055,14 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
} else {
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
}
+
+ old_runtime_conv = UG(runtime_encoding_conv);
+ old_output_conv = UG(output_encoding_conv);
+ UG(runtime_encoding_conv) = UG(utf8_conv);
+ UG(output_encoding_conv) = UG(utf8_conv);
php_write(buf, size TSRMLS_CC);
+ UG(runtime_encoding_conv) = old_runtime_conv;
+ UG(output_encoding_conv) = old_output_conv;
xmlFreeDoc(doc_return);
xmlFree(buf);
@@ -2142,7 +2244,8 @@ PHP_FUNCTION(is_soap_fault)
PHP_METHOD(SoapClient, SoapClient)
{
- zval *wsdl;
+ zval *zwsdl;
+ char *wsdl;
zval *options = NULL;
int soap_version = SOAP_1_1;
php_stream_context *context = NULL;
@@ -2150,13 +2253,16 @@ PHP_METHOD(SoapClient, SoapClient)
SOAP_CLIENT_BEGIN_CODE();
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &wsdl, &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|a", &zwsdl, &options) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
return;
}
- if (Z_TYPE_P(wsdl) == IS_STRING) {
- } else if (Z_TYPE_P(wsdl) != IS_NULL ) {
+ if (Z_TYPE_P(zwsdl) == IS_STRING) {
+ wsdl = estrndup(Z_STRVAL_P(zwsdl), Z_STRLEN_P(zwsdl));
+ } else if (Z_TYPE_P(zwsdl) == IS_UNICODE) {
+ wsdl = soap_unicode_to_string(Z_USTRVAL_P(zwsdl), Z_USTRLEN_P(zwsdl) TSRMLS_CC);
+ } else if (Z_TYPE_P(zwsdl) != IS_NULL ) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "$wsdl must be string or null");
return;
} else {
@@ -2172,8 +2278,12 @@ PHP_METHOD(SoapClient, SoapClient)
if (wsdl == NULL) {
/* Fetching non-WSDL mode options */
if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "uri", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "uri", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "uri", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
} else {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "'uri' option is requred in nonWSDL mode");
return;
@@ -2198,8 +2308,12 @@ PHP_METHOD(SoapClient, SoapClient)
}
if (zend_hash_find(ht, "location", sizeof("location"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "location", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "location", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "location", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
} else if (wsdl == NULL) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "'location' option is requred in nonWSDL mode");
return;
@@ -2212,11 +2326,19 @@ PHP_METHOD(SoapClient, SoapClient)
}
}
if (zend_hash_find(ht, "login", sizeof("login"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "_login", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_login", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "_login", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
if (zend_hash_find(ht, "password", sizeof("password"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "_password", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_password", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "_password", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
}
if (zend_hash_find(ht, "authentication", sizeof("authentication"), (void**)&tmp) == SUCCESS &&
Z_TYPE_PP(tmp) == IS_LONG &&
@@ -2225,26 +2347,38 @@ PHP_METHOD(SoapClient, SoapClient)
}
}
if (zend_hash_find(ht, "proxy_host", sizeof("proxy_host"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "_proxy_host", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_proxy_host", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "_proxy_host", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
if (zend_hash_find(ht, "proxy_port", sizeof("proxy_port"), (void**)&tmp) == SUCCESS &&
Z_TYPE_PP(tmp) == IS_LONG) {
add_property_long(this_ptr, "_proxy_port", Z_LVAL_PP(tmp));
}
if (zend_hash_find(ht, "proxy_login", sizeof("proxy_login"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "_proxy_login", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_proxy_login", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "_proxy_login", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
if (zend_hash_find(ht, "proxy_password", sizeof("proxy_password"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- add_property_stringl(this_ptr, "_proxy_password", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ add_property_stringl(this_ptr, "_proxy_password", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else {
+ add_property_unicodel(this_ptr, "_proxy_password", Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ }
}
}
}
if (zend_hash_find(ht, "local_cert", sizeof("local_cert"), (void**)&tmp) == SUCCESS &&
Z_TYPE_PP(tmp) == IS_STRING) {
- if (!context) {
- context = php_stream_context_alloc();
- }
+ if (!context) {
+ context = php_stream_context_alloc();
+ }
php_stream_context_set_option(context, "ssl", "local_cert", *tmp);
if (zend_hash_find(ht, "passphrase", sizeof("passphrase"), (void**)&tmp) == SUCCESS &&
Z_TYPE_PP(tmp) == IS_STRING) {
@@ -2336,12 +2470,13 @@ PHP_METHOD(SoapClient, SoapClient)
old_soap_version = SOAP_GLOBAL(soap_version);
SOAP_GLOBAL(soap_version) = soap_version;
- sdl = get_sdl(this_ptr, Z_STRVAL_P(wsdl), cache_wsdl TSRMLS_CC);
+ sdl = get_sdl(this_ptr, wsdl, cache_wsdl TSRMLS_CC);
ret = zend_list_insert(sdl, le_sdl);
add_property_resource(this_ptr, "sdl", ret);
SOAP_GLOBAL(soap_version) = old_soap_version;
+ efree(wsdl);
}
SOAP_CLIENT_END_CODE();
@@ -2401,14 +2536,19 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
if (call_user_function(NULL, &this_ptr, &func, response, 5, params TSRMLS_CC) != SUCCESS) {
add_soap_fault(this_ptr, "Client", "SoapSlient::__doRequest() failed", NULL, NULL TSRMLS_CC);
ret = FALSE;
- } else if (Z_TYPE_P(response) != IS_STRING) {
+ } else if (Z_TYPE_P(response) != IS_STRING && Z_TYPE_P(response) != IS_UNICODE) {
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault"), (void **) &fault) == FAILURE) {
add_soap_fault(this_ptr, "Client", "SoapSlient::__doRequest() returned non string value", NULL, NULL TSRMLS_CC);
}
ret = FALSE;
- } else if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- Z_LVAL_PP(trace) > 0) {
- add_property_stringl(this_ptr, "__last_response", Z_STRVAL_P(response), Z_STRLEN_P(response), 1);
+ } else {
+ if (Z_TYPE_P(response) == IS_UNICODE) {
+ zval_unicode_to_string_ex(response, ZEND_U_CONVERTER(UG(runtime_encoding_conv)) TSRMLS_CC);
+ }
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
+ Z_LVAL_PP(trace) > 0) {
+ add_property_stringl(this_ptr, "__last_response", Z_STRVAL_P(response), Z_STRLEN_P(response), 1);
+ }
}
xmlFree(buf);
if (ret && zend_hash_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault"), (void **) &fault) == SUCCESS) {
@@ -2442,6 +2582,7 @@ static void do_soap_call(zval* this_ptr,
xmlCharEncodingHandlerPtr old_encoding;
HashTable *old_class_map;
int old_features;
+ int free_location = 0;
SOAP_CLIENT_BEGIN_CODE();
@@ -2458,10 +2599,14 @@ static void do_soap_call(zval* this_ptr,
}
if (location == NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location"),(void **) &tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- location = Z_STRVAL_PP(tmp);
- }
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location"),(void **) &tmp) == SUCCESS) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ location = Z_STRVAL_PP(tmp);
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ free_location = 1;
+ location = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
+ }
}
if (FIND_SDL_PROPERTY(this_ptr,tmp) != FAILURE) {
@@ -2545,8 +2690,15 @@ static void do_soap_call(zval* this_ptr,
} else if (location == NULL) {
add_soap_fault(this_ptr, "Client", "Error could not find \"location\" property", NULL, NULL TSRMLS_CC);
} else {
+ int free_uri = 0;
+
if (call_uri == NULL) {
- call_uri = Z_STRVAL_PP(uri);
+ if (Z_TYPE_PP(uri) == IS_STRING) {
+ call_uri = Z_STRVAL_PP(uri);
+ } else if (Z_TYPE_PP(uri) == IS_UNICODE) {
+ free_uri = 1;
+ call_uri = soap_unicode_to_string(Z_USTRVAL_PP(uri), Z_USTRLEN_PP(uri) TSRMLS_CC);
+ }
}
request = serialize_function_call(this_ptr, NULL, function, call_uri, real_args, arg_count, soap_version, soap_headers TSRMLS_CC);
@@ -2559,6 +2711,10 @@ static void do_soap_call(zval* this_ptr,
}
smart_str_0(&action);
+ if (free_uri) {
+ efree(call_uri);
+ }
+
ret = do_request(this_ptr, request, location, action.c, soap_version, 0, &response TSRMLS_CC);
smart_str_free(&action);
@@ -2610,6 +2766,9 @@ static void do_soap_call(zval* this_ptr,
SOAP_GLOBAL(encoding) = old_encoding;
SOAP_GLOBAL(sdl) = old_sdl;
SOAP_CLIENT_END_CODE();
+ if (free_location) {
+ efree(location);
+ }
}
static void verify_soap_headers_array(HashTable *ht TSRMLS_DC)
@@ -2642,7 +2801,7 @@ PHP_METHOD(SoapClient, __call)
zval **param;
int arg_count;
zval **tmp;
- zend_bool free_soap_headers = 0;
+ zend_bool free_soap_headers = 0, free_location = 0, free_soap_action = 0, free_uri = 0;
HashPosition pos;
@@ -2655,18 +2814,33 @@ PHP_METHOD(SoapClient, __call)
if (Z_TYPE_P(options) == IS_ARRAY) {
HashTable *ht = Z_ARRVAL_P(options);
if (zend_hash_find(ht, "location", sizeof("location"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- location = Z_STRVAL_PP(tmp);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ location = Z_STRVAL_PP(tmp);
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ free_location = 1;
+ location = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
}
if (zend_hash_find(ht, "soapaction", sizeof("soapaction"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- soap_action = Z_STRVAL_PP(tmp);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ soap_action = Z_STRVAL_PP(tmp);
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ free_soap_action = 1;
+ soap_action = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
}
if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- uri = Z_STRVAL_PP(tmp);
+ (Z_TYPE_PP(tmp) == IS_STRING || Z_TYPE_PP(tmp) == IS_UNICODE)) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ uri = Z_STRVAL_PP(tmp);
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ free_uri = 1;
+ uri = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC);
+ }
}
} else if (Z_TYPE_P(options) != IS_NULL) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "first parameter must be string or null");
@@ -2735,6 +2909,16 @@ PHP_METHOD(SoapClient, __call)
zend_hash_destroy(soap_headers);
efree(soap_headers);
}
+
+ if (free_location) {
+ efree(location);
+ }
+ if (free_soap_action) {
+ efree(soap_action);
+ }
+ if (free_uri) {
+ efree(uri);
+ }
}
/* }}} */
@@ -2756,7 +2940,7 @@ PHP_METHOD(SoapClient, __getFunctions)
zend_hash_internal_pointer_reset_ex(&sdl->functions, &pos);
while (zend_hash_get_current_data_ex(&sdl->functions, (void **)&function, &pos) != FAILURE) {
function_to_string((*function), &buf);
- add_next_index_stringl(return_value, buf.c, buf.len, 1);
+ add_next_index_rt_stringl(return_value, buf.c, buf.len, 1);
smart_str_free(&buf);
zend_hash_move_forward_ex(&sdl->functions, &pos);
}
@@ -2783,7 +2967,7 @@ PHP_METHOD(SoapClient, __getTypes)
zend_hash_internal_pointer_reset_ex(sdl->types, &pos);
while (zend_hash_get_current_data_ex(sdl->types, (void **)&type, &pos) != FAILURE) {
type_to_string((*type), &buf, 0);
- add_next_index_stringl(return_value, buf.c, buf.len, 1);
+ add_next_index_rt_stringl(return_value, buf.c, buf.len, 1);
zend_hash_move_forward_ex(sdl->types, &pos);
smart_str_free(&buf);
}
@@ -2965,23 +3149,33 @@ PHP_METHOD(SoapClient, __setSoapHeaders)
The function returns old value of location options. */
PHP_METHOD(SoapClient, __setLocation)
{
- char *location = NULL;
+ void* location = NULL;
int location_len;
+ zend_uchar location_type;
zval **tmp;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s",
- &location, &location_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|t",
+ &location, &location_len, &location_type) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid parameters");
RETURN_NULL();
}
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location"),(void **) &tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- RETVAL_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ if (zend_hash_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location"),(void **) &tmp) == SUCCESS) {
+ if (Z_TYPE_PP(tmp) == IS_STRING) {
+ RETVAL_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+ } else if (Z_TYPE_PP(tmp) == IS_UNICODE) {
+ RETVAL_UNICODEL(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp), 1);
+ } else {
+ RETVAL_NULL();
+ }
} else {
RETVAL_NULL();
}
if (location && location_len) {
- add_property_stringl(this_ptr, "location", location, location_len, 1);
+ if (location_type == IS_STRING) {
+ add_property_stringl(this_ptr, "location", location, location_len, 1);
+ } else {
+ add_property_unicodel(this_ptr, "location", location, location_len, 1);
+ }
} else {
zend_hash_del(Z_OBJPROP_P(this_ptr), "location", sizeof("location"));
}
@@ -3540,16 +3734,21 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(ret), &pos);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(ret), (void **)&data, &pos) != FAILURE) {
- char *param_name = NULL;
+ zend_uchar param_name_type;
+ zstr param_name = NULL_ZSTR;
unsigned int param_name_len;
ulong param_index = i;
- zend_hash_get_current_key_ex(Z_ARRVAL_P(ret), &param_name, &param_name_len, &param_index, 0, &pos);
- parameter = get_param(function, param_name, param_index, TRUE);
+ param_name_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(ret), &param_name, &param_name_len, &param_index, 0, &pos);
+ if (param_name_type == IS_UNICODE) {
+ param_name.s = soap_unicode_to_string(param_name.u, param_name_len TSRMLS_CC);
+ param_name_len = strlen(param_name.s);
+ }
+ parameter = get_param(function, param_name.s, param_index, TRUE);
if (style == SOAP_RPC) {
- param = serialize_parameter(parameter, *data, i, param_name, use, method TSRMLS_CC);
+ param = serialize_parameter(parameter, *data, i, param_name.s, use, method TSRMLS_CC);
} else {
- param = serialize_parameter(parameter, *data, i, param_name, use, body TSRMLS_CC);
+ param = serialize_parameter(parameter, *data, i, param_name.s, use, body TSRMLS_CC);
if (function && function->binding->bindingType == BINDING_SOAP) {
if (parameter && parameter->element) {
ns = encode_add_ns(param, parameter->element->namens);
@@ -3558,6 +3757,9 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
}
}
}
+ if (param_name_type == IS_UNICODE) {
+ efree(param_name.v);
+ }
zend_hash_move_forward_ex(Z_ARRVAL_P(ret), &pos);
i++;
diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt
index 306557b302..9fd1572329 100755
--- a/ext/soap/tests/any.phpt
+++ b/ext/soap/tests/any.phpt
@@ -81,3 +81,32 @@ object(stdClass)#8 (1) {
}
}
}
+--UEXPECT--
+object(stdClass)#5 (1) {
+ [u"inputAny"]=>
+ object(stdClass)#6 (1) {
+ [u"any"]=>
+ object(SOAPComplexType)#7 (3) {
+ [u"varInt"]=>
+ int(34)
+ [u"varString"]=>
+ unicode(3) "arg"
+ [u"varFloat"]=>
+ float(325.325)
+ }
+ }
+}
+object(stdClass)#8 (1) {
+ [u"return"]=>
+ object(stdClass)#9 (1) {
+ [u"any"]=>
+ object(SOAPComplexType)#10 (3) {
+ [u"varInt"]=>
+ int(34)
+ [u"varString"]=>
+ unicode(3) "arg"
+ [u"varFloat"]=>
+ float(325.325)
+ }
+ }
+}
diff --git a/ext/soap/tests/bugs/bug28969.phpt b/ext/soap/tests/bugs/bug28969.phpt
index 6634888eac..995706a4d4 100644
--- a/ext/soap/tests/bugs/bug28969.phpt
+++ b/ext/soap/tests/bugs/bug28969.phpt
@@ -2,6 +2,9 @@
Bug #28969 (Wrong data encoding of special characters)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+unicode.script_encoding=ISO-8859-1
+unicode.output_encoding=ISO-8859-1
--FILE--
<?php
function test() {
@@ -31,8 +34,14 @@ $x = new LocalSoapClient(NULL,array('location'=>'test://',
'uri'=>'http://testuri.org',
'encoding'=>'ISO-8859-1'));
var_dump($x->test());
+var_dump("¦è¥");
echo "ok\n";
?>
--EXPECT--
string(3) "¦è¥"
+string(3) "¦è¥"
ok
+--UEXPECT--
+unicode(3) "¦è¥"
+unicode(3) "¦è¥"
+ok \ No newline at end of file
diff --git a/ext/soap/tests/bugs/bug28985.phpt b/ext/soap/tests/bugs/bug28985.phpt
index 291cce0cbb..de3944e06c 100644
--- a/ext/soap/tests/bugs/bug28985.phpt
+++ b/ext/soap/tests/bugs/bug28985.phpt
@@ -201,4 +201,199 @@ array(42) {
string(76) "struct GetEnvironnementResponse {
MGEnvironnement GetEnvironnementResult;
}"
+}
+--UEXPECT--
+array(42) {
+ [0]=>
+ unicode(100) "struct LoginMGDIS {
+ string iUserLogin;
+ string iUserId;
+ string iUserPassword;
+ string iProfilId;
+}"
+ [1]=>
+ unicode(29) "struct LoginMGDISResponse {
+}"
+ [2]=>
+ unicode(28) "struct GetIdentification {
+}"
+ [3]=>
+ unicode(77) "struct GetIdentificationResponse {
+ ArrayOfAnyType GetIdentificationResult;
+}"
+ [4]=>
+ unicode(43) "struct ArrayOfAnyType {
+ anyType anyType;
+}"
+ [5]=>
+ unicode(37) "struct RollbackCurrentTransaction {
+}"
+ [6]=>
+ unicode(45) "struct RollbackCurrentTransactionResponse {
+}"
+ [7]=>
+ unicode(68) "struct GetListeProfil {
+ string iUserLogin;
+ string iUserPassword;
+}"
+ [8]=>
+ unicode(86) "struct MGCodeLibelle {
+ string Code;
+ string Libelle;
+ boolean Defaut;
+ anyType Tag;
+}"
+ [9]=>
+ unicode(61) "struct ArrayOfMGCodeLibelle {
+ MGCodeLibelle MGCodeLibelle;
+}"
+ [10]=>
+ unicode(77) "struct GetListeProfilResponse {
+ ArrayOfMGCodeLibelle GetListeProfilResult;
+}"
+ [11]=>
+ unicode(41) "struct GetListeValCodif {
+ string Code;
+}"
+ [12]=>
+ unicode(43) "struct ArrayOfMGCodif {
+ MGCodif MGCodif;
+}"
+ [13]=>
+ unicode(18) "struct MGCodif {
+}"
+ [14]=>
+ unicode(75) "struct GetListeValCodifResponse {
+ ArrayOfMGCodif GetListeValCodifResult;
+}"
+ [15]=>
+ unicode(39) "struct TestPhpSoap {
+ MGCodif entree;
+}"
+ [16]=>
+ unicode(57) "struct TestPhpSoapResponse {
+ string TestPhpSoapResult;
+}"
+ [17]=>
+ unicode(50) "struct GetListeCodif {
+ boolean iGetListeValeur;
+}"
+ [18]=>
+ unicode(87) "struct MGCodifGrp {
+ string TypeCodif;
+ string LibCodif;
+ ArrayOfMGCodif ListeCodifs;
+}"
+ [19]=>
+ unicode(52) "struct ArrayOfMGCodifGrp {
+ MGCodifGrp MGCodifGrp;
+}"
+ [20]=>
+ unicode(72) "struct GetListeCodifResponse {
+ ArrayOfMGCodifGrp GetListeCodifResult;
+}"
+ [21]=>
+ unicode(57) "struct DroitCreation {
+ string iObjet;
+ string iProfil;
+}"
+ [22]=>
+ unicode(62) "struct DroitCreationResponse {
+ boolean DroitCreationResult;
+}"
+ [23]=>
+ unicode(74) "struct ListeDroitCreation {
+ ArrayOfString iListeObjet;
+ string iProfil;
+}"
+ [24]=>
+ unicode(40) "struct ArrayOfString {
+ string string;
+}"
+ [25]=>
+ unicode(79) "struct ListeDroitCreationResponse {
+ ArrayOfAnyType ListeDroitCreationResult;
+}"
+ [26]=>
+ unicode(87) "struct GetDroitsObjetProtege {
+ string iObjet;
+ string iProfil;
+ string iUtilisateur;
+}"
+ [27]=>
+ unicode(154) "struct MGDroitsObjetProtege {
+ string LbUti;
+ string LbProf;
+ string LbServ;
+ string LbDir;
+ boolean isProtected;
+ ArrayOfMGDroitAcces ListeDroitsAcces;
+}"
+ [28]=>
+ unicode(58) "struct ArrayOfMGDroitAcces {
+ MGDroitAcces MGDroitAcces;
+}"
+ [29]=>
+ unicode(104) "struct MGDroitAcces {
+ string IdProfil;
+ boolean Lecture;
+ boolean Modification;
+ boolean Suppression;
+}"
+ [30]=>
+ unicode(91) "struct GetDroitsObjetProtegeResponse {
+ MGDroitsObjetProtege GetDroitsObjetProtegeResult;
+}"
+ [31]=>
+ unicode(76) "struct GetPrivileges {
+ string iIdSupport;
+ int iIdForme;
+ string iProfil;
+}"
+ [32]=>
+ unicode(68) "struct GetPrivilegesResponse {
+ ArrayOfString GetPrivilegesResult;
+}"
+ [33]=>
+ unicode(46) "struct GetLibelleProfil {
+ string iIdProfil;
+}"
+ [34]=>
+ unicode(67) "struct GetLibelleProfilResponse {
+ string GetLibelleProfilResult;
+}"
+ [35]=>
+ unicode(91) "struct GetValeurRecherche {
+ string iChampSource;
+ string iTable;
+ string iOrderByClause;
+}"
+ [36]=>
+ unicode(78) "struct GetValeurRechercheResponse {
+ ArrayOfString GetValeurRechercheResult;
+}"
+ [37]=>
+ unicode(128) "struct GetValeurRechercheWithClauseWhere {
+ string iChampSource;
+ string iTable;
+ string iClauseWhere;
+ string iOrderByClause;
+}"
+ [38]=>
+ unicode(108) "struct GetValeurRechercheWithClauseWhereResponse {
+ ArrayOfString GetValeurRechercheWithClauseWhereResult;
+}"
+ [39]=>
+ unicode(27) "struct GetEnvironnement {
+}"
+ [40]=>
+ unicode(106) "struct MGEnvironnement {
+ string RepBureautique;
+ string RepBureautiqueImage;
+ string RepBureautiqueDoc;
+}"
+ [41]=>
+ unicode(76) "struct GetEnvironnementResponse {
+ MGEnvironnement GetEnvironnementResult;
+}"
} \ No newline at end of file
diff --git a/ext/soap/tests/bugs/bug29109.phpt b/ext/soap/tests/bugs/bug29109.phpt
index 91d3ea265f..822e964fa0 100644
--- a/ext/soap/tests/bugs/bug29109.phpt
+++ b/ext/soap/tests/bugs/bug29109.phpt
@@ -15,4 +15,13 @@ array(3) {
string(19) "string HelloWorld()"
[2]=>
string(19) "string HelloWorld()"
+}
+--UEXPECT--
+array(3) {
+ [0]=>
+ unicode(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)"
+ [1]=>
+ unicode(19) "string HelloWorld()"
+ [2]=>
+ unicode(19) "string HelloWorld()"
} \ No newline at end of file
diff --git a/ext/soap/tests/bugs/bug29236.phpt b/ext/soap/tests/bugs/bug29236.phpt
index 4dbc302c17..22333cae23 100644
--- a/ext/soap/tests/bugs/bug29236.phpt
+++ b/ext/soap/tests/bugs/bug29236.phpt
@@ -18,3 +18,14 @@ array(4) {
[3]=>
string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)"
}
+--UEXPECT--
+array(4) {
+ [0]=>
+ unicode(59) "StartSessionResponse StartSession(StartSession $parameters)"
+ [1]=>
+ unicode(62) "VerifySessionResponse VerifySession(VerifySession $parameters)"
+ [2]=>
+ unicode(41) "LogoutResponse Logout(Logout $parameters)"
+ [3]=>
+ unicode(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)"
+}
diff --git a/ext/soap/tests/bugs/bug29844.phpt b/ext/soap/tests/bugs/bug29844.phpt
index bef8335709..f425ddccb6 100644
--- a/ext/soap/tests/bugs/bug29844.phpt
+++ b/ext/soap/tests/bugs/bug29844.phpt
@@ -34,3 +34,5 @@ var_dump($client->hello('davey'));
?>
--EXPECT--
string(11) "Hello davey"
+--UEXPECT--
+unicode(11) "Hello davey"
diff --git a/ext/soap/tests/bugs/bug30106.phpt b/ext/soap/tests/bugs/bug30106.phpt
index dbc44f6f0d..e94ac8924e 100644
--- a/ext/soap/tests/bugs/bug30106.phpt
+++ b/ext/soap/tests/bugs/bug30106.phpt
@@ -70,3 +70,37 @@ object(stdClass)#%d (1) {
string(48) "<test>Hello World!</test><test>Bye World!</test>"
}
}
+--UEXPECTF--
+array(1) {
+ [0]=>
+ unicode(71) "getContinentListResponse getContinentList(getContinentList $parameters)"
+}
+array(3) {
+ [0]=>
+ unicode(64) "struct getContinentList {
+ int AFFILIATE_ID;
+ string PASSWORD;
+}"
+ [1]=>
+ unicode(83) "struct getContinentListResponse {
+ getContinentListResult getContinentListResult;
+}"
+ [2]=>
+ unicode(66) "struct getContinentListResult {
+ <anyXML> schema;
+ <anyXML> any;
+}"
+}
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/PRWebServ/getOtherInformation"><SOAP-ENV:Body><ns1:getContinentList><ns1:AFFILIATE_ID>1</ns1:AFFILIATE_ID><ns1:PASSWORD>x</ns1:PASSWORD></ns1:getContinentList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://tempuri.org/PRWebServ/getOtherInformation"><SOAP-ENV:Body><ns1:getContinentListResponse><ns1:getContinentListResult><xsd:schema><element name="test" type="xsd:string"/></xsd:schema><test>Hello World!</test><test>Bye World!</test></ns1:getContinentListResult></ns1:getContinentListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ [u"getContinentListResult"]=>
+ object(stdClass)#%d (2) {
+ [u"schema"]=>
+ unicode(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>"
+ [u"any"]=>
+ unicode(48) "<test>Hello World!</test><test>Bye World!</test>"
+ }
+}
diff --git a/ext/soap/tests/bugs/bug30175.phpt b/ext/soap/tests/bugs/bug30175.phpt
index f5501ac9bd..ee7667b742 100644
--- a/ext/soap/tests/bugs/bug30175.phpt
+++ b/ext/soap/tests/bugs/bug30175.phpt
@@ -45,3 +45,12 @@ array(3) {
["ipAddress"]=>
string(9) "127.0.0.1"
}
+--UEXPECT--
+array(3) {
+ [u"name"]=>
+ unicode(25) "blah blah some name field"
+ [u"shortDescription"]=>
+ unicode(42) "This is a description. more blah blah blah"
+ [u"ipAddress"]=>
+ unicode(9) "127.0.0.1"
+}
diff --git a/ext/soap/tests/bugs/bug30928.phpt b/ext/soap/tests/bugs/bug30928.phpt
index 645866c585..c5f2e25cea 100644
--- a/ext/soap/tests/bugs/bug30928.phpt
+++ b/ext/soap/tests/bugs/bug30928.phpt
@@ -61,3 +61,21 @@ object(foo)#%d (3) {
string(1) "c"
}
ok
+--UEXPECTF--
+object(stdClass)#%d (3) {
+ [u"a"]=>
+ unicode(1) "a"
+ [u"b"]=>
+ unicode(1) "b"
+ [u"c"]=>
+ unicode(1) "c"
+}
+object(foo)#%d (3) {
+ [u"a"]=>
+ unicode(1) "a"
+ [u"b":u"foo":private]=>
+ unicode(1) "b"
+ [u"c":protected]=>
+ unicode(1) "c"
+}
+ok
diff --git a/ext/soap/tests/bugs/bug32776.phpt b/ext/soap/tests/bugs/bug32776.phpt
index b3c4ff0170..e4239f242c 100644
--- a/ext/soap/tests/bugs/bug32776.phpt
+++ b/ext/soap/tests/bugs/bug32776.phpt
@@ -45,3 +45,11 @@ string(459) "<?xml version="1.0" encoding="UTF-8"?>
"
string(0) ""
ok
+--UEXPECT--
+NULL
+unicode(5) "Hello"
+string(459) "<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:test><x xsi:type="xsd:string">Hello</x></SOAP-ENV:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+"
+string(0) ""
+ok
diff --git a/ext/soap/tests/bugs/bug35142.phpt b/ext/soap/tests/bugs/bug35142.phpt
index e12b5ad98a..5e6e61c14c 100755
--- a/ext/soap/tests/bugs/bug35142.phpt
+++ b/ext/soap/tests/bugs/bug35142.phpt
@@ -133,3 +133,49 @@ object(IVREvents)#%d (6) {
}
}
}
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testurl/Message"><SOAP-ENV:Body><ns1:ivrEvents version="1.0" activityId="101" messageId="12345" source="IVR"><ns1:logOffEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="Smoked" callInitiator="IVR"/><ns1:logOffEvent audienceMemberId="34568" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="SmokeFree" callInitiator="IVR"/><ns1:logOnEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00"/></ns1:ivrEvents></SOAP-ENV:Body></SOAP-ENV:Envelope>
+
+object(IVREvents)#%d (6) {
+ [u"version"]=>
+ unicode(3) "1.0"
+ [u"activityId"]=>
+ int(101)
+ [u"messageId"]=>
+ int(12345)
+ [u"source"]=>
+ unicode(3) "IVR"
+ [u"logOnEvent"]=>
+ object(LogOnEvent)#%d (2) {
+ [u"audienceMemberId"]=>
+ int(34567)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ }
+ [u"logOffEvent"]=>
+ array(2) {
+ [0]=>
+ object(LogOffEvent)#%d (4) {
+ [u"audienceMemberId"]=>
+ int(34567)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ [u"smokeStatus"]=>
+ unicode(6) "Smoked"
+ [u"callInitiator"]=>
+ unicode(3) "IVR"
+ }
+ [1]=>
+ object(LogOffEvent)#%d (4) {
+ [u"audienceMemberId"]=>
+ int(34568)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ [u"smokeStatus"]=>
+ unicode(9) "SmokeFree"
+ [u"callInitiator"]=>
+ unicode(3) "IVR"
+ }
+ }
+}
diff --git a/ext/soap/tests/bugs/bug36226.phpt b/ext/soap/tests/bugs/bug36226.phpt
index c88d969f29..798b8bb86e 100755
--- a/ext/soap/tests/bugs/bug36226.phpt
+++ b/ext/soap/tests/bugs/bug36226.phpt
@@ -137,3 +137,52 @@ object(IVREvents)#%d (6) {
}
}
}
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testurl/Message"><SOAP-ENV:Body><ns1:ivrEvents version="1.0" activityId="101" messageId="12345" source="IVR"><ns1:logOffEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="Smoked" callInitiator="IVR"/><ns1:logOffEvent audienceMemberId="34568" timestamp="2005-11-08T11:22:07+03:00" smokeStatus="SmokeFree" callInitiator="IVR"/><ns1:logOnEvent audienceMemberId="34567" timestamp="2005-11-08T11:22:07+03:00"/></ns1:ivrEvents></SOAP-ENV:Body></SOAP-ENV:Envelope>
+
+object(IVREvents)#%d (6) {
+ [u"version"]=>
+ unicode(3) "1.0"
+ [u"activityId"]=>
+ int(101)
+ [u"messageId"]=>
+ int(12345)
+ [u"source"]=>
+ unicode(3) "IVR"
+ [u"logOnEvent"]=>
+ array(1) {
+ [0]=>
+ object(LogOnEvent)#10 (2) {
+ [u"audienceMemberId"]=>
+ int(34567)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ }
+ }
+ [u"logOffEvent"]=>
+ array(2) {
+ [0]=>
+ object(LogOffEvent)#%d (4) {
+ [u"audienceMemberId"]=>
+ int(34567)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ [u"smokeStatus"]=>
+ unicode(6) "Smoked"
+ [u"callInitiator"]=>
+ unicode(3) "IVR"
+ }
+ [1]=>
+ object(LogOffEvent)#%d (4) {
+ [u"audienceMemberId"]=>
+ int(34568)
+ [u"timestamp"]=>
+ unicode(25) "2005-11-08T11:22:07+03:00"
+ [u"smokeStatus"]=>
+ unicode(9) "SmokeFree"
+ [u"callInitiator"]=>
+ unicode(3) "IVR"
+ }
+ }
+}
diff --git a/ext/soap/tests/bugs/bug38005.phpt b/ext/soap/tests/bugs/bug38005.phpt
index d15beccce5..753ecac498 100755
--- a/ext/soap/tests/bugs/bug38005.phpt
+++ b/ext/soap/tests/bugs/bug38005.phpt
@@ -2,6 +2,9 @@
Bug #38005 (SoapFault faultstring doesn't follow encoding rules)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+unicode.script_encoding=ISO-8859-1
+unicode.output_encoding=ISO-8859-1
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt
index 9c0cbb4fba..24e9ac5e37 100755
--- a/ext/soap/tests/bugs/bug38067.phpt
+++ b/ext/soap/tests/bugs/bug38067.phpt
@@ -2,6 +2,9 @@
Bug #38067 (Parameters are not decoded from utf-8 when using encoding option)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
+--INI--
+unicode.script_encoding=ISO-8859-1
+unicode.output_encoding=ISO-8859-1
--FILE--
<?php
function Test($param) {
diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt
index e6f5af9913..cd0b31493a 100644
--- a/ext/soap/tests/classmap002.phpt
+++ b/ext/soap/tests/classmap002.phpt
@@ -42,3 +42,11 @@ object(book)#2 (2) {
string(3) "aap"
}
ok
+--UEXPECT--
+object(book)#2 (2) {
+ [u"a"]=>
+ unicode(5) "Blaat"
+ [u"b"]=>
+ unicode(3) "aap"
+}
+ok
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
index d8f91d328e..b5f423f721 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt
@@ -5,7 +5,7 @@ SOAP Interop Round2 base 005 (php/direct): echoString(utf-8)
--FILE--
<?php
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
-$client->__soapCall("echoString", array(utf8_encode('ỗÈéóÒ₧⅜ỗỸ')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
+$client->__soapCall("echoString", array(utf8_encode(b'ỗÈéóÒ₧⅜ỗỸ')), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
index 116e14faac..2cdf9962fc 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt
@@ -5,7 +5,7 @@ SOAP Interop Round2 base 005 (soap/direct): echoString(utf-8)
--FILE--
<?php
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
-$client->__soapCall("echoString", array(new SoapParam(new SoapVar(utf8_encode('ỗÈéóÒ₧⅜ỗỸ'),XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
+$client->__soapCall("echoString", array(new SoapParam(new SoapVar(utf8_encode(b'ỗÈéóÒ₧⅜ỗỸ'),XSD_STRING),"inputString")), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
index 64f03df7b5..eb2b4df22b 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt
@@ -5,7 +5,7 @@ SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8)
--FILE--
<?php
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
-$client->echoString(utf8_encode('ỗÈéóÒ₧⅜ỗỸ'));
+$client->echoString(utf8_encode(b'ỗÈéóÒ₧⅜ỗỸ'));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
index 9061da6a39..9bd31eb8c8 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt
@@ -33,3 +33,17 @@ object(stdClass)#5 (3) {
NULL
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:nil="true" xsi:type="ns2:List"/></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:nil="true" xsi:type="ns2:List"/></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#5 (3) {
+ [u"varInt"]=>
+ int(1)
+ [u"varString"]=>
+ unicode(4) "arg1"
+ [u"child"]=>
+ NULL
+}
+ok
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
index 2b566679c0..b7940f2b9c 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt
@@ -40,3 +40,24 @@ object(stdClass)#6 (3) {
}
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#6 (3) {
+ [u"varInt"]=>
+ int(1)
+ [u"varString"]=>
+ unicode(4) "arg1"
+ [u"child"]=>
+ object(stdClass)#7 (3) {
+ [u"varInt"]=>
+ int(2)
+ [u"varString"]=>
+ unicode(4) "arg2"
+ [u"child"]=>
+ NULL
+ }
+}
+ok
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
index cf2a9dae1b..5137d2f060 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt
@@ -47,3 +47,31 @@ object(stdClass)#7 (3) {
}
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="true" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#7 (3) {
+ [u"varInt"]=>
+ int(1)
+ [u"varString"]=>
+ unicode(4) "arg1"
+ [u"child"]=>
+ object(stdClass)#8 (3) {
+ [u"varInt"]=>
+ int(2)
+ [u"varString"]=>
+ unicode(4) "arg2"
+ [u"child"]=>
+ object(stdClass)#9 (3) {
+ [u"varInt"]=>
+ int(3)
+ [u"varString"]=>
+ unicode(4) "arg3"
+ [u"child"]=>
+ NULL
+ }
+ }
+}
+ok
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
index e66bbb7a21..57b685cce3 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
@@ -48,3 +48,31 @@ object(stdClass)#7 (3) {
}
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#7 (3) {
+ [u"varInt"]=>
+ int(1)
+ [u"varString"]=>
+ unicode(4) "arg1"
+ [u"child"]=>
+ object(stdClass)#8 (3) {
+ [u"varInt"]=>
+ int(2)
+ [u"varString"]=>
+ unicode(4) "arg2"
+ [u"child"]=>
+ object(stdClass)#9 (3) {
+ [u"varInt"]=>
+ int(3)
+ [u"varString"]=>
+ unicode(4) "arg3"
+ [u"child"]=>
+ NULL
+ }
+ }
+}
+ok
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
index 49584874d7..c70069f28c 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
@@ -48,3 +48,31 @@ object(stdClass)#7 (3) {
}
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#7 (3) {
+ [u"varInt"]=>
+ int(1)
+ [u"varString"]=>
+ unicode(4) "arg1"
+ [u"child"]=>
+ object(stdClass)#8 (3) {
+ [u"varInt"]=>
+ int(2)
+ [u"varString"]=>
+ unicode(4) "arg2"
+ [u"child"]=>
+ object(stdClass)#9 (3) {
+ [u"varInt"]=>
+ int(3)
+ [u"varString"]=>
+ unicode(4) "arg3"
+ [u"child"]=>
+ NULL
+ }
+ }
+}
+ok
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
index c9d9534070..42724884d4 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt
Binary files differ
diff --git a/ext/soap/tests/schema/schema004.phpt b/ext/soap/tests/schema/schema004.phpt
index b851f76050..d058d78bc2 100644
--- a/ext/soap/tests/schema/schema004.phpt
+++ b/ext/soap/tests/schema/schema004.phpt
@@ -17,4 +17,9 @@ echo "ok";
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(5) "123.5"
-ok \ No newline at end of file
+ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema009.phpt b/ext/soap/tests/schema/schema009.phpt
index f7d10242cc..e0e30121b4 100644
--- a/ext/soap/tests/schema/schema009.phpt
+++ b/ext/soap/tests/schema/schema009.phpt
@@ -18,3 +18,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(7) "one two"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(7) "one two"
+ok
diff --git a/ext/soap/tests/schema/schema010.phpt b/ext/soap/tests/schema/schema010.phpt
index 49136b9fe4..954d1233b8 100644
--- a/ext/soap/tests/schema/schema010.phpt
+++ b/ext/soap/tests/schema/schema010.phpt
@@ -18,3 +18,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(7) "one two"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">one two</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(7) "one two"
+ok
diff --git a/ext/soap/tests/schema/schema011.phpt b/ext/soap/tests/schema/schema011.phpt
index 8296311a46..c8e13cedd2 100644
--- a/ext/soap/tests/schema/schema011.phpt
+++ b/ext/soap/tests/schema/schema011.phpt
@@ -22,3 +22,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(7) "123 456"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(7) "123 456"
+ok
diff --git a/ext/soap/tests/schema/schema012.phpt b/ext/soap/tests/schema/schema012.phpt
index 1d542d81d8..581b457ac1 100644
--- a/ext/soap/tests/schema/schema012.phpt
+++ b/ext/soap/tests/schema/schema012.phpt
@@ -22,3 +22,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(7) "123 456"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 456</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(7) "123 456"
+ok
diff --git a/ext/soap/tests/schema/schema013.phpt b/ext/soap/tests/schema/schema013.phpt
index 4794d2d0f1..774d45d337 100644
--- a/ext/soap/tests/schema/schema013.phpt
+++ b/ext/soap/tests/schema/schema013.phpt
@@ -18,3 +18,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(3) "str"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(3) "str"
+ok
diff --git a/ext/soap/tests/schema/schema014.phpt b/ext/soap/tests/schema/schema014.phpt
index 0ffff86e6f..3e096f7cc6 100644
--- a/ext/soap/tests/schema/schema014.phpt
+++ b/ext/soap/tests/schema/schema014.phpt
@@ -18,3 +18,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(5) "123.5"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema015.phpt b/ext/soap/tests/schema/schema015.phpt
index fe9b96b8cf..4fbf19d21b 100644
--- a/ext/soap/tests/schema/schema015.phpt
+++ b/ext/soap/tests/schema/schema015.phpt
@@ -28,3 +28,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(3) "str"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(3) "str"
+ok
diff --git a/ext/soap/tests/schema/schema016.phpt b/ext/soap/tests/schema/schema016.phpt
index 462fc71404..d6e8c6e73f 100644
--- a/ext/soap/tests/schema/schema016.phpt
+++ b/ext/soap/tests/schema/schema016.phpt
@@ -28,3 +28,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(5) "123.5"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema017.phpt b/ext/soap/tests/schema/schema017.phpt
index e7674cfc41..b8d2ba4d37 100644
--- a/ext/soap/tests/schema/schema017.phpt
+++ b/ext/soap/tests/schema/schema017.phpt
@@ -25,3 +25,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(5) "123.5"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema018.phpt b/ext/soap/tests/schema/schema018.phpt
index 0f3e8b84ac..97aeb641c0 100644
--- a/ext/soap/tests/schema/schema018.phpt
+++ b/ext/soap/tests/schema/schema018.phpt
@@ -25,3 +25,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(5) "123.5"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(5) "123.5"
+ok
diff --git a/ext/soap/tests/schema/schema019.phpt b/ext/soap/tests/schema/schema019.phpt
index 0d2d753764..ba3207bda0 100644
--- a/ext/soap/tests/schema/schema019.phpt
+++ b/ext/soap/tests/schema/schema019.phpt
@@ -25,3 +25,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(11) "123.5 456.7"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(11) "123.5 456.7"
+ok
diff --git a/ext/soap/tests/schema/schema020.phpt b/ext/soap/tests/schema/schema020.phpt
index 3ceb3de625..c5b543481a 100644
--- a/ext/soap/tests/schema/schema020.phpt
+++ b/ext/soap/tests/schema/schema020.phpt
@@ -25,3 +25,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(11) "123.5 456.7"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123.5 456.7</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(11) "123.5 456.7"
+ok
diff --git a/ext/soap/tests/schema/schema021.phpt b/ext/soap/tests/schema/schema021.phpt
index 0628c6b3b8..1590dd5741 100644
--- a/ext/soap/tests/schema/schema021.phpt
+++ b/ext/soap/tests/schema/schema021.phpt
@@ -22,3 +22,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 456.7 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(19) "123 123.5 456.7 str"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 456.7 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(19) "123 123.5 456.7 str"
+ok
diff --git a/ext/soap/tests/schema/schema022.phpt b/ext/soap/tests/schema/schema022.phpt
index fd598f6243..c6dfc7cf98 100644
--- a/ext/soap/tests/schema/schema022.phpt
+++ b/ext/soap/tests/schema/schema022.phpt
@@ -22,3 +22,8 @@ echo "ok";
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
string(13) "123 123.5 str"
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType">123 123.5 str</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+unicode(13) "123 123.5 str"
+ok
diff --git a/ext/soap/tests/schema/schema030.phpt b/ext/soap/tests/schema/schema030.phpt
index e468613916..5e6856adeb 100644
--- a/ext/soap/tests/schema/schema030.phpt
+++ b/ext/soap/tests/schema/schema030.phpt
@@ -26,3 +26,13 @@ object(stdClass)#%d (2) {
string(3) "str"
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"str"]=>
+ unicode(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema031.phpt b/ext/soap/tests/schema/schema031.phpt
index 479abfee9d..cc926a2c3c 100644
--- a/ext/soap/tests/schema/schema031.phpt
+++ b/ext/soap/tests/schema/schema031.phpt
@@ -26,3 +26,13 @@ object(stdClass)#%d (2) {
string(3) "str"
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"str"]=>
+ unicode(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema032.phpt b/ext/soap/tests/schema/schema032.phpt
index 47b4af121c..36305a807e 100644
--- a/ext/soap/tests/schema/schema032.phpt
+++ b/ext/soap/tests/schema/schema032.phpt
@@ -24,3 +24,12 @@ object(stdClass)#%d (1) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+}
+ok
+
diff --git a/ext/soap/tests/schema/schema033.phpt b/ext/soap/tests/schema/schema033.phpt
index b504bc077a..72fc3bd4b0 100644
--- a/ext/soap/tests/schema/schema033.phpt
+++ b/ext/soap/tests/schema/schema033.phpt
@@ -34,3 +34,16 @@ object(stdClass)#%d (2) {
}
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><nest xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></nest></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"nest"]=>
+ object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema034.phpt b/ext/soap/tests/schema/schema034.phpt
index a83d6ea846..a67593c8a0 100644
--- a/ext/soap/tests/schema/schema034.phpt
+++ b/ext/soap/tests/schema/schema034.phpt
@@ -35,3 +35,16 @@ object(stdClass)#%d (2) {
}
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"testType2"]=>
+ object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema035.phpt b/ext/soap/tests/schema/schema035.phpt
index 8974ed00c5..f9b7c4f0cb 100644
--- a/ext/soap/tests/schema/schema035.phpt
+++ b/ext/soap/tests/schema/schema035.phpt
@@ -36,3 +36,16 @@ object(stdClass)#%d (2) {
}
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"testType2"]=>
+ object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema036.phpt b/ext/soap/tests/schema/schema036.phpt
index 9d6dac4534..ac26b7516f 100644
--- a/ext/soap/tests/schema/schema036.phpt
+++ b/ext/soap/tests/schema/schema036.phpt
@@ -35,3 +35,16 @@ object(stdClass)#%d (2) {
}
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><testType2 xsi:type="ns1:testType2"><int xsi:type="xsd:int">123</int></testType2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"testType2"]=>
+ object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema037.phpt b/ext/soap/tests/schema/schema037.phpt
index 4e59981fc9..7115ee8b0c 100644
--- a/ext/soap/tests/schema/schema037.phpt
+++ b/ext/soap/tests/schema/schema037.phpt
@@ -26,3 +26,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema038.phpt b/ext/soap/tests/schema/schema038.phpt
index 2d37e89e0b..23e9a6634e 100644
--- a/ext/soap/tests/schema/schema038.phpt
+++ b/ext/soap/tests/schema/schema038.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema039.phpt b/ext/soap/tests/schema/schema039.phpt
index 0b7ef5afc4..931b7a42a8 100644
--- a/ext/soap/tests/schema/schema039.phpt
+++ b/ext/soap/tests/schema/schema039.phpt
@@ -29,3 +29,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema040.phpt b/ext/soap/tests/schema/schema040.phpt
index f7ddc04546..f1f763222d 100644
--- a/ext/soap/tests/schema/schema040.phpt
+++ b/ext/soap/tests/schema/schema040.phpt
@@ -30,3 +30,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema041.phpt b/ext/soap/tests/schema/schema041.phpt
index 1264cf5c90..a2425803ee 100644
--- a/ext/soap/tests/schema/schema041.phpt
+++ b/ext/soap/tests/schema/schema041.phpt
@@ -29,3 +29,13 @@ object(stdClass)#%d (2) {
string(3) "str"
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"str"]=>
+ unicode(3) "str"
+}
+ok
diff --git a/ext/soap/tests/schema/schema042.phpt b/ext/soap/tests/schema/schema042.phpt
index a8aa8857d9..901db7d216 100644
--- a/ext/soap/tests/schema/schema042.phpt
+++ b/ext/soap/tests/schema/schema042.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"_"]=>
+ int(123)
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema043.phpt b/ext/soap/tests/schema/schema043.phpt
index 08c2996363..0c2e38be89 100644
--- a/ext/soap/tests/schema/schema043.phpt
+++ b/ext/soap/tests/schema/schema043.phpt
@@ -36,3 +36,15 @@ object(stdClass)#%d (3) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"_"]=>
+ int(123)
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema044.phpt b/ext/soap/tests/schema/schema044.phpt
index 8fc0705518..ee84dc1ba7 100644
--- a/ext/soap/tests/schema/schema044.phpt
+++ b/ext/soap/tests/schema/schema044.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"_"]=>
+ int(123)
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema045.phpt b/ext/soap/tests/schema/schema045.phpt
index 346a929d85..c0bc7ba89d 100644
--- a/ext/soap/tests/schema/schema045.phpt
+++ b/ext/soap/tests/schema/schema045.phpt
@@ -34,3 +34,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"_"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema046.phpt b/ext/soap/tests/schema/schema046.phpt
index 3f9d03afad..c7f0fcdbda 100644
--- a/ext/soap/tests/schema/schema046.phpt
+++ b/ext/soap/tests/schema/schema046.phpt
@@ -36,3 +36,15 @@ object(stdClass)#%d (3) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int="123" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"_"]=>
+ int(123)
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema047.phpt b/ext/soap/tests/schema/schema047.phpt
index 1265cfd3a3..cb045e44a8 100644
--- a/ext/soap/tests/schema/schema047.phpt
+++ b/ext/soap/tests/schema/schema047.phpt
@@ -32,3 +32,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema048.phpt b/ext/soap/tests/schema/schema048.phpt
index 98d4d4be44..165440a992 100644
--- a/ext/soap/tests/schema/schema048.phpt
+++ b/ext/soap/tests/schema/schema048.phpt
@@ -34,3 +34,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType" int2="123">123</testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"_"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema049.phpt b/ext/soap/tests/schema/schema049.phpt
index 7268a4b67a..dab75c353f 100644
--- a/ext/soap/tests/schema/schema049.phpt
+++ b/ext/soap/tests/schema/schema049.phpt
@@ -33,3 +33,11 @@ object(stdClass)#%d (1) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema050.phpt b/ext/soap/tests/schema/schema050.phpt
index 6c735125b7..7c2351c5c1 100644
--- a/ext/soap/tests/schema/schema050.phpt
+++ b/ext/soap/tests/schema/schema050.phpt
@@ -26,3 +26,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema051.phpt b/ext/soap/tests/schema/schema051.phpt
index 9636399814..7789f11064 100644
--- a/ext/soap/tests/schema/schema051.phpt
+++ b/ext/soap/tests/schema/schema051.phpt
@@ -31,3 +31,18 @@ object(stdClass)#%d (2) {
}
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2><int2 xsi:type="xsd:int">456</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ array(2) {
+ [0]=>
+ int(123)
+ [1]=>
+ int(456)
+ }
+}
+ok
diff --git a/ext/soap/tests/schema/schema052.phpt b/ext/soap/tests/schema/schema052.phpt
index 8e7121ae2d..fe4961d333 100644
--- a/ext/soap/tests/schema/schema052.phpt
+++ b/ext/soap/tests/schema/schema052.phpt
@@ -26,3 +26,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int><int2 xsi:type="xsd:int">123</int2></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"int"]=>
+ int(123)
+ [u"int2"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema053.phpt b/ext/soap/tests/schema/schema053.phpt
index 8893bf5df3..6e714bd152 100644
--- a/ext/soap/tests/schema/schema053.phpt
+++ b/ext/soap/tests/schema/schema053.phpt
@@ -24,3 +24,11 @@ object(stdClass)#%d (1) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><int xsi:type="xsd:int">123</int></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (1) {
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema054.phpt b/ext/soap/tests/schema/schema054.phpt
index b1ff74e419..9b31efa6c2 100644
--- a/ext/soap/tests/schema/schema054.phpt
+++ b/ext/soap/tests/schema/schema054.phpt
@@ -19,3 +19,13 @@ array(2) {
float(123.5)
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [u"a"]=>
+ int(123)
+ [u"b"]=>
+ float(123.5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema055.phpt b/ext/soap/tests/schema/schema055.phpt
index f6ead2f13d..750b647557 100644
--- a/ext/soap/tests/schema/schema055.phpt
+++ b/ext/soap/tests/schema/schema055.phpt
@@ -26,3 +26,13 @@ array(2) {
float(123.5)
}
ok
+--UEXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns2:Map"><item><key xsi:type="xsd:string">a</key><value xsi:type="xsd:int">123</value></item><item><key xsi:type="xsd:string">b</key><value xsi:type="xsd:float">123.5</value></item></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+array(2) {
+ [u"a"]=>
+ int(123)
+ [u"b"]=>
+ float(123.5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema062.phpt b/ext/soap/tests/schema/schema062.phpt
index 60b06568ed..13c706d827 100644
--- a/ext/soap/tests/schema/schema062.phpt
+++ b/ext/soap/tests/schema/schema062.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:nil="true" int="123" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"_"]=>
+ NULL
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema064.phpt b/ext/soap/tests/schema/schema064.phpt
index 53e1b257be..0d9fc4a63c 100644
--- a/ext/soap/tests/schema/schema064.phpt
+++ b/ext/soap/tests/schema/schema064.phpt
@@ -55,3 +55,25 @@ object(stdClass)#%d (8) {
string(7) "--04--Z"
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam xsi:type="ns1:testType"><dateTime xsi:type="xsd:dateTime">1976-04-05T01:02:03Z</dateTime><time xsi:type="xsd:time">01:02:03Z</time><date xsi:type="xsd:date">1976-04-05Z</date><gYearMonth xsi:type="xsd:gYearMonth">1976-04Z</gYearMonth><gYear xsi:type="xsd:gYear">1976Z</gYear><gMonthDay xsi:type="xsd:gMonthDay">--04-05Z</gMonthDay><gDay xsi:type="xsd:gDay">---05Z</gDay><gMonth xsi:type="xsd:gMonth">--04--Z</gMonth></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (8) {
+ [u"dateTime"]=>
+ unicode(20) "1976-04-05T01:02:03Z"
+ [u"time"]=>
+ unicode(9) "01:02:03Z"
+ [u"date"]=>
+ unicode(11) "1976-04-05Z"
+ [u"gYearMonth"]=>
+ unicode(8) "1976-04Z"
+ [u"gYear"]=>
+ unicode(5) "1976Z"
+ [u"gMonthDay"]=>
+ unicode(8) "--04-05Z"
+ [u"gDay"]=>
+ unicode(6) "---05Z"
+ [u"gMonth"]=>
+ unicode(7) "--04--Z"
+}
+ok
diff --git a/ext/soap/tests/schema/schema065.phpt b/ext/soap/tests/schema/schema065.phpt
index 3199a6bc8f..6269e1c3da 100644
--- a/ext/soap/tests/schema/schema065.phpt
+++ b/ext/soap/tests/schema/schema065.phpt
@@ -24,3 +24,13 @@ object(stdClass)#%d (2) {
int(5)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema066.phpt b/ext/soap/tests/schema/schema066.phpt
index 7fe47bbd2c..ac1d5d7f03 100644
--- a/ext/soap/tests/schema/schema066.phpt
+++ b/ext/soap/tests/schema/schema066.phpt
@@ -24,3 +24,13 @@ object(stdClass)#%d (2) {
int(5)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema067.phpt b/ext/soap/tests/schema/schema067.phpt
index 5ee0036ebe..29b33388ea 100644
--- a/ext/soap/tests/schema/schema067.phpt
+++ b/ext/soap/tests/schema/schema067.phpt
@@ -24,3 +24,13 @@ object(stdClass)#%d (2) {
int(5)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" int="5" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema069.phpt b/ext/soap/tests/schema/schema069.phpt
index ccaa342406..a2d5aa4527 100644
--- a/ext/soap/tests/schema/schema069.phpt
+++ b/ext/soap/tests/schema/schema069.phpt
@@ -25,3 +25,13 @@ object(stdClass)#%d (2) {
int(5)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema070.phpt b/ext/soap/tests/schema/schema070.phpt
index 0c1e249392..254f89bddf 100644
--- a/ext/soap/tests/schema/schema070.phpt
+++ b/ext/soap/tests/schema/schema070.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(5)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam str="str" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(5)
+}
+ok
diff --git a/ext/soap/tests/schema/schema074.phpt b/ext/soap/tests/schema/schema074.phpt
index 3dbba0cd25..3f609592c2 100644
--- a/ext/soap/tests/schema/schema074.phpt
+++ b/ext/soap/tests/schema/schema074.phpt
@@ -27,3 +27,13 @@ object(stdClass)#%d (2) {
int(123)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int="123" xsi:type="ns1:testType"><str xsi:type="xsd:string">str</str></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (2) {
+ [u"str"]=>
+ unicode(3) "str"
+ [u"int"]=>
+ int(123)
+}
+ok
diff --git a/ext/soap/tests/schema/schema075.phpt b/ext/soap/tests/schema/schema075.phpt
index 5867e55a7c..04bff24424 100644
--- a/ext/soap/tests/schema/schema075.phpt
+++ b/ext/soap/tests/schema/schema075.phpt
@@ -28,3 +28,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam ns1:int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema076.phpt b/ext/soap/tests/schema/schema076.phpt
index 3ad2eae33a..e24342ab57 100644
--- a/ext/soap/tests/schema/schema076.phpt
+++ b/ext/soap/tests/schema/schema076.phpt
@@ -28,3 +28,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema077.phpt b/ext/soap/tests/schema/schema077.phpt
index 16057cfcf9..faa4513406 100644
--- a/ext/soap/tests/schema/schema077.phpt
+++ b/ext/soap/tests/schema/schema077.phpt
@@ -28,3 +28,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><testParam int1="1" ns1:int2="2" int3="3" xsi:type="ns1:testType"/></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema078.phpt b/ext/soap/tests/schema/schema078.phpt
index 7636a78f93..94446acfdc 100644
--- a/ext/soap/tests/schema/schema078.phpt
+++ b/ext/soap/tests/schema/schema078.phpt
@@ -30,3 +30,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><ns1:int1>1</ns1:int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema079.phpt b/ext/soap/tests/schema/schema079.phpt
index 34dcd9bee7..2f5b92ab74 100644
--- a/ext/soap/tests/schema/schema079.phpt
+++ b/ext/soap/tests/schema/schema079.phpt
@@ -30,3 +30,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/schema080.phpt b/ext/soap/tests/schema/schema080.phpt
index 7519d6a30d..0db777eb68 100644
--- a/ext/soap/tests/schema/schema080.phpt
+++ b/ext/soap/tests/schema/schema080.phpt
@@ -30,3 +30,15 @@ object(stdClass)#%d (3) {
int(3)
}
ok
+--UEXPECTF--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/"><SOAP-ENV:Body><ns1:test><testParam><int1>1</int1><ns1:int2>2</ns1:int2><int3>3</int3></testParam></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope>
+object(stdClass)#%d (3) {
+ [u"int1"]=>
+ int(1)
+ [u"int2"]=>
+ int(2)
+ [u"int3"]=>
+ int(3)
+}
+ok
diff --git a/ext/soap/tests/schema/test_schema.inc b/ext/soap/tests/schema/test_schema.inc
index e1d4eeb508..63214f23f0 100644
--- a/ext/soap/tests/schema/test_schema.inc
+++ b/ext/soap/tests/schema/test_schema.inc
@@ -52,7 +52,7 @@ EOF;
$fname = tempnam ("./", "wsdl");
$f = fopen($fname,"w");
- fwrite($f,$wsdl);
+ @fwrite($f,$wsdl);
fclose($f);
ini_set("soap.wsdl_cache_enabled",0);
$x = new SoapClient($fname, array("trace"=>1,"exceptions"=>0));
diff --git a/ext/soap/tests/server007.phpt b/ext/soap/tests/server007.phpt
index 676aa56c44..cdbd5d22e0 100644
--- a/ext/soap/tests/server007.phpt
+++ b/ext/soap/tests/server007.phpt
@@ -24,3 +24,11 @@ array(2) {
string(3) "Add"
}
ok
+--UEXPECT--
+array(2) {
+ [0]=>
+ unicode(3) "Sub"
+ [1]=>
+ unicode(3) "Add"
+}
+ok
diff --git a/ext/soap/tests/server008.phpt b/ext/soap/tests/server008.phpt
index 87fb69d25f..42a9c077ce 100644
--- a/ext/soap/tests/server008.phpt
+++ b/ext/soap/tests/server008.phpt
@@ -27,3 +27,11 @@ array(2) {
string(4) "test"
}
ok
+--UEXPECT--
+array(2) {
+ [0]=>
+ unicode(3) "Foo"
+ [1]=>
+ unicode(4) "test"
+}
+ok