cvs: php-src /ext/soap php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_soap.h soap.c /ext/soap/tests any.phpt classmap002.phpt
server007.phpt server008.phpt /ext/soap/tests/bugs bug27722.phpt bug27742.phpt bug28751.phpt bug28969.phpt bug28985.phpt bug29061.phpt bug29109.phpt
bug29236.phpt bug29795.phpt bug29830.phpt bug29839.phpt bug29844.phpt bug30045.phpt bug30106.phpt bug30175.phpt bug30799.phpt bug30928.phpt
bug30994.phpt bug31422.phpt bug31695.phpt bug31755.phpt bug32776.phpt bug34449.phpt bug34453.phpt bug34643.phpt bug35142.phpt bug36226.phpt
bug36575.phpt bug36629.phpt bug36908.phpt bug37278.phpt bug38004.phpt bug38005.phpt bug38055.phpt bug38067.phpt /ext/soap/tests/interop/Round2/Base
r2_base_005p.phpt r2_base_005s.phpt r2_base_005w.phpt /ext/soap/tests/interop/Round3/GroupE r3_groupE_list_001w.phpt r3_groupE_list_002w.phpt
r3_groupE_list_003w.phpt r3_groupE_list_005w.phpt r3_groupE_list_006w.phpt /ext/soap/tests/interop/Round4/! GroupI r4_groupI_xsd_006w.phpt
/ext/soap/tests/schema schema004.phpt schema009.phpt schema010.phpt schema011.phpt schema012.phpt schema013.phpt schema014.phpt schema015.phpt
schema016.phpt schema017.phpt schema018.phpt schema019.phpt schema020.phpt schema021.phpt schema022.phpt schema030.phpt schema031.phpt schema032.phpt
schema033.phpt schema034.phpt schema035.phpt schema036.phpt schema037.phpt schema038.phpt schema039.phpt schema040.phpt schema041.phpt schema042.phpt
schema043.phpt schema044.phpt schema045.phpt schema046.phpt schema047.phpt schema048.phpt schema049.phpt schema050.phpt schema051.phpt schema052.phpt
schema053.phpt schema054.phpt schema055.phpt schema062.phpt schema064.phpt schema065.phpt schema066.phpt schema067.phpt schema069.phpt schema070.phpt
schema074.phpt schema075.phpt schema076.phpt schema077.phpt schema078.phpt schema079.phpt schema080.phpt test_schema.inc
| From: | Dmitry Stogov | Date: | Thu, 13 Jul 2006 16:47:27 +0000 |
| Subject: | cvs: php-src /ext/soap php_encoding.c php_http.c php_packet_soap.c php_schema.c php_sdl.c php_soap.h soap.c /ext/soap/tests any.phpt classmap002.phpt server007.phpt server008.phpt /ext/soap/tests/bugs bug27722.phpt bug27742.phpt bug28751.phpt bug28969.phpt bug28985.phpt bug29061.phpt bug29109.phpt bug29236.phpt bug29795.phpt bug29830.phpt bug29839.phpt bug29844.phpt bug30045.phpt bug30106.phpt bug30175.phpt bug30799.phpt bug30928.phpt bug30994.phpt bug31422.phpt bug31695.phpt bug31755.phpt bug32776.phpt bug34449.phpt bug34453.phpt bug34643.phpt bug35142.phpt bug36226.phpt bug36575.phpt bug36629.phpt bug36908.phpt bug37278.phpt bug38004.phpt bug38005.phpt bug38055.phpt bug38067.phpt /ext/soap/tests/interop/Round2/Base r2_base_005p.phpt r2_base_005s.phpt r2_base_005w.phpt /ext/soap/tests/interop/Round3/GroupE r3_groupE_list_001w.phpt r3_groupE_list_002w.phpt r3_groupE_list_003w.phpt r3_groupE_list_005w.phpt r3_groupE_list_006w.phpt /ext/soap/tests/interop/Round4/! GroupI r4_groupI_xsd_006w.phpt /ext/soap/tests/schema schema004.phpt schema009.phpt schema010.phpt schema011.phpt schema012.phpt schema013.phpt schema014.phpt schema015.phpt schema016.phpt schema017.phpt schema018.phpt schema019.phpt schema020.phpt schema021.phpt schema022.phpt schema030.phpt schema031.phpt schema032.phpt schema033.phpt schema034.phpt schema035.phpt schema036.phpt schema037.phpt schema038.phpt schema039.phpt schema040.phpt schema041.phpt schema042.phpt schema043.phpt schema044.phpt schema045.phpt schema046.phpt schema047.phpt schema048.phpt schema049.phpt schema050.phpt schema051.phpt schema052.phpt schema053.phpt schema054.phpt schema055.phpt schema062.phpt schema064.phpt schema065.phpt schema066.phpt schema067.phpt schema069.phpt schema070.phpt schema074.phpt schema075.phpt schema076.phpt schema077.phpt schema078.phpt schema079.phpt schema080.phpt test_schema.inc |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-39219@lists.php.net to get a copy of this message | ||
dmitry Thu Jul 13 16:47:27 2006 UTC
Modified files:
/php-src/ext/soap php_encoding.c php_http.c php_packet_soap.c
php_schema.c php_sdl.c php_soap.h soap.c
/php-src/ext/soap/tests any.phpt classmap002.phpt server007.phpt
server008.phpt
/php-src/ext/soap/tests/bugs bug27722.phpt bug27742.phpt
bug28751.phpt bug28969.phpt
bug28985.phpt bug29061.phpt
bug29109.phpt bug29236.phpt
bug29795.phpt bug29830.phpt
bug29839.phpt bug29844.phpt
bug30045.phpt bug30106.phpt
bug30175.phpt bug30799.phpt
bug30928.phpt bug30994.phpt
bug31422.phpt bug31695.phpt
bug31755.phpt bug32776.phpt
bug34449.phpt bug34453.phpt
bug34643.phpt bug35142.phpt
bug36226.phpt bug36575.phpt
bug36629.phpt bug36908.phpt
bug37278.phpt bug38004.phpt
bug38005.phpt bug38055.phpt
bug38067.phpt
/php-src/ext/soap/tests/interop/Round2/Base r2_base_005p.phpt
r2_base_005s.phpt
r2_base_005w.phpt
/php-src/ext/soap/tests/interop/Round3/GroupE
r3_groupE_list_001w.phpt
r3_groupE_list_002w.phpt
r3_groupE_list_003w.phpt
r3_groupE_list_005w.phpt
r3_groupE_list_006w.phpt
/php-src/ext/soap/tests/interop/Round4/GroupI
r4_groupI_xsd_006w.phpt
/php-src/ext/soap/tests/schema schema004.phpt schema009.phpt
schema010.phpt schema011.phpt
schema012.phpt schema013.phpt
schema014.phpt schema015.phpt
schema016.phpt schema017.phpt
schema018.phpt schema019.phpt
schema020.phpt schema021.phpt
schema022.phpt schema030.phpt
schema031.phpt schema032.phpt
schema033.phpt schema034.phpt
schema035.phpt schema036.phpt
schema037.phpt schema038.phpt
schema039.phpt schema040.phpt
schema041.phpt schema042.phpt
schema043.phpt schema044.phpt
schema045.phpt schema046.phpt
schema047.phpt schema048.phpt
schema049.phpt schema050.phpt
schema051.phpt schema052.phpt
schema053.phpt schema054.phpt
schema055.phpt schema062.phpt
schema064.phpt schema065.phpt
schema066.phpt schema067.phpt
schema069.phpt schema070.phpt
schema074.phpt schema075.phpt
schema076.phpt schema077.phpt
schema078.phpt schema079.phpt
schema080.phpt test_schema.inc
Log:
Unicode support (not finished)
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.134&r2=1.135&diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.134 php-src/ext/soap/php_encoding.c:1.135 --- php-src/ext/soap/php_encoding.c:1.134 Wed Jul 12 09:00:15 2006 +++ php-src/ext/soap/php_encoding.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.134 2006/07/12 09:00:15 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.135 2006/07/13 16:47:25 dmitry Exp $ */ #include <time.h> @@ -128,6 +128,7 @@ {{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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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); - } 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); - } + 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 { + 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; - 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; + 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 (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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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.s)); + } else if (key_type == HASH_KEY_IS_UNICODE) { + char *str; + TSRMLS_FETCH(); + if (style == SOAP_ENCODED) { set_xsi_type(key, "xsd:string"); } - xmlNodeSetContent(key, BAD_CAST(key_val)); + 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 @@ 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 @@ 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 @@ { 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 @@ 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)); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.92&r2=1.93&diff_format=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.92 php-src/ext/soap/php_http.c:1.93 --- php-src/ext/soap/php_http.c:1.92 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_http.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.92 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_http.c,v 1.93 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -630,7 +630,7 @@ /* 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 @@ 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 @@ (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, ';'); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_packet_soap.c?r1=1.45&r2=1.46&diff_format=u Index: php-src/ext/soap/php_packet_soap.c diff -u php-src/ext/soap/php_packet_soap.c:1.45 php-src/ext/soap/php_packet_soap.c:1.46 --- php-src/ext/soap/php_packet_soap.c:1.45 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_packet_soap.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.c,v 1.45 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_packet_soap.c,v 1.46 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" @@ -192,15 +192,25 @@ 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 @@ 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); + } } } http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_schema.c?r1=1.66&r2=1.67&diff_format=u Index: php-src/ext/soap/php_schema.c diff -u php-src/ext/soap/php_schema.c:1.66 php-src/ext/soap/php_schema.c:1.67 --- php-src/ext/soap/php_schema.c:1.66 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_schema.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.c,v 1.66 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_schema.c,v 1.67 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "libxml/uri.h" @@ -2070,7 +2070,7 @@ 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 @@ } 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 { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.102&r2=1.103&diff_format=u Index: php-src/ext/soap/php_sdl.c diff -u php-src/ext/soap/php_sdl.c:1.102 php-src/ext/soap/php_sdl.c:1.103 --- php-src/ext/soap/php_sdl.c:1.102 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_sdl.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c,v 1.102 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.103 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -1063,7 +1063,7 @@ 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_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 @@ encodePtr *penc; sdlTypePtr *ptype; ulong index; - char *key; + zstr key; uint key_len; pheaders = malloc(sizeof(HashTable)); @@ -2367,7 +2367,7 @@ } 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 @@ sdlTypePtr *ptype; encodePtr *penc; ulong index; - char *key; + zstr key; uint key_len; pparams = malloc(sizeof(HashTable)); @@ -2428,7 +2428,7 @@ } 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 @@ HashTable *pfaults; sdlFaultPtr *tmp, pfault; ulong index; - char *key; + zstr key; uint key_len; pfaults = malloc(sizeof(HashTable)); @@ -2477,7 +2477,7 @@ } 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 @@ { sdlAttributePtr pattr; ulong index; - char *key; + zstr key; uint key_len; pattr = malloc(sizeof(sdlAttribute)); @@ -2541,7 +2541,7 @@ } 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 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } *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 @@ 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) { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_soap.h?r1=1.44&r2=1.45&diff_format=u Index: php-src/ext/soap/php_soap.h diff -u php-src/ext/soap/php_soap.h:1.44 php-src/ext/soap/php_soap.h:1.45 --- php-src/ext/soap/php_soap.h:1.44 Wed Apr 19 10:49:16 2006 +++ php-src/ext/soap/php_soap.h Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_soap.h,v 1.44 2006/04/19 10:49:16 dmitry Exp $ */ +/* $Id: php_soap.h,v 1.45 2006/07/13 16:47:25 dmitry Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H @@ -222,4 +222,6 @@ #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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.194&r2=1.195&diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.194 php-src/ext/soap/soap.c:1.195 --- php-src/ext/soap/soap.c:1.194 Tue Jul 11 14:36:05 2006 +++ php-src/ext/soap/soap.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c,v 1.194 2006/07/11 14:36:05 dmitry Exp $ */ +/* $Id: soap.c,v 1.195 2006/07/13 16:47:25 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -395,6 +395,17 @@ # 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 @@ 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 @@ 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 @@ 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(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 @@ } } - 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 @@ 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 @@ 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 @@ service->uri = estrdup("http://unknown-uri/"); } } + efree(wsdl); } ret = zend_list_insert(service, le_service); @@ -1226,9 +1302,9 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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] = ¶m; - 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] = ¶m; - 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] = ¶m; + 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] = ¶m; + 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 @@ /* 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_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 @@ } 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 @@ 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 @@ } 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_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 @@ 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 @@ 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 @@ } 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 @@ } } 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 @@ } } 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 @@ 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 @@ 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 @@ xmlCharEncodingHandlerPtr old_encoding; HashTable *old_class_map; int old_features; + int free_location = 0; SOAP_CLIENT_BEGIN_CODE(); @@ -2458,10 +2599,14 @@ } 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 @@ } 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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), ¶m_name, ¶m_name_len, ¶m_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), ¶m_name, ¶m_name_len, ¶m_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 @@ } } } + if (param_name_type == IS_UNICODE) { + efree(param_name.v); + } zend_hash_move_forward_ex(Z_ARRVAL_P(ret), &pos); i++; http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/any.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/any.phpt diff -u php-src/ext/soap/tests/any.phpt:1.1 php-src/ext/soap/tests/any.phpt:1.2 --- php-src/ext/soap/tests/any.phpt:1.1 Tue Nov 1 11:11:19 2005 +++ php-src/ext/soap/tests/any.phpt Thu Jul 13 16:47:25 2006 @@ -81,3 +81,32 @@ } } } +--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) + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/classmap002.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/classmap002.phpt diff -u php-src/ext/soap/tests/classmap002.phpt:1.3 php-src/ext/soap/tests/classmap002.phpt:1.4 --- php-src/ext/soap/tests/classmap002.phpt:1.3 Wed Apr 20 06:36:09 2005 +++ php-src/ext/soap/tests/classmap002.phpt Thu Jul 13 16:47:25 2006 @@ -42,3 +42,11 @@ string(3) "aap" } ok +--UEXPECT-- +object(book)#2 (2) { + [u"a"]=> + unicode(5) "Blaat" + [u"b"]=> + unicode(3) "aap" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/server007.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/server007.phpt diff -u php-src/ext/soap/tests/server007.phpt:1.2 php-src/ext/soap/tests/server007.phpt:1.3 --- php-src/ext/soap/tests/server007.phpt:1.2 Thu Feb 5 20:26:03 2004 +++ php-src/ext/soap/tests/server007.phpt Thu Jul 13 16:47:25 2006 @@ -24,3 +24,11 @@ string(3) "Add" } ok +--UEXPECT-- +array(2) { + [0]=> + unicode(3) "Sub" + [1]=> + unicode(3) "Add" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/server008.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/server008.phpt diff -u php-src/ext/soap/tests/server008.phpt:1.2 php-src/ext/soap/tests/server008.phpt:1.3 --- php-src/ext/soap/tests/server008.phpt:1.2 Thu Feb 5 20:26:03 2004 +++ php-src/ext/soap/tests/server008.phpt Thu Jul 13 16:47:25 2006 @@ -27,3 +27,11 @@ string(4) "test" } ok +--UEXPECT-- +array(2) { + [0]=> + unicode(3) "Foo" + [1]=> + unicode(4) "test" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug27722.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug27722.phpt diff -u php-src/ext/soap/tests/bugs/bug27722.phpt:1.1 php-src/ext/soap/tests/bugs/bug27722.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug27722.phpt:1.1 Thu Apr 1 13:42:38 2004 +++ php-src/ext/soap/tests/bugs/bug27722.phpt Thu Jul 13 16:47:25 2006 @@ -1,13 +1,13 @@ ---TEST-- -Bug #27722 (Segfault on schema without targetNamespace) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---GET-- -wsdl ---FILE-- -<?php -$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); -echo "ok\n"; -?> ---EXPECT-- +--TEST-- +Bug #27722 (Segfault on schema without targetNamespace) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); +echo "ok\n"; +?> +--EXPECT-- ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug27742.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug27742.phpt diff -u php-src/ext/soap/tests/bugs/bug27742.phpt:1.1 php-src/ext/soap/tests/bugs/bug27742.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug27742.phpt:1.1 Fri Apr 2 06:23:51 2004 +++ php-src/ext/soap/tests/bugs/bug27742.phpt Thu Jul 13 16:47:25 2006 @@ -1,13 +1,13 @@ ---TEST-- -Bug #27742 (WDSL SOAP Parsing Schema bug) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---GET-- -wsdl ---FILE-- -<?php -$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); -echo "ok\n"; -?> ---EXPECT-- -ok +--TEST-- +Bug #27742 (WDSL SOAP Parsing Schema bug) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28751.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28751.phpt diff -u php-src/ext/soap/tests/bugs/bug28751.phpt:1.1 php-src/ext/soap/tests/bugs/bug28751.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug28751.phpt:1.1 Tue Jul 6 07:30:33 2004 +++ php-src/ext/soap/tests/bugs/bug28751.phpt Thu Jul 13 16:47:25 2006 @@ -1,38 +1,38 @@ ---TEST-- -Bug #28751 (SoapServer does not call _autoload()) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function __autoload($className) { - class SoapServerActions { - function test() { - return "Hello World"; - } - } -} - -$server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); -$server->setClass("SoapServerActions"); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #28751 (SoapServer does not call _autoload()) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function __autoload($className) { + class SoapServerActions { + function test() { + return "Hello World"; + } + } +} + +$server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); +$server->setClass("SoapServerActions"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28969.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28969.phpt diff -u php-src/ext/soap/tests/bugs/bug28969.phpt:1.2 php-src/ext/soap/tests/bugs/bug28969.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug28969.phpt:1.2 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug28969.phpt Thu Jul 13 16:47:25 2006 @@ -1,38 +1,47 @@ ---TEST-- -Bug #28969 (Wrong data encoding of special characters) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function test() { - return "¦è¥"; -// return utf8_encode("¦è¥"); -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$x = new LocalSoapClient(NULL,array('location'=>'test://', - 'uri'=>'http://testuri.org', - 'encoding'=>'ISO-8859-1')); -var_dump($x->test()); -echo "ok\n"; -?> ---EXPECT-- -string(3) "¦è¥" -ok +--TEST-- +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() { + return "¦è¥"; +// return utf8_encode("¦è¥"); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28985.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28985.phpt diff -u php-src/ext/soap/tests/bugs/bug28985.phpt:1.1 php-src/ext/soap/tests/bugs/bug28985.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug28985.phpt:1.1 Mon Jul 19 14:55:35 2004 +++ php-src/ext/soap/tests/bugs/bug28985.phpt Thu Jul 13 16:47:25 2006 @@ -1,204 +1,399 @@ ---TEST-- -Bug #28985 (__getTypes() returning nothing on complex WSDL) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); -var_dump($client->__getTypes()); -?> ---EXPECT-- -array(42) { - [0]=> - string(100) "struct LoginMGDIS { - string iUserLogin; - string iUserId; - string iUserPassword; - string iProfilId; -}" - [1]=> - string(29) "struct LoginMGDISResponse { -}" - [2]=> - string(28) "struct GetIdentification { -}" - [3]=> - string(77) "struct GetIdentificationResponse { - ArrayOfAnyType GetIdentificationResult; -}" - [4]=> - string(43) "struct ArrayOfAnyType { - anyType anyType; -}" - [5]=> - string(37) "struct RollbackCurrentTransaction { -}" - [6]=> - string(45) "struct RollbackCurrentTransactionResponse { -}" - [7]=> - string(68) "struct GetListeProfil { - string iUserLogin; - string iUserPassword; -}" - [8]=> - string(86) "struct MGCodeLibelle { - string Code; - string Libelle; - boolean Defaut; - anyType Tag; -}" - [9]=> - string(61) "struct ArrayOfMGCodeLibelle { - MGCodeLibelle MGCodeLibelle; -}" - [10]=> - string(77) "struct GetListeProfilResponse { - ArrayOfMGCodeLibelle GetListeProfilResult; -}" - [11]=> - string(41) "struct GetListeValCodif { - string Code; -}" - [12]=> - string(43) "struct ArrayOfMGCodif { - MGCodif MGCodif; -}" - [13]=> - string(18) "struct MGCodif { -}" - [14]=> - string(75) "struct GetListeValCodifResponse { - ArrayOfMGCodif GetListeValCodifResult; -}" - [15]=> - string(39) "struct TestPhpSoap { - MGCodif entree; -}" - [16]=> - string(57) "struct TestPhpSoapResponse { - string TestPhpSoapResult; -}" - [17]=> - string(50) "struct GetListeCodif { - boolean iGetListeValeur; -}" - [18]=> - string(87) "struct MGCodifGrp { - string TypeCodif; - string LibCodif; - ArrayOfMGCodif ListeCodifs; -}" - [19]=> - string(52) "struct ArrayOfMGCodifGrp { - MGCodifGrp MGCodifGrp; -}" - [20]=> - string(72) "struct GetListeCodifResponse { - ArrayOfMGCodifGrp GetListeCodifResult; -}" - [21]=> - string(57) "struct DroitCreation { - string iObjet; - string iProfil; -}" - [22]=> - string(62) "struct DroitCreationResponse { - boolean DroitCreationResult; -}" - [23]=> - string(74) "struct ListeDroitCreation { - ArrayOfString iListeObjet; - string iProfil; -}" - [24]=> - string(40) "struct ArrayOfString { - string string; -}" - [25]=> - string(79) "struct ListeDroitCreationResponse { - ArrayOfAnyType ListeDroitCreationResult; -}" - [26]=> - string(87) "struct GetDroitsObjetProtege { - string iObjet; - string iProfil; - string iUtilisateur; -}" - [27]=> - string(154) "struct MGDroitsObjetProtege { - string LbUti; - string LbProf; - string LbServ; - string LbDir; - boolean isProtected; - ArrayOfMGDroitAcces ListeDroitsAcces; -}" - [28]=> - string(58) "struct ArrayOfMGDroitAcces { - MGDroitAcces MGDroitAcces; -}" - [29]=> - string(104) "struct MGDroitAcces { - string IdProfil; - boolean Lecture; - boolean Modification; - boolean Suppression; -}" - [30]=> - string(91) "struct GetDroitsObjetProtegeResponse { - MGDroitsObjetProtege GetDroitsObjetProtegeResult; -}" - [31]=> - string(76) "struct GetPrivileges { - string iIdSupport; - int iIdForme; - string iProfil; -}" - [32]=> - string(68) "struct GetPrivilegesResponse { - ArrayOfString GetPrivilegesResult; -}" - [33]=> - string(46) "struct GetLibelleProfil { - string iIdProfil; -}" - [34]=> - string(67) "struct GetLibelleProfilResponse { - string GetLibelleProfilResult; -}" - [35]=> - string(91) "struct GetValeurRecherche { - string iChampSource; - string iTable; - string iOrderByClause; -}" - [36]=> - string(78) "struct GetValeurRechercheResponse { - ArrayOfString GetValeurRechercheResult; -}" - [37]=> - string(128) "struct GetValeurRechercheWithClauseWhere { - string iChampSource; - string iTable; - string iClauseWhere; - string iOrderByClause; -}" - [38]=> - string(108) "struct GetValeurRechercheWithClauseWhereResponse { - ArrayOfString GetValeurRechercheWithClauseWhereResult; -}" - [39]=> - string(27) "struct GetEnvironnement { -}" - [40]=> - string(106) "struct MGEnvironnement { - string RepBureautique; - string RepBureautiqueImage; - string RepBureautiqueDoc; -}" - [41]=> - string(76) "struct GetEnvironnementResponse { - MGEnvironnement GetEnvironnementResult; -}" +--TEST-- +Bug #28985 (__getTypes() returning nothing on complex WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); +var_dump($client->__getTypes()); +?> +--EXPECT-- +array(42) { + [0]=> + string(100) "struct LoginMGDIS { + string iUserLogin; + string iUserId; + string iUserPassword; + string iProfilId; +}" + [1]=> + string(29) "struct LoginMGDISResponse { +}" + [2]=> + string(28) "struct GetIdentification { +}" + [3]=> + string(77) "struct GetIdentificationResponse { + ArrayOfAnyType GetIdentificationResult; +}" + [4]=> + string(43) "struct ArrayOfAnyType { + anyType anyType; +}" + [5]=> + string(37) "struct RollbackCurrentTransaction { +}" + [6]=> + string(45) "struct RollbackCurrentTransactionResponse { +}" + [7]=> + string(68) "struct GetListeProfil { + string iUserLogin; + string iUserPassword; +}" + [8]=> + string(86) "struct MGCodeLibelle { + string Code; + string Libelle; + boolean Defaut; + anyType Tag; +}" + [9]=> + string(61) "struct ArrayOfMGCodeLibelle { + MGCodeLibelle MGCodeLibelle; +}" + [10]=> + string(77) "struct GetListeProfilResponse { + ArrayOfMGCodeLibelle GetListeProfilResult; +}" + [11]=> + string(41) "struct GetListeValCodif { + string Code; +}" + [12]=> + string(43) "struct ArrayOfMGCodif { + MGCodif MGCodif; +}" + [13]=> + string(18) "struct MGCodif { +}" + [14]=> + string(75) "struct GetListeValCodifResponse { + ArrayOfMGCodif GetListeValCodifResult; +}" + [15]=> + string(39) "struct TestPhpSoap { + MGCodif entree; +}" + [16]=> + string(57) "struct TestPhpSoapResponse { + string TestPhpSoapResult; +}" + [17]=> + string(50) "struct GetListeCodif { + boolean iGetListeValeur; +}" + [18]=> + string(87) "struct MGCodifGrp { + string TypeCodif; + string LibCodif; + ArrayOfMGCodif ListeCodifs; +}" + [19]=> + string(52) "struct ArrayOfMGCodifGrp { + MGCodifGrp MGCodifGrp; +}" + [20]=> + string(72) "struct GetListeCodifResponse { + ArrayOfMGCodifGrp GetListeCodifResult; +}" + [21]=> + string(57) "struct DroitCreation { + string iObjet; + string iProfil; +}" + [22]=> + string(62) "struct DroitCreationResponse { + boolean DroitCreationResult; +}" + [23]=> + string(74) "struct ListeDroitCreation { + ArrayOfString iListeObjet; + string iProfil; +}" + [24]=> + string(40) "struct ArrayOfString { + string string; +}" + [25]=> + string(79) "struct ListeDroitCreationResponse { + ArrayOfAnyType ListeDroitCreationResult; +}" + [26]=> + string(87) "struct GetDroitsObjetProtege { + string iObjet; + string iProfil; + string iUtilisateur; +}" + [27]=> + string(154) "struct MGDroitsObjetProtege { + string LbUti; + string LbProf; + string LbServ; + string LbDir; + boolean isProtected; + ArrayOfMGDroitAcces ListeDroitsAcces; +}" + [28]=> + string(58) "struct ArrayOfMGDroitAcces { + MGDroitAcces MGDroitAcces; +}" + [29]=> + string(104) "struct MGDroitAcces { + string IdProfil; + boolean Lecture; + boolean Modification; + boolean Suppression; +}" + [30]=> + string(91) "struct GetDroitsObjetProtegeResponse { + MGDroitsObjetProtege GetDroitsObjetProtegeResult; +}" + [31]=> + string(76) "struct GetPrivileges { + string iIdSupport; + int iIdForme; + string iProfil; +}" + [32]=> + string(68) "struct GetPrivilegesResponse { + ArrayOfString GetPrivilegesResult; +}" + [33]=> + string(46) "struct GetLibelleProfil { + string iIdProfil; +}" + [34]=> + string(67) "struct GetLibelleProfilResponse { + string GetLibelleProfilResult; +}" + [35]=> + string(91) "struct GetValeurRecherche { + string iChampSource; + string iTable; + string iOrderByClause; +}" + [36]=> + string(78) "struct GetValeurRechercheResponse { + ArrayOfString GetValeurRechercheResult; +}" + [37]=> + string(128) "struct GetValeurRechercheWithClauseWhere { + string iChampSource; + string iTable; + string iClauseWhere; + string iOrderByClause; +}" + [38]=> + string(108) "struct GetValeurRechercheWithClauseWhereResponse { + ArrayOfString GetValeurRechercheWithClauseWhereResult; +}" + [39]=> + string(27) "struct GetEnvironnement { +}" + [40]=> + string(106) "struct MGEnvironnement { + string RepBureautique; + string RepBureautiqueImage; + string RepBureautiqueDoc; +}" + [41]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29061.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29061.phpt diff -u php-src/ext/soap/tests/bugs/bug29061.phpt:1.1 php-src/ext/soap/tests/bugs/bug29061.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug29061.phpt:1.1 Mon Jul 19 12:53:29 2004 +++ php-src/ext/soap/tests/bugs/bug29061.phpt Thu Jul 13 16:47:25 2006 @@ -1,12 +1,12 @@ ---TEST-- -Bug #29061 (soap extension segfaults) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); -$client->getQuote("ibm"); -echo "ok\n"; -?> ---EXPECT-- +--TEST-- +Bug #29061 (soap extension segfaults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); +$client->getQuote("ibm"); +echo "ok\n"; +?> +--EXPECT-- ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29109.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29109.phpt diff -u php-src/ext/soap/tests/bugs/bug29109.phpt:1.1 php-src/ext/soap/tests/bugs/bug29109.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug29109.phpt:1.1 Mon Jul 19 13:58:10 2004 +++ php-src/ext/soap/tests/bugs/bug29109.phpt Thu Jul 13 16:47:25 2006 @@ -1,18 +1,27 @@ ---TEST-- -Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); -var_dump($client->__getFunctions()); -?> ---EXPECT-- -array(3) { - [0]=> - string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" - [1]=> - string(19) "string HelloWorld()" - [2]=> - string(19) "string HelloWorld()" +--TEST-- +Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(3) { + [0]=> + string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" + [1]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29236.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29236.phpt diff -u php-src/ext/soap/tests/bugs/bug29236.phpt:1.2 php-src/ext/soap/tests/bugs/bug29236.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug29236.phpt:1.2 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/bugs/bug29236.phpt Thu Jul 13 16:47:25 2006 @@ -1,20 +1,31 @@ ---TEST-- -Bug #29236 (memory error when wsdl-cache is enabled) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); -var_dump($client->__getFunctions()); -?> ---EXPECT-- -array(4) { - [0]=> - string(59) "StartSessionResponse StartSession(StartSession $parameters)" - [1]=> - string(62) "VerifySessionResponse VerifySession(VerifySession $parameters)" - [2]=> - string(41) "LogoutResponse Logout(Logout $parameters)" - [3]=> - string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)" -} +--TEST-- +Bug #29236 (memory error when wsdl-cache is enabled) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(4) { + [0]=> + string(59) "StartSessionResponse StartSession(StartSession $parameters)" + [1]=> + string(62) "VerifySessionResponse VerifySession(VerifySession $parameters)" + [2]=> + string(41) "LogoutResponse Logout(Logout $parameters)" + [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)" +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29795.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29795.phpt diff -u php-src/ext/soap/tests/bugs/bug29795.phpt:1.3 php-src/ext/soap/tests/bugs/bug29795.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29795.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29795.phpt Thu Jul 13 16:47:25 2006 @@ -1,32 +1,32 @@ ---TEST-- -Bug #29795 (SegFault with Soap and Amazon's Web Services) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - } - - function __doRequest($request, $location, $action, $version) { - return <<<EOF -<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope> -EOF; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); -$ar=$client->GetPrice(); -echo "o"; -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); -$ar=$client->GetPrice(); -echo "k\n"; -?> ---EXPECT-- -ok +--TEST-- +Bug #29795 (SegFault with Soap and Amazon's Web Services) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + } + + function __doRequest($request, $location, $action, $version) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "o"; +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "k\n"; +?> +--EXPECT-- +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29830.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29830.phpt diff -u php-src/ext/soap/tests/bugs/bug29830.phpt:1.2 php-src/ext/soap/tests/bugs/bug29830.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug29830.phpt:1.2 Thu Aug 26 12:24:54 2004 +++ php-src/ext/soap/tests/bugs/bug29830.phpt Thu Jul 13 16:47:25 2006 @@ -1,25 +1,25 @@ ---TEST-- -Bug #29844 (SoapServer::setClass() should not export non-public methods) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -class hello_world { - public function hello($to) { - return 'Hello ' . $to; - } - private function bye($to) { - return 'Bye ' . $to; - } -} - -$server = new SoapServer(NULL, array("uri"=>"test://")); -$server->setClass('hello_world'); -$functions = $server->getFunctions(); -foreach($functions as $func) { - echo $func . "\n"; -} -?> ---EXPECT-- -hello +--TEST-- +Bug #29844 (SoapServer::setClass() should not export non-public methods) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } + private function bye($to) { + return 'Bye ' . $to; + } +} + +$server = new SoapServer(NULL, array("uri"=>"test://")); +$server->setClass('hello_world'); +$functions = $server->getFunctions(); +foreach($functions as $func) { + echo $func . "\n"; +} +?> +--EXPECT-- +hello http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29839.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29839.phpt diff -u php-src/ext/soap/tests/bugs/bug29839.phpt:1.3 php-src/ext/soap/tests/bugs/bug29839.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29839.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29839.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,41 @@ ---TEST-- -Bug #29839 incorrect convert (xml:lang to lang) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -function EchoString($s) { - return $s; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('EchoString'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); -$client->EchoString(array("value"=>"hello","lang"=>"en")); -echo $client->__getLastRequest(); -echo $client->__getLastResponse(); -echo "ok\n"; -?> ---EXPECT-- -<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #29839 incorrect convert (xml:lang to lang) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +echo "ok\n"; +?> +--EXPECT-- +<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29844.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29844.phpt diff -u php-src/ext/soap/tests/bugs/bug29844.phpt:1.3 php-src/ext/soap/tests/bugs/bug29844.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29844.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29844.phpt Thu Jul 13 16:47:25 2006 @@ -1,36 +1,38 @@ ---TEST-- -Bug #29844 (SOAP doesn't return the result of a valid SOAP request) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -class hello_world { - public function hello($to) { - return 'Hello ' . $to; - } -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->setClass('hello_world');; - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); -var_dump($client->hello('davey')); -?> ---EXPECT-- -string(11) "Hello davey" +--TEST-- +Bug #29844 (SOAP doesn't return the result of a valid SOAP request) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('hello_world');; + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); +var_dump($client->hello('davey')); +?> +--EXPECT-- +string(11) "Hello davey" +--UEXPECT-- +unicode(11) "Hello davey" http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30045.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30045.phpt diff -u php-src/ext/soap/tests/bugs/bug30045.phpt:1.4 php-src/ext/soap/tests/bugs/bug30045.phpt:1.5 --- php-src/ext/soap/tests/bugs/bug30045.phpt:1.4 Mon Apr 10 12:50:14 2006 +++ php-src/ext/soap/tests/bugs/bug30045.phpt Thu Jul 13 16:47:25 2006 @@ -1,171 +1,171 @@ ---TEST-- -Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests) ---SKIPIF-- -<?php - if (!extension_loaded('soap')) die('skip soap extension not available'); - if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); -?> ---FILE-- -<?php - -function foo($type, $num) { - return new SoapVar($num, $type); -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('foo'); - } - - function __doRequest($request, $location, $action, $version) { - $xml = simplexml_load_string($request); - echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; - unset($xml); - - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - - return $response; - } - -} - -$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://")); - -function test($type, $num) { - global $soap; - try { - printf(" %0.0f\n ", $num); - $ret = $soap->foo($type, new SoapVar($num, $type)); - printf(" %0.0f\n", $ret); - } catch (SoapFault $ex) { - var_dump($ex); - } -} -/* -echo "byte\n"; -//test(XSD_BYTE, -129); -test(XSD_BYTE, -128); -test(XSD_BYTE, 127); -//test(XSD_BYTE, 128); - -echo "\nshort\n"; -//test(XSD_SHORT, -32769); -test(XSD_SHORT, -32768); -test(XSD_SHORT, 32767); -//test(XSD_SHORT, 32768); - -echo "\nint\n"; -//test(XSD_INT, -2147483649); -test(XSD_INT, -2147483648); -test(XSD_INT, 2147483647); -//test(XSD_INT, 2147483648); - -echo "\nlong\n"; -//test(XSD_LONG, -9223372036854775809); -test(XSD_LONG, -9223372036854775808); -test(XSD_LONG, 9223372036854775807); -//test(XSD_LONG, 9223372036854775808); - -echo "\nunsignedByte\n"; -//test(XSD_UNSIGNEDBYTE, -1); -test(XSD_UNSIGNEDBYTE, 0); -test(XSD_UNSIGNEDBYTE, 255); -//test(XSD_UNSIGNEDBYTE, 256); - -echo "\nunsignedShort\n"; -//test(XSD_UNSIGNEDSHORT, -1); -test(XSD_UNSIGNEDSHORT, 0); -test(XSD_UNSIGNEDSHORT, 65535); -//test(XSD_UNSIGNEDSHORT, 65536); - -echo "\nunsignedInt\n"; -//test(XSD_UNSIGNEDINT, -1); -test(XSD_UNSIGNEDINT, 0); -test(XSD_UNSIGNEDINT, 4294967295); -//test(XSD_UNSIGNEDINT, 4294967296); - -echo "\nunsignedLong\n"; -//test(XSD_UNSIGNEDLONG, -1); -test(XSD_UNSIGNEDLONG, 0); -test(XSD_UNSIGNEDLONG, 18446744073709551615); -//test(XSD_UNSIGNEDLONG, 18446744073709551616); - -echo "\nnegativeInteger\n"; -test(XSD_NEGATIVEINTEGER, -18446744073709551616); -test(XSD_NEGATIVEINTEGER, -1); -//test(XSD_NEGATIVEINTEGER, 0); - -echo "\nnonPositiveInteger\n"; -test(XSD_NONPOSITIVEINTEGER, -18446744073709551616); -test(XSD_NONPOSITIVEINTEGER, 0); -//test(XSD_NONPOSITIVEINTEGER, 1); - -echo "\nnonNegativeInteger\n"; -//test(XSD_NONNEGATIVEINTEGER, -1); -test(XSD_NONNEGATIVEINTEGER, 0); -test(XSD_NONNEGATIVEINTEGER, 18446744073709551616); - -echo "\nPositiveInteger\n"; -//test(XSD_POSITIVEINTEGER, 0); -test(XSD_POSITIVEINTEGER, 1); -test(XSD_POSITIVEINTEGER, 18446744073709551616); - -echo "\ninteger\n"; -test(XSD_INTEGER, -18446744073709551616); -test(XSD_INTEGER, 18446744073709551616); -*/ -echo "long\n"; -test(XSD_LONG, 2147483647); -test(XSD_LONG, 2147483648); -test(XSD_LONG, 4294967296); -test(XSD_LONG, 8589934592); -test(XSD_LONG, 17179869184); - -echo "\nunsignedLong\n"; -test(XSD_UNSIGNEDLONG, 2147483647); -test(XSD_UNSIGNEDLONG, 2147483648); -test(XSD_UNSIGNEDLONG, 4294967296); -test(XSD_UNSIGNEDLONG, 8589934592); -test(XSD_UNSIGNEDLONG, 17179869184); - -?> ---EXPECT-- -long - 2147483647 - <param1 xsi:type="xsd:long">2147483647</param1> - 2147483647 - 2147483648 - <param1 xsi:type="xsd:long">2147483648</param1> - 2147483648 - 4294967296 - <param1 xsi:type="xsd:long">4294967296</param1> - 4294967296 - 8589934592 - <param1 xsi:type="xsd:long">8589934592</param1> - 8589934592 - 17179869184 - <param1 xsi:type="xsd:long">17179869184</param1> - 17179869184 - -unsignedLong - 2147483647 - <param1 xsi:type="xsd:unsignedLong">2147483647</param1> - 2147483647 - 2147483648 - <param1 xsi:type="xsd:unsignedLong">2147483648</param1> - 2147483648 - 4294967296 - <param1 xsi:type="xsd:unsignedLong">4294967296</param1> - 4294967296 - 8589934592 - <param1 xsi:type="xsd:unsignedLong">8589934592</param1> - 8589934592 - 17179869184 - <param1 xsi:type="xsd:unsignedLong">17179869184</param1> - 17179869184 +--TEST-- +Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); + if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); +?> +--FILE-- +<?php + +function foo($type, $num) { + return new SoapVar($num, $type); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('foo'); + } + + function __doRequest($request, $location, $action, $version) { + $xml = simplexml_load_string($request); + echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; + unset($xml); + + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + + return $response; + } + +} + +$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://")); + +function test($type, $num) { + global $soap; + try { + printf(" %0.0f\n ", $num); + $ret = $soap->foo($type, new SoapVar($num, $type)); + printf(" %0.0f\n", $ret); + } catch (SoapFault $ex) { + var_dump($ex); + } +} +/* +echo "byte\n"; +//test(XSD_BYTE, -129); +test(XSD_BYTE, -128); +test(XSD_BYTE, 127); +//test(XSD_BYTE, 128); + +echo "\nshort\n"; +//test(XSD_SHORT, -32769); +test(XSD_SHORT, -32768); +test(XSD_SHORT, 32767); +//test(XSD_SHORT, 32768); + +echo "\nint\n"; +//test(XSD_INT, -2147483649); +test(XSD_INT, -2147483648); +test(XSD_INT, 2147483647); +//test(XSD_INT, 2147483648); + +echo "\nlong\n"; +//test(XSD_LONG, -9223372036854775809); +test(XSD_LONG, -9223372036854775808); +test(XSD_LONG, 9223372036854775807); +//test(XSD_LONG, 9223372036854775808); + +echo "\nunsignedByte\n"; +//test(XSD_UNSIGNEDBYTE, -1); +test(XSD_UNSIGNEDBYTE, 0); +test(XSD_UNSIGNEDBYTE, 255); +//test(XSD_UNSIGNEDBYTE, 256); + +echo "\nunsignedShort\n"; +//test(XSD_UNSIGNEDSHORT, -1); +test(XSD_UNSIGNEDSHORT, 0); +test(XSD_UNSIGNEDSHORT, 65535); +//test(XSD_UNSIGNEDSHORT, 65536); + +echo "\nunsignedInt\n"; +//test(XSD_UNSIGNEDINT, -1); +test(XSD_UNSIGNEDINT, 0); +test(XSD_UNSIGNEDINT, 4294967295); +//test(XSD_UNSIGNEDINT, 4294967296); + +echo "\nunsignedLong\n"; +//test(XSD_UNSIGNEDLONG, -1); +test(XSD_UNSIGNEDLONG, 0); +test(XSD_UNSIGNEDLONG, 18446744073709551615); +//test(XSD_UNSIGNEDLONG, 18446744073709551616); + +echo "\nnegativeInteger\n"; +test(XSD_NEGATIVEINTEGER, -18446744073709551616); +test(XSD_NEGATIVEINTEGER, -1); +//test(XSD_NEGATIVEINTEGER, 0); + +echo "\nnonPositiveInteger\n"; +test(XSD_NONPOSITIVEINTEGER, -18446744073709551616); +test(XSD_NONPOSITIVEINTEGER, 0); +//test(XSD_NONPOSITIVEINTEGER, 1); + +echo "\nnonNegativeInteger\n"; +//test(XSD_NONNEGATIVEINTEGER, -1); +test(XSD_NONNEGATIVEINTEGER, 0); +test(XSD_NONNEGATIVEINTEGER, 18446744073709551616); + +echo "\nPositiveInteger\n"; +//test(XSD_POSITIVEINTEGER, 0); +test(XSD_POSITIVEINTEGER, 1); +test(XSD_POSITIVEINTEGER, 18446744073709551616); + +echo "\ninteger\n"; +test(XSD_INTEGER, -18446744073709551616); +test(XSD_INTEGER, 18446744073709551616); +*/ +echo "long\n"; +test(XSD_LONG, 2147483647); +test(XSD_LONG, 2147483648); +test(XSD_LONG, 4294967296); +test(XSD_LONG, 8589934592); +test(XSD_LONG, 17179869184); + +echo "\nunsignedLong\n"; +test(XSD_UNSIGNEDLONG, 2147483647); +test(XSD_UNSIGNEDLONG, 2147483648); +test(XSD_UNSIGNEDLONG, 4294967296); +test(XSD_UNSIGNEDLONG, 8589934592); +test(XSD_UNSIGNEDLONG, 17179869184); + +?> +--EXPECT-- +long + 2147483647 + <param1 xsi:type="xsd:long">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:long">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:long">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:long">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:long">17179869184</param1> + 17179869184 + +unsignedLong + 2147483647 + <param1 xsi:type="xsd:unsignedLong">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:unsignedLong">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:unsignedLong">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:unsignedLong">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:unsignedLong">17179869184</param1> + 17179869184 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30106.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30106.phpt diff -u php-src/ext/soap/tests/bugs/bug30106.phpt:1.2 php-src/ext/soap/tests/bugs/bug30106.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30106.phpt:1.2 Tue Mar 22 10:19:08 2005 +++ php-src/ext/soap/tests/bugs/bug30106.phpt Thu Jul 13 16:47:25 2006 @@ -1,72 +1,106 @@ ---TEST-- -Bug #30106 SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception. ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -function getContinentList() { - return array("getContinentListResult"=>array( - "schema"=>"<xsd:schema><element name=\"test\" type=\"xsd:string\"/></xsd:schema>", - "any"=>"<test>Hello World!</test><test>Bye World!</test>")); -} - -class LocalSoapClient extends SoapClient { - function __construct($wsdl, $options=array()) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction("getContinentList"); - } - - function __doRequest($request, $location, $action, $version) { - echo $request; - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - echo $response; - return $response; - } -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); -var_dump($client->__getFunctions()); -var_dump($client->__getTypes()); -$x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); -var_dump($x); -?> ---EXPECTF-- -array(1) { - [0]=> - string(71) "getContinentListResponse getContinentList(getContinentList $parameters)" -} -array(3) { - [0]=> - string(64) "struct getContinentList { - int AFFILIATE_ID; - string PASSWORD; -}" - [1]=> - string(83) "struct getContinentListResponse { - getContinentListResult getContinentListResult; -}" - [2]=> - string(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) { - ["getContinentListResult"]=> - object(stdClass)#%d (2) { - ["schema"]=> - string(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>" - ["any"]=> - string(48) "<test>Hello World!</test><test>Bye World!</test>" - } -} +--TEST-- +Bug #30106 SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception. +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function getContinentList() { + return array("getContinentListResult"=>array( + "schema"=>"<xsd:schema><element name=\"test\" type=\"xsd:string\"/></xsd:schema>", + "any"=>"<test>Hello World!</test><test>Bye World!</test>")); +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("getContinentList"); + } + + function __doRequest($request, $location, $action, $version) { + echo $request; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + echo $response; + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); +var_dump($client->__getFunctions()); +var_dump($client->__getTypes()); +$x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); +var_dump($x); +?> +--EXPECTF-- +array(1) { + [0]=> + string(71) "getContinentListResponse getContinentList(getContinentList $parameters)" +} +array(3) { + [0]=> + string(64) "struct getContinentList { + int AFFILIATE_ID; + string PASSWORD; +}" + [1]=> + string(83) "struct getContinentListResponse { + getContinentListResult getContinentListResult; +}" + [2]=> + string(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) { + ["getContinentListResult"]=> + object(stdClass)#%d (2) { + ["schema"]=> + string(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>" + ["any"]=> + 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>" + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30175.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30175.phpt diff -u php-src/ext/soap/tests/bugs/bug30175.phpt:1.2 php-src/ext/soap/tests/bugs/bug30175.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30175.phpt:1.2 Tue Oct 5 16:00:40 2004 +++ php-src/ext/soap/tests/bugs/bug30175.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,56 @@ ---TEST-- -Bug #30175 (SOAP results aren't parsed correctly) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php - -class LocalSoapClient extends SoapClient { - - function __doRequest($request, $location, $action, $version) { - return <<<EOF -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope -xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -xmlns:ns1="urn:qweb"> -<SOAP-ENV:Body -SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -id="_0"> -<ns1:HostInfo xsi:type="ns1:HostInfo"> -<name xsi:type="xsd:string">blah blah some name field</name> -<shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription> -<ipAddress xsi:type="xsd:string">127.0.0.1</ipAddress> -</ns1:HostInfo> -</SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); -var_dump($client->qwebGetHostInfo()); -?> ---EXPECT-- -array(3) { - ["name"]=> - string(25) "blah blah some name field" - ["shortDescription"]=> - string(42) "This is a description. more blah blah blah" - ["ipAddress"]=> - string(9) "127.0.0.1" -} +--TEST-- +Bug #30175 (SOAP results aren't parsed correctly) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +class LocalSoapClient extends SoapClient { + + function __doRequest($request, $location, $action, $version) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope +xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:ns1="urn:qweb"> +<SOAP-ENV:Body +SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +id="_0"> +<ns1:HostInfo xsi:type="ns1:HostInfo"> +<name xsi:type="xsd:string">blah blah some name field</name> +<shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription> +<ipAddress xsi:type="xsd:string">127.0.0.1</ipAddress> +</ns1:HostInfo> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); +var_dump($client->qwebGetHostInfo()); +?> +--EXPECT-- +array(3) { + ["name"]=> + string(25) "blah blah some name field" + ["shortDescription"]=> + string(42) "This is a description. more blah blah blah" + ["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" +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30799.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30799.phpt diff -u php-src/ext/soap/tests/bugs/bug30799.phpt:1.2 php-src/ext/soap/tests/bugs/bug30799.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30799.phpt:1.2 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug30799.phpt Thu Jul 13 16:47:25 2006 @@ -1,25 +1,25 @@ ---TEST-- -Bug #30799 SoapServer doesn't handle private or protected properties ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class foo { - public $a="a"; - private $b="b"; - protected $c="c"; - -} - -$x = new SoapClient(NULL,array("location"=>"test://", - "uri" => "test://", - "exceptions" => 0, - "trace" => 1 )); -$x->test(new foo()); -echo $x->__getLastRequest(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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><param0 xsi:type="SOAP-ENC:Struct"><a xsi:type="xsd:string">a</a><b xsi:type="xsd:string">b</b><c xsi:type="xsd:string">c</c></param0></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #30799 SoapServer doesn't handle private or protected properties +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; + +} + +$x = new SoapClient(NULL,array("location"=>"test://", + "uri" => "test://", + "exceptions" => 0, + "trace" => 1 )); +$x->test(new foo()); +echo $x->__getLastRequest(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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><param0 xsi:type="SOAP-ENC:Struct"><a xsi:type="xsd:string">a</a><b xsi:type="xsd:string">b</b><c xsi:type="xsd:string">c</c></param0></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30928.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30928.phpt diff -u php-src/ext/soap/tests/bugs/bug30928.phpt:1.4 php-src/ext/soap/tests/bugs/bug30928.phpt:1.5 --- php-src/ext/soap/tests/bugs/bug30928.phpt:1.4 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug30928.phpt Thu Jul 13 16:47:25 2006 @@ -1,63 +1,81 @@ ---TEST-- -Bug #30928 When Using WSDL, SoapServer doesn't handle private or protected properties ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -class foo { - public $a="a"; - private $b="b"; - protected $c="c"; -} - -function test($x) { - return $x; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", - array()); -var_dump($x->test(new foo())); - -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", - array("classmap" => array('testType'=>'foo'))); -var_dump($x->test(new foo())); - -echo "ok\n"; -?> ---EXPECTF-- -object(stdClass)#%d (3) { - ["a"]=> - string(1) "a" - ["b"]=> - string(1) "b" - ["c"]=> - string(1) "c" -} -object(foo)#%d (3) { - ["a"]=> - string(1) "a" - ["b":"foo":private]=> - string(1) "b" - ["c":protected]=> - string(1) "c" -} -ok +--TEST-- +Bug #30928 When Using WSDL, SoapServer doesn't handle private or protected properties +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; +} + +function test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array()); +var_dump($x->test(new foo())); + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array("classmap" => array('testType'=>'foo'))); +var_dump($x->test(new foo())); + +echo "ok\n"; +?> +--EXPECTF-- +object(stdClass)#%d (3) { + ["a"]=> + string(1) "a" + ["b"]=> + string(1) "b" + ["c"]=> + string(1) "c" +} +object(foo)#%d (3) { + ["a"]=> + string(1) "a" + ["b":"foo":private]=> + string(1) "b" + ["c":protected]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30994.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30994.phpt diff -u php-src/ext/soap/tests/bugs/bug30994.phpt:1.2 php-src/ext/soap/tests/bugs/bug30994.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30994.phpt:1.2 Tue Dec 14 13:58:57 2004 +++ php-src/ext/soap/tests/bugs/bug30994.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,47 @@ ---TEST-- -Bug #30994 SOAP server unable to handle request with references ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="utf-8"?> -<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:tns="http://spock/kunta/kunta" - xmlns:types="http://spock/kunta/kunta/encodedTypes" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - -<soap:Body -soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> - <q1:bassCall xmlns:q1="http://spock/bass/types/kunta"> - <system xsi:type="xsd:string">XXX</system> - <function xsi:type="xsd:string">TASKTEST</function> - <parameter href="#id1" /> - </q1:bassCall> - - <soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]"> - <Item href="#id2" /> - </soapenc:Array> - - <tns:Item id="id2" xsi:type="tns:Item"> - <key xsi:type="xsd:string">ABCabc123</key> - <val xsi:type="xsd:string">123456</val> - </tns:Item> - -</soap:Body> -</soap:Envelope> -EOF; - -function bassCall() { - return "ok"; -} - -$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); -$x->addFunction("bassCall"); -$x->handle(); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://spock/kunta/kunta" 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:bassCallResponse><return xsi:type="xsd:string">ok</return></ns1:bassCallResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #30994 SOAP server unable to handle request with references +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="utf-8"?> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://spock/kunta/kunta" + xmlns:types="http://spock/kunta/kunta/encodedTypes" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + +<soap:Body +soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <q1:bassCall xmlns:q1="http://spock/bass/types/kunta"> + <system xsi:type="xsd:string">XXX</system> + <function xsi:type="xsd:string">TASKTEST</function> + <parameter href="#id1" /> + </q1:bassCall> + + <soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]"> + <Item href="#id2" /> + </soapenc:Array> + + <tns:Item id="id2" xsi:type="tns:Item"> + <key xsi:type="xsd:string">ABCabc123</key> + <val xsi:type="xsd:string">123456</val> + </tns:Item> + +</soap:Body> +</soap:Envelope> +EOF; + +function bassCall() { + return "ok"; +} + +$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); +$x->addFunction("bassCall"); +$x->handle(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://spock/kunta/kunta" 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:bassCallResponse><return xsi:type="xsd:string">ok</return></ns1:bassCallResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31422.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31422.phpt diff -u php-src/ext/soap/tests/bugs/bug31422.phpt:1.2 php-src/ext/soap/tests/bugs/bug31422.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug31422.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/bugs/bug31422.phpt Thu Jul 13 16:47:25 2006 @@ -1,42 +1,42 @@ ---TEST-- -Bug #31422 No Error-Logging on SoapServer-Side ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -log_errors=1 ---FILE-- -<?php -function Add($x,$y) { - fopen(); - user_error("Hello", E_USER_ERROR); - return $x+$y; -} - -$server = new SoapServer(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:Add xmlns:ns1="http://testuri.org"> - <x xsi:type="xsd:int">22</x> - <y xsi:type="xsd:int">33</y> - </ns1:Add> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - -$server->handle(); -echo "ok\n"; -?> ---EXPECTF-- -PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d -PHP Fatal error: Hello in %sbug31422.php on line %d -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #31422 No Error-Logging on SoapServer-Side +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +log_errors=1 +--FILE-- +<?php +function Add($x,$y) { + fopen(); + user_error("Hello", E_USER_ERROR); + return $x+$y; +} + +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle(); +echo "ok\n"; +?> +--EXPECTF-- +PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d +PHP Fatal error: Hello in %sbug31422.php on line %d +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31695.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31695.phpt diff -u php-src/ext/soap/tests/bugs/bug31695.phpt:1.2 php-src/ext/soap/tests/bugs/bug31695.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug31695.phpt:1.2 Wed Mar 23 07:11:55 2005 +++ php-src/ext/soap/tests/bugs/bug31695.phpt Thu Jul 13 16:47:25 2006 @@ -1,62 +1,62 @@ ---TEST-- -Bug #31695 Cannot redefine endpoint when using WSDL ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -function Test($x) { - return $x; -} - -class LocalSoapClient extends SoapClient { - function __construct($wsdl, $options=array()) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction("Test"); - } - - function __doRequest($request, $location, $action, $version) { - echo "$location\n"; - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); -$client->Test("str"); -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); -$client->Test("str"); -$client->__soapCall("Test", - array("arg1"), - array("location"=>"test://2")); -$old = $client->__setLocation("test://3"); -echo "$old\n"; -$client->Test("str"); -$client->Test("str"); -$client->__setLocation($old); -$client->Test("str"); -$old = $client->__setLocation(); -$client->Test("str"); -$client->__setLocation($old); -$client->Test("str"); -$client->__setLocation(null); -$client->Test("str"); -var_dump($client->__setLocation()); -?> ---EXPECT-- -test://0 -test://1 -test://2 -test://1 -test://3 -test://3 -test://1 -test://0 -test://1 -test://0 -NULL +--TEST-- +Bug #31695 Cannot redefine endpoint when using WSDL +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function Test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("Test"); + } + + function __doRequest($request, $location, $action, $version) { + echo "$location\n"; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); +$client->Test("str"); +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); +$client->Test("str"); +$client->__soapCall("Test", + array("arg1"), + array("location"=>"test://2")); +$old = $client->__setLocation("test://3"); +echo "$old\n"; +$client->Test("str"); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$old = $client->__setLocation(); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$client->__setLocation(null); +$client->Test("str"); +var_dump($client->__setLocation()); +?> +--EXPECT-- +test://0 +test://1 +test://2 +test://1 +test://3 +test://3 +test://1 +test://0 +test://1 +test://0 +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31755.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31755.phpt diff -u php-src/ext/soap/tests/bugs/bug31755.phpt:1.3 php-src/ext/soap/tests/bugs/bug31755.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug31755.phpt:1.3 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug31755.phpt Thu Jul 13 16:47:25 2006 @@ -1,17 +1,17 @@ ---TEST-- -Bug #31422 No Error-Logging on SoapServer-Side ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client=new SOAPClient(null, array('location' => 'http://localhost', -'uri' => 'myNS', 'exceptions' => false, 'trace' => true)); - -$header = new SOAPHeader(null, 'foo', 'bar'); - -$response= $client->__call('function', array(), null, $header); - -print $client->__getLastRequest(); -?> ---EXPECTF-- -Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace. in %s on line %d +--TEST-- +Bug #31422 No Error-Logging on SoapServer-Side +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client=new SOAPClient(null, array('location' => 'http://localhost', +'uri' => 'myNS', 'exceptions' => false, 'trace' => true)); + +$header = new SOAPHeader(null, 'foo', 'bar'); + +$response= $client->__call('function', array(), null, $header); + +print $client->__getLastRequest(); +?> +--EXPECTF-- +Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace. in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug32776.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug32776.phpt diff -u php-src/ext/soap/tests/bugs/bug32776.phpt:1.2 php-src/ext/soap/tests/bugs/bug32776.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug32776.phpt:1.2 Wed Apr 20 10:59:02 2005 +++ php-src/ext/soap/tests/bugs/bug32776.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,55 @@ ---TEST-- -Bug #32776 SOAP doesn't support one-way operations ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -$d = null; - -function test($x) { - global $d; - $d = $x; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); -var_dump($x->test("Hello")); -var_dump($d); -var_dump($x->__getLastRequest()); -var_dump($x->__getLastResponse()); -echo "ok\n"; -?> ---EXPECT-- -NULL -string(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 +--TEST-- +Bug #32776 SOAP doesn't support one-way operations +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$d = null; + +function test($x) { + global $d; + $d = $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); +var_dump($x->test("Hello")); +var_dump($d); +var_dump($x->__getLastRequest()); +var_dump($x->__getLastResponse()); +echo "ok\n"; +?> +--EXPECT-- +NULL +string(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 +--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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34449.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34449.phpt diff -u php-src/ext/soap/tests/bugs/bug34449.phpt:1.3 php-src/ext/soap/tests/bugs/bug34449.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug34449.phpt:1.3 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug34449.phpt Thu Jul 13 16:47:25 2006 @@ -1,20 +1,20 @@ ---TEST-- -Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class TestSoapClient extends SoapClient { - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - exit; - } -} - -$my_xml = "<array><item/><item/><item/></array>"; -$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://')); -$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML)); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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:AnyFunction><array><item/><item/><item/></array></ns1:AnyFunction></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + exit; + } +} + +$my_xml = "<array><item/><item/><item/></array>"; +$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://')); +$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML)); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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:AnyFunction><array><item/><item/><item/></array></ns1:AnyFunction></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34453.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34453.phpt diff -u php-src/ext/soap/tests/bugs/bug34453.phpt:1.1 php-src/ext/soap/tests/bugs/bug34453.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug34453.phpt:1.1 Wed Sep 28 11:23:32 2005 +++ php-src/ext/soap/tests/bugs/bug34453.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,41 @@ ---TEST-- -Bug #29839 incorrect convert (xml:lang to lang) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -function EchoString($s) { - return $s; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('EchoString'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); -$client->EchoString(array("value"=>"hello","lang"=>"en")); -echo $client->__getLastRequest(); -echo $client->__getLastResponse(); -echo "ok\n"; -?> ---EXPECT-- -<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #29839 incorrect convert (xml:lang to lang) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +echo "ok\n"; +?> +--EXPECT-- +<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34643.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34643.phpt diff -u php-src/ext/soap/tests/bugs/bug34643.phpt:1.2 php-src/ext/soap/tests/bugs/bug34643.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug34643.phpt:1.2 Mon Oct 3 09:52:54 2005 +++ php-src/ext/soap/tests/bugs/bug34643.phpt Thu Jul 13 16:47:25 2006 @@ -1,48 +1,48 @@ ---TEST-- -Bug #34643 (wsdl default value) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -class fp { - public function get_it($opt="zzz") { - return $opt; - } -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->setClass('fp'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); -print_r($cl->__getFunctions()); -echo $cl->get_it("aaa")."\n"; -echo $cl->get_it()."\n"; -var_dump($cl->get_it(null)); -?> ---EXPECT-- -Array -( - [0] => string get_it(string $opt) -) -aaa -zzz -NULL +--TEST-- +Bug #34643 (wsdl default value) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class fp { + public function get_it($opt="zzz") { + return $opt; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('fp'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); +print_r($cl->__getFunctions()); +echo $cl->get_it("aaa")."\n"; +echo $cl->get_it()."\n"; +var_dump($cl->get_it(null)); +?> +--EXPECT-- +Array +( + [0] => string get_it(string $opt) +) +aaa +zzz +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug35142.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug35142.phpt diff -u php-src/ext/soap/tests/bugs/bug35142.phpt:1.3 php-src/ext/soap/tests/bugs/bug35142.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug35142.phpt:1.3 Fri Mar 3 09:20:51 2006 +++ php-src/ext/soap/tests/bugs/bug35142.phpt Thu Jul 13 16:47:25 2006 @@ -1,135 +1,181 @@ ---TEST-- -Bug #35142 SOAP Client/Server Complex Object Support ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled",0); -$timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; - -function PostEvents($x) { - var_dump($x); - exit(); - return $x; -} - -class TestSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('PostEvents'); - } - - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - $this->server->handle($request); - return $response; - } - -} - -$soapClient = new TestSoapClient($wsdl, - array('trace' => 1, 'exceptions' => 0, - 'classmap' => array('logOnEvent' => 'LogOnEvent', - 'logOffEvent' => 'LogOffEvent', - 'events' => 'IVREvents'))); - -$logOnEvent = new LogOnEvent(34567, $timestamp); -$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); -$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); -$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); - -$result = $soapClient->PostEvents($ivrEvents); - -class LogOffEvent { - public $audienceMemberId; - public $timestamp; - public $smokeStatus; - public $callInitiator; - - function __construct($audienceMemberId, $timestamp, $smokeStatus) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - $this->smokeStatus = $smokeStatus; - $this->callInitiator = "IVR"; - } -} - -class LogOnEvent { - public $audienceMemberId; - public $timestamp; - - function __construct($audienceMemberId, $timestamp) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - } -} - -class IVREvents { - public $version; - public $activityId; - public $messageId; - public $source; - public $logOnEvent; - public $logOffEvent; - - function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { - $this->version = $version; - $this->activityId = $activityId; - $this->messageId = $messageId; - $this->source = $source; - $this->logOnEvent = $logOnEvent; - $this->logOffEvent = $logOffEvent; - } -} -?> ---EXPECTF-- -<?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) { - ["version"]=> - string(3) "1.0" - ["activityId"]=> - int(101) - ["messageId"]=> - int(12345) - ["source"]=> - string(3) "IVR" - ["logOnEvent"]=> - object(LogOnEvent)#%d (2) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - } - ["logOffEvent"]=> - array(2) { - [0]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(6) "Smoked" - ["callInitiator"]=> - string(3) "IVR" - } - [1]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34568) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(9) "SmokeFree" - ["callInitiator"]=> - string(3) "IVR" - } - } -} +--TEST-- +Bug #35142 SOAP Client/Server Complex Object Support +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'))); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?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) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + object(LogOnEvent)#%d (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} +--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" + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36226.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36226.phpt diff -u php-src/ext/soap/tests/bugs/bug36226.phpt:1.3 php-src/ext/soap/tests/bugs/bug36226.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36226.phpt:1.3 Fri Mar 3 09:20:51 2006 +++ php-src/ext/soap/tests/bugs/bug36226.phpt Thu Jul 13 16:47:25 2006 @@ -1,139 +1,188 @@ ---TEST-- -Bug #36226 SOAP Inconsistent handling when passing potential arrays. ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled",0); -$timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; - -function PostEvents($x) { - var_dump($x); - exit(); - return $x; -} - -class TestSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('PostEvents'); - } - - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - $this->server->handle($request); - return $response; - } - -} - -$soapClient = new TestSoapClient($wsdl, - array('trace' => 1, 'exceptions' => 0, - 'classmap' => array('logOnEvent' => 'LogOnEvent', - 'logOffEvent' => 'LogOffEvent', - 'events' => 'IVREvents'), - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)); - -$logOnEvent = new LogOnEvent(34567, $timestamp); -$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); -$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); -$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); - -$result = $soapClient->PostEvents($ivrEvents); - -class LogOffEvent { - public $audienceMemberId; - public $timestamp; - public $smokeStatus; - public $callInitiator; - - function __construct($audienceMemberId, $timestamp, $smokeStatus) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - $this->smokeStatus = $smokeStatus; - $this->callInitiator = "IVR"; - } -} - -class LogOnEvent { - public $audienceMemberId; - public $timestamp; - - function __construct($audienceMemberId, $timestamp) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - } -} - -class IVREvents { - public $version; - public $activityId; - public $messageId; - public $source; - public $logOnEvent; - public $logOffEvent; - - function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { - $this->version = $version; - $this->activityId = $activityId; - $this->messageId = $messageId; - $this->source = $source; - $this->logOnEvent = $logOnEvent; - $this->logOffEvent = $logOffEvent; - } -} -?> ---EXPECTF-- -<?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) { - ["version"]=> - string(3) "1.0" - ["activityId"]=> - int(101) - ["messageId"]=> - int(12345) - ["source"]=> - string(3) "IVR" - ["logOnEvent"]=> - array(1) { - [0]=> - object(LogOnEvent)#10 (2) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - } - } - ["logOffEvent"]=> - array(2) { - [0]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(6) "Smoked" - ["callInitiator"]=> - string(3) "IVR" - } - [1]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34568) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(9) "SmokeFree" - ["callInitiator"]=> - string(3) "IVR" - } - } -} +--TEST-- +Bug #36226 SOAP Inconsistent handling when passing potential arrays. +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?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) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + array(1) { + [0]=> + object(LogOnEvent)#10 (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} +--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" + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36575.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36575.phpt diff -u php-src/ext/soap/tests/bugs/bug36575.phpt:1.3 php-src/ext/soap/tests/bugs/bug36575.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36575.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/bugs/bug36575.phpt Thu Jul 13 16:47:25 2006 @@ -1,52 +1,52 @@ ---TEST-- -Bug #36575 (Incorrect complex type instantiation with hierarchies) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -abstract class CT_A1 { - public $var1; -} - -class CT_A2 extends CT_A1 { - public $var2; -} - -class CT_A3 extends CT_A2 { - public $var3; -} - -// returns A2 in WSDL -function test( $a1 ) { - $a3 = new CT_A3(); - $a3->var1 = $a1->var1; - $a3->var2 = "var two"; - $a3->var3 = "var three"; - return $a3; -} - -$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); - -$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); -$a2 = new CT_A2(); -$a2->var1 = "one"; -$a2->var2 = "two"; -$client->test($a2); - -$soapRequest = $client->__getLastRequest(); - -echo $soapRequest; - -$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); -$server->addFunction("test"); -$server->handle($soapRequest); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><a1 xsi:type="ns2:A2"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">two</var2></a1></ns1:test></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="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><result xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">var two</var2><var3 xsi:type="xsd:string">var three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #36575 (Incorrect complex type instantiation with hierarchies) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +abstract class CT_A1 { + public $var1; +} + +class CT_A2 extends CT_A1 { + public $var2; +} + +class CT_A3 extends CT_A2 { + public $var3; +} + +// returns A2 in WSDL +function test( $a1 ) { + $a3 = new CT_A3(); + $a3->var1 = $a1->var1; + $a3->var2 = "var two"; + $a3->var3 = "var three"; + return $a3; +} + +$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); + +$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); +$a2 = new CT_A2(); +$a2->var1 = "one"; +$a2->var2 = "two"; +$client->test($a2); + +$soapRequest = $client->__getLastRequest(); + +echo $soapRequest; + +$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); +$server->addFunction("test"); +$server->handle($soapRequest); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><a1 xsi:type="ns2:A2"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">two</var2></a1></ns1:test></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="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><result xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">var two</var2><var3 xsi:type="xsd:string">var three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36629.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36629.phpt diff -u php-src/ext/soap/tests/bugs/bug36629.phpt:1.3 php-src/ext/soap/tests/bugs/bug36629.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36629.phpt:1.3 Wed Mar 15 16:14:40 2006 +++ php-src/ext/soap/tests/bugs/bug36629.phpt Thu Jul 13 16:47:25 2006 @@ -1,53 +1,53 @@ ---TEST-- -Bug #36629 (SoapServer::handle() exits on SOAP faults) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function test1() { - throw new SoapFault("Server", "test1"); -} -function test2() { - return new SoapFault("Server", "test2"); -} - -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction(array("test1","test2")); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test1 xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; -$server->handle(); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test2 xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test1</faultstring></SOAP-ENV:Fault></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/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #36629 (SoapServer::handle() exits on SOAP faults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test1() { + throw new SoapFault("Server", "test1"); +} +function test2() { + return new SoapFault("Server", "test2"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(array("test1","test2")); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test1 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle(); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test2 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test1</faultstring></SOAP-ENV:Fault></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/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36908.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36908.phpt diff -u php-src/ext/soap/tests/bugs/bug36908.phpt:1.2 php-src/ext/soap/tests/bugs/bug36908.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug36908.phpt:1.2 Mon Apr 10 13:29:57 2006 +++ php-src/ext/soap/tests/bugs/bug36908.phpt Thu Jul 13 16:47:25 2006 @@ -1,46 +1,46 @@ ---TEST-- -Bug #36908 (wsdl default value overrides value in soap request) ---SKIPIF-- -<?php - if (!extension_loaded('soap')) die('skip soap extension not available'); -?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -class PublisherService { - function add($publisher) { - return $publisher->region_id; - } -} -$input = -'<?xml version="1.0" encoding="UTF-8"?> -<soapenv:Envelope -xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <soapenv:Body> - <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> - <publisher href="#id0"/> - </ns1:add> - <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0" -soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -xsi:type="ns3:publisher"> - <region_id href="#id5"/> - </multiRef> - <multiRef xmlns:ns5="http://soap.dev/soap/types" -xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5" -soapenc:root="0" -soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -xsi:type="xsd:long">9</multiRef> - </soapenv:Body> -</soapenv:Envelope>'; -ini_set('soap.wsdl_cache_enabled', false); -$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); -$server->setClass("PublisherService"); -$server->handle($input); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:PublisherService" 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:addResponse><out xsi:type="xsd:string">9</out></ns1:addResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #36908 (wsdl default value overrides value in soap request) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class PublisherService { + function add($publisher) { + return $publisher->region_id; + } +} +$input = +'<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope +xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <publisher href="#id0"/> + </ns1:add> + <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="ns3:publisher"> + <region_id href="#id5"/> + </multiRef> + <multiRef xmlns:ns5="http://soap.dev/soap/types" +xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5" +soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="xsd:long">9</multiRef> + </soapenv:Body> +</soapenv:Envelope>'; +ini_set('soap.wsdl_cache_enabled', false); +$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); +$server->setClass("PublisherService"); +$server->handle($input); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:PublisherService" 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:addResponse><out xsi:type="xsd:string">9</out></ns1:addResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug37278.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug37278.phpt diff -u php-src/ext/soap/tests/bugs/bug37278.phpt:1.3 php-src/ext/soap/tests/bugs/bug37278.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug37278.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/bugs/bug37278.phpt Thu Jul 13 16:47:25 2006 @@ -1,24 +1,24 @@ ---TEST-- -Bug #37278 (SOAP not respecting uri in __soapCall) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$options = array( - "location" => "test://", - "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", - "trace" => 1); - -$client = new SoapClient(null, $options); - -$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story"; - -try { - $client->__soapCall("list_ids", array(), array("uri" => $newNS)); -} catch (Exception $e) { - print $client->__getLastRequest(); -} -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" 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:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #37278 (SOAP not respecting uri in __soapCall) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$options = array( + "location" => "test://", + "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", + "trace" => 1); + +$client = new SoapClient(null, $options); + +$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story"; + +try { + $client->__soapCall("list_ids", array(), array("uri" => $newNS)); +} catch (Exception $e) { + print $client->__getLastRequest(); +} +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" 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:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38004.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38004.phpt diff -u php-src/ext/soap/tests/bugs/bug38004.phpt:1.3 php-src/ext/soap/tests/bugs/bug38004.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug38004.phpt:1.3 Mon Jul 10 07:26:31 2006 +++ php-src/ext/soap/tests/bugs/bug38004.phpt Thu Jul 13 16:47:25 2006 @@ -1,40 +1,40 @@ ---TEST-- -Bug #38004 (Parameters in SoapServer are decoded twice) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g; - $g = $param->strA."\n".$param->strB."\n"; - return $g; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl) { - parent::__construct($wsdl); - $this->server = new SoapServer($wsdl); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); -$strA = 'test & test'; -$strB = 'test & test'; -$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); -print_r($res); -print_r($g); -?> ---EXPECT-- -test & test -test & test -test & test -test & test +--TEST-- +Bug #38004 (Parameters in SoapServer are decoded twice) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Test($param) { + global $g; + $g = $param->strA."\n".$param->strB."\n"; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); +$strA = 'test & test'; +$strB = 'test & test'; +$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); +print_r($res); +print_r($g); +?> +--EXPECT-- +test & test +test & test +test & test +test & test http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38005.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38005.phpt diff -u php-src/ext/soap/tests/bugs/bug38005.phpt:1.2 php-src/ext/soap/tests/bugs/bug38005.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38005.phpt:1.2 Mon Jul 10 07:41:52 2006 +++ php-src/ext/soap/tests/bugs/bug38005.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,44 @@ ---TEST-- -Bug #38005 (SoapFault faultstring doesn't follow encoding rules) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - return new SoapFault('Test', 'This is our fault: Ä'); -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl, $opt) { - parent::__construct($wsdl, $opt); - $this->server = new SoapServer($wsdl, $opt); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(NULL, array( - 'encoding' => 'ISO-8859-1', - 'uri' => "test://", - 'location' => "test://", - 'soap_version'=>SOAP_1_2, - 'trace'=>1, - 'exceptions'=>0)); -$res = $client->Test(); -echo($res->faultstring."\n"); -echo($client->__getLastResponse()); -?> ---EXPECT-- -This is our fault: Ä -<?xml version="1.0" encoding="UTF-8"?> -<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>Test</env:Value></env:Code><env:Reason><env:Text>This is our fault: Ã</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> +--TEST-- +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) { + return new SoapFault('Test', 'This is our fault: Ä'); +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(NULL, array( + 'encoding' => 'ISO-8859-1', + 'uri' => "test://", + 'location' => "test://", + 'soap_version'=>SOAP_1_2, + 'trace'=>1, + 'exceptions'=>0)); +$res = $client->Test(); +echo($res->faultstring."\n"); +echo($client->__getLastResponse()); +?> +--EXPECT-- +This is our fault: Ä +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>Test</env:Value></env:Code><env:Reason><env:Text>This is our fault: Ã</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38055.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38055.phpt diff -u php-src/ext/soap/tests/bugs/bug38055.phpt:1.2 php-src/ext/soap/tests/bugs/bug38055.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38055.phpt:1.2 Mon Jul 10 10:33:55 2006 +++ php-src/ext/soap/tests/bugs/bug38055.phpt Thu Jul 13 16:47:25 2006 @@ -1,39 +1,39 @@ ---TEST-- -Bug #38055 (Wrong interpretation of boolean parameters) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g1, $g2; - $g1 = $param->boolA; - $g2 = $param->boolB; - return 1; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl) { - parent::__construct($wsdl); - $this->server = new SoapServer($wsdl); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); -$boolA = 1; -$boolB = '1'; -$res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); -var_dump($g1); -var_dump($g2); -?> ---EXPECT-- -bool(true) -bool(true) +--TEST-- +Bug #38055 (Wrong interpretation of boolean parameters) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Test($param) { + global $g1, $g2; + $g1 = $param->boolA; + $g2 = $param->boolB; + return 1; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); +$boolA = 1; +$boolB = '1'; +$res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); +var_dump($g1); +var_dump($g2); +?> +--EXPECT-- +bool(true) +bool(true) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38067.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38067.phpt diff -u php-src/ext/soap/tests/bugs/bug38067.phpt:1.2 php-src/ext/soap/tests/bugs/bug38067.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38067.phpt:1.2 Wed Jul 12 09:00:15 2006 +++ php-src/ext/soap/tests/bugs/bug38067.phpt Thu Jul 13 16:47:25 2006 @@ -1,40 +1,43 @@ ---TEST-- -Bug #38067 (Parameters are not decoded from utf-8 when using encoding option) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g; - $g = $param->str; - return $g; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl, $opt) { - parent::__construct($wsdl, $opt); - $this->server = new SoapServer($wsdl, $opt); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', - array('encoding' => 'ISO-8859-1')); -$str = 'test: Ä'; -$res = $client->Test(array('str'=>$str)); -echo $str."\n"; -echo $res."\n"; -echo $g."\n"; -?> ---EXPECT-- -test: Ä -test: Ä -test: Ä +--TEST-- +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) { + global $g; + $g = $param->str; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', + array('encoding' => 'ISO-8859-1')); +$str = 'test: Ä'; +$res = $client->Test(array('str'=>$str)); +echo $str."\n"; +echo $res."\n"; +echo $g."\n"; +?> +--EXPECT-- +test: Ä +test: Ä +test: Ä http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt Thu Jul 13 16:47:26 2006 @@ -33,3 +33,17 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt Thu Jul 13 16:47:26 2006 @@ -40,3 +40,24 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt Thu Jul 13 16:47:26 2006 @@ -47,3 +47,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.1 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.1 Sun Apr 3 15:51:20 2005 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt Thu Jul 13 16:47:26 2006 @@ -48,3 +48,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.1 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.1 Sun Apr 3 15:51:20 2005 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt Thu Jul 13 16:47:26 2006 @@ -48,3 +48,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema004.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/schema/schema004.phpt diff -u php-src/ext/soap/tests/schema/schema004.phpt:1.1 php-src/ext/soap/tests/schema/schema004.phpt:1.2 --- php-src/ext/soap/tests/schema/schema004.phpt:1.1 Wed Jan 28 13:33:48 2004 +++ php-src/ext/soap/tests/schema/schema004.phpt Thu Jul 13 16:47:26 2006 @@ -17,4 +17,9 @@ <?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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema009.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema009.phpt diff -u php-src/ext/soap/tests/schema/schema009.phpt:1.2 php-src/ext/soap/tests/schema/schema009.phpt:1.3 --- php-src/ext/soap/tests/schema/schema009.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema009.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema010.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema010.phpt diff -u php-src/ext/soap/tests/schema/schema010.phpt:1.2 php-src/ext/soap/tests/schema/schema010.phpt:1.3 --- php-src/ext/soap/tests/schema/schema010.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema010.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema011.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema011.phpt diff -u php-src/ext/soap/tests/schema/schema011.phpt:1.2 php-src/ext/soap/tests/schema/schema011.phpt:1.3 --- php-src/ext/soap/tests/schema/schema011.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema011.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema012.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema012.phpt diff -u php-src/ext/soap/tests/schema/schema012.phpt:1.2 php-src/ext/soap/tests/schema/schema012.phpt:1.3 --- php-src/ext/soap/tests/schema/schema012.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema012.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema013.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema013.phpt diff -u php-src/ext/soap/tests/schema/schema013.phpt:1.2 php-src/ext/soap/tests/schema/schema013.phpt:1.3 --- php-src/ext/soap/tests/schema/schema013.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema013.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema014.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema014.phpt diff -u php-src/ext/soap/tests/schema/schema014.phpt:1.2 php-src/ext/soap/tests/schema/schema014.phpt:1.3 --- php-src/ext/soap/tests/schema/schema014.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema014.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema015.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema015.phpt diff -u php-src/ext/soap/tests/schema/schema015.phpt:1.2 php-src/ext/soap/tests/schema/schema015.phpt:1.3 --- php-src/ext/soap/tests/schema/schema015.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema015.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema016.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema016.phpt diff -u php-src/ext/soap/tests/schema/schema016.phpt:1.2 php-src/ext/soap/tests/schema/schema016.phpt:1.3 --- php-src/ext/soap/tests/schema/schema016.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema016.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema017.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema017.phpt diff -u php-src/ext/soap/tests/schema/schema017.phpt:1.2 php-src/ext/soap/tests/schema/schema017.phpt:1.3 --- php-src/ext/soap/tests/schema/schema017.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema017.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema018.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema018.phpt diff -u php-src/ext/soap/tests/schema/schema018.phpt:1.2 php-src/ext/soap/tests/schema/schema018.phpt:1.3 --- php-src/ext/soap/tests/schema/schema018.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema018.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema019.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema019.phpt diff -u php-src/ext/soap/tests/schema/schema019.phpt:1.2 php-src/ext/soap/tests/schema/schema019.phpt:1.3 --- php-src/ext/soap/tests/schema/schema019.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema019.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema020.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema020.phpt diff -u php-src/ext/soap/tests/schema/schema020.phpt:1.2 php-src/ext/soap/tests/schema/schema020.phpt:1.3 --- php-src/ext/soap/tests/schema/schema020.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema020.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema021.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema021.phpt diff -u php-src/ext/soap/tests/schema/schema021.phpt:1.2 php-src/ext/soap/tests/schema/schema021.phpt:1.3 --- php-src/ext/soap/tests/schema/schema021.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema021.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema022.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema022.phpt diff -u php-src/ext/soap/tests/schema/schema022.phpt:1.2 php-src/ext/soap/tests/schema/schema022.phpt:1.3 --- php-src/ext/soap/tests/schema/schema022.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema022.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema030.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema030.phpt diff -u php-src/ext/soap/tests/schema/schema030.phpt:1.2 php-src/ext/soap/tests/schema/schema030.phpt:1.3 --- php-src/ext/soap/tests/schema/schema030.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema030.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema031.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema031.phpt diff -u php-src/ext/soap/tests/schema/schema031.phpt:1.2 php-src/ext/soap/tests/schema/schema031.phpt:1.3 --- php-src/ext/soap/tests/schema/schema031.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema031.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema032.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema032.phpt diff -u php-src/ext/soap/tests/schema/schema032.phpt:1.2 php-src/ext/soap/tests/schema/schema032.phpt:1.3 --- php-src/ext/soap/tests/schema/schema032.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema032.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,12 @@ 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 + http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema033.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema033.phpt diff -u php-src/ext/soap/tests/schema/schema033.phpt:1.2 php-src/ext/soap/tests/schema/schema033.phpt:1.3 --- php-src/ext/soap/tests/schema/schema033.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema033.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema034.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema034.phpt diff -u php-src/ext/soap/tests/schema/schema034.phpt:1.2 php-src/ext/soap/tests/schema/schema034.phpt:1.3 --- php-src/ext/soap/tests/schema/schema034.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema034.phpt Thu Jul 13 16:47:26 2006 @@ -35,3 +35,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema035.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema035.phpt diff -u php-src/ext/soap/tests/schema/schema035.phpt:1.2 php-src/ext/soap/tests/schema/schema035.phpt:1.3 --- php-src/ext/soap/tests/schema/schema035.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema035.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema036.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema036.phpt diff -u php-src/ext/soap/tests/schema/schema036.phpt:1.2 php-src/ext/soap/tests/schema/schema036.phpt:1.3 --- php-src/ext/soap/tests/schema/schema036.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema036.phpt Thu Jul 13 16:47:26 2006 @@ -35,3 +35,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema037.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema037.phpt diff -u php-src/ext/soap/tests/schema/schema037.phpt:1.4 php-src/ext/soap/tests/schema/schema037.phpt:1.5 --- php-src/ext/soap/tests/schema/schema037.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema037.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema038.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema038.phpt diff -u php-src/ext/soap/tests/schema/schema038.phpt:1.4 php-src/ext/soap/tests/schema/schema038.phpt:1.5 --- php-src/ext/soap/tests/schema/schema038.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema038.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema039.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema039.phpt diff -u php-src/ext/soap/tests/schema/schema039.phpt:1.4 php-src/ext/soap/tests/schema/schema039.phpt:1.5 --- php-src/ext/soap/tests/schema/schema039.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema039.phpt Thu Jul 13 16:47:26 2006 @@ -29,3 +29,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema040.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema040.phpt diff -u php-src/ext/soap/tests/schema/schema040.phpt:1.4 php-src/ext/soap/tests/schema/schema040.phpt:1.5 --- php-src/ext/soap/tests/schema/schema040.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema040.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema041.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema041.phpt diff -u php-src/ext/soap/tests/schema/schema041.phpt:1.2 php-src/ext/soap/tests/schema/schema041.phpt:1.3 --- php-src/ext/soap/tests/schema/schema041.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema041.phpt Thu Jul 13 16:47:26 2006 @@ -29,3 +29,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema042.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema042.phpt diff -u php-src/ext/soap/tests/schema/schema042.phpt:1.4 php-src/ext/soap/tests/schema/schema042.phpt:1.5 --- php-src/ext/soap/tests/schema/schema042.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema042.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema043.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema043.phpt diff -u php-src/ext/soap/tests/schema/schema043.phpt:1.4 php-src/ext/soap/tests/schema/schema043.phpt:1.5 --- php-src/ext/soap/tests/schema/schema043.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema043.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema044.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema044.phpt diff -u php-src/ext/soap/tests/schema/schema044.phpt:1.4 php-src/ext/soap/tests/schema/schema044.phpt:1.5 --- php-src/ext/soap/tests/schema/schema044.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema044.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema045.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema045.phpt diff -u php-src/ext/soap/tests/schema/schema045.phpt:1.4 php-src/ext/soap/tests/schema/schema045.phpt:1.5 --- php-src/ext/soap/tests/schema/schema045.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema045.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema046.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema046.phpt diff -u php-src/ext/soap/tests/schema/schema046.phpt:1.4 php-src/ext/soap/tests/schema/schema046.phpt:1.5 --- php-src/ext/soap/tests/schema/schema046.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema046.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema047.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema047.phpt diff -u php-src/ext/soap/tests/schema/schema047.phpt:1.4 php-src/ext/soap/tests/schema/schema047.phpt:1.5 --- php-src/ext/soap/tests/schema/schema047.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema047.phpt Thu Jul 13 16:47:26 2006 @@ -32,3 +32,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema048.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema048.phpt diff -u php-src/ext/soap/tests/schema/schema048.phpt:1.4 php-src/ext/soap/tests/schema/schema048.phpt:1.5 --- php-src/ext/soap/tests/schema/schema048.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema048.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema049.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema049.phpt diff -u php-src/ext/soap/tests/schema/schema049.phpt:1.3 php-src/ext/soap/tests/schema/schema049.phpt:1.4 --- php-src/ext/soap/tests/schema/schema049.phpt:1.3 Mon Oct 10 15:40:43 2005 +++ php-src/ext/soap/tests/schema/schema049.phpt Thu Jul 13 16:47:26 2006 @@ -33,3 +33,11 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema050.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema050.phpt diff -u php-src/ext/soap/tests/schema/schema050.phpt:1.2 php-src/ext/soap/tests/schema/schema050.phpt:1.3 --- php-src/ext/soap/tests/schema/schema050.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema050.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema051.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema051.phpt diff -u php-src/ext/soap/tests/schema/schema051.phpt:1.2 php-src/ext/soap/tests/schema/schema051.phpt:1.3 --- php-src/ext/soap/tests/schema/schema051.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema051.phpt Thu Jul 13 16:47:26 2006 @@ -31,3 +31,18 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema052.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema052.phpt diff -u php-src/ext/soap/tests/schema/schema052.phpt:1.2 php-src/ext/soap/tests/schema/schema052.phpt:1.3 --- php-src/ext/soap/tests/schema/schema052.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema052.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema053.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema053.phpt diff -u php-src/ext/soap/tests/schema/schema053.phpt:1.2 php-src/ext/soap/tests/schema/schema053.phpt:1.3 --- php-src/ext/soap/tests/schema/schema053.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema053.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,11 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema054.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema054.phpt diff -u php-src/ext/soap/tests/schema/schema054.phpt:1.3 php-src/ext/soap/tests/schema/schema054.phpt:1.4 --- php-src/ext/soap/tests/schema/schema054.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema054.phpt Thu Jul 13 16:47:26 2006 @@ -19,3 +19,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema055.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema055.phpt diff -u php-src/ext/soap/tests/schema/schema055.phpt:1.3 php-src/ext/soap/tests/schema/schema055.phpt:1.4 --- php-src/ext/soap/tests/schema/schema055.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema055.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema062.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/soap/tests/schema/schema062.phpt diff -u php-src/ext/soap/tests/schema/schema062.phpt:1.6 php-src/ext/soap/tests/schema/schema062.phpt:1.7 --- php-src/ext/soap/tests/schema/schema062.phpt:1.6 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema062.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema064.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema064.phpt diff -u php-src/ext/soap/tests/schema/schema064.phpt:1.2 php-src/ext/soap/tests/schema/schema064.phpt:1.3 --- php-src/ext/soap/tests/schema/schema064.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema064.phpt Thu Jul 13 16:47:26 2006 @@ -55,3 +55,25 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema065.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema065.phpt diff -u php-src/ext/soap/tests/schema/schema065.phpt:1.5 php-src/ext/soap/tests/schema/schema065.phpt:1.6 --- php-src/ext/soap/tests/schema/schema065.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema065.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema066.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/soap/tests/schema/schema066.phpt diff -u php-src/ext/soap/tests/schema/schema066.phpt:1.6 php-src/ext/soap/tests/schema/schema066.phpt:1.7 --- php-src/ext/soap/tests/schema/schema066.phpt:1.6 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema066.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema067.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema067.phpt diff -u php-src/ext/soap/tests/schema/schema067.phpt:1.5 php-src/ext/soap/tests/schema/schema067.phpt:1.6 --- php-src/ext/soap/tests/schema/schema067.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema067.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema069.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema069.phpt diff -u php-src/ext/soap/tests/schema/schema069.phpt:1.5 php-src/ext/soap/tests/schema/schema069.phpt:1.6 --- php-src/ext/soap/tests/schema/schema069.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema069.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema070.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema070.phpt diff -u php-src/ext/soap/tests/schema/schema070.phpt:1.5 php-src/ext/soap/tests/schema/schema070.phpt:1.6 --- php-src/ext/soap/tests/schema/schema070.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema070.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema074.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/schema/schema074.phpt diff -u php-src/ext/soap/tests/schema/schema074.phpt:1.1 php-src/ext/soap/tests/schema/schema074.phpt:1.2 --- php-src/ext/soap/tests/schema/schema074.phpt:1.1 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema074.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema075.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema075.phpt diff -u php-src/ext/soap/tests/schema/schema075.phpt:1.3 php-src/ext/soap/tests/schema/schema075.phpt:1.4 --- php-src/ext/soap/tests/schema/schema075.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema075.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema076.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema076.phpt diff -u php-src/ext/soap/tests/schema/schema076.phpt:1.3 php-src/ext/soap/tests/schema/schema076.phpt:1.4 --- php-src/ext/soap/tests/schema/schema076.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema076.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema077.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema077.phpt diff -u php-src/ext/soap/tests/schema/schema077.phpt:1.3 php-src/ext/soap/tests/schema/schema077.phpt:1.4 --- php-src/ext/soap/tests/schema/schema077.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema077.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema078.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema078.phpt diff -u php-src/ext/soap/tests/schema/schema078.phpt:1.2 php-src/ext/soap/tests/schema/schema078.phpt:1.3 --- php-src/ext/soap/tests/schema/schema078.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema078.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema079.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema079.phpt diff -u php-src/ext/soap/tests/schema/schema079.phpt:1.2 php-src/ext/soap/tests/schema/schema079.phpt:1.3 --- php-src/ext/soap/tests/schema/schema079.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema079.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema080.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema080.phpt diff -u php-src/ext/soap/tests/schema/schema080.phpt:1.2 php-src/ext/soap/tests/schema/schema080.phpt:1.3 --- php-src/ext/soap/tests/schema/schema080.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema080.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/test_schema.inc?r1=1.9&r2=1.10&diff_format=u Index: php-src/ext/soap/tests/schema/test_schema.inc diff -u php-src/ext/soap/tests/schema/test_schema.inc:1.9 php-src/ext/soap/tests/schema/test_schema.inc:1.10 --- php-src/ext/soap/tests/schema/test_schema.inc:1.9 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/test_schema.inc Thu Jul 13 16:47:26 2006 @@ -52,7 +52,7 @@ $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));
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.134&r2=1.135&diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.134 php-src/ext/soap/php_encoding.c:1.135 --- php-src/ext/soap/php_encoding.c:1.134 Wed Jul 12 09:00:15 2006 +++ php-src/ext/soap/php_encoding.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.134 2006/07/12 09:00:15 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.135 2006/07/13 16:47:25 dmitry Exp $ */ #include <time.h> @@ -128,6 +128,7 @@ {{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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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); - } 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); - } + 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 { + 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; - 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; + 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 (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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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.s)); + } else if (key_type == HASH_KEY_IS_UNICODE) { + char *str; + TSRMLS_FETCH(); + if (style == SOAP_ENCODED) { set_xsi_type(key, "xsd:string"); } - xmlNodeSetContent(key, BAD_CAST(key_val)); + 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 @@ 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 @@ 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 @@ { 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 @@ 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)); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.92&r2=1.93&diff_format=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.92 php-src/ext/soap/php_http.c:1.93 --- php-src/ext/soap/php_http.c:1.92 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_http.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c,v 1.92 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_http.c,v 1.93 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -630,7 +630,7 @@ /* 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 @@ 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 @@ (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, ';'); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_packet_soap.c?r1=1.45&r2=1.46&diff_format=u Index: php-src/ext/soap/php_packet_soap.c diff -u php-src/ext/soap/php_packet_soap.c:1.45 php-src/ext/soap/php_packet_soap.c:1.46 --- php-src/ext/soap/php_packet_soap.c:1.45 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_packet_soap.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.c,v 1.45 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_packet_soap.c,v 1.46 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" @@ -192,15 +192,25 @@ 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 @@ 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); + } } } http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_schema.c?r1=1.66&r2=1.67&diff_format=u Index: php-src/ext/soap/php_schema.c diff -u php-src/ext/soap/php_schema.c:1.66 php-src/ext/soap/php_schema.c:1.67 --- php-src/ext/soap/php_schema.c:1.66 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_schema.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.c,v 1.66 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_schema.c,v 1.67 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "libxml/uri.h" @@ -2070,7 +2070,7 @@ 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 @@ } 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 { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.102&r2=1.103&diff_format=u Index: php-src/ext/soap/php_sdl.c diff -u php-src/ext/soap/php_sdl.c:1.102 php-src/ext/soap/php_sdl.c:1.103 --- php-src/ext/soap/php_sdl.c:1.102 Tue Jul 11 14:24:39 2006 +++ php-src/ext/soap/php_sdl.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c,v 1.102 2006/07/11 14:24:39 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.103 2006/07/13 16:47:25 dmitry Exp $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -1063,7 +1063,7 @@ 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_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 @@ encodePtr *penc; sdlTypePtr *ptype; ulong index; - char *key; + zstr key; uint key_len; pheaders = malloc(sizeof(HashTable)); @@ -2367,7 +2367,7 @@ } 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 @@ sdlTypePtr *ptype; encodePtr *penc; ulong index; - char *key; + zstr key; uint key_len; pparams = malloc(sizeof(HashTable)); @@ -2428,7 +2428,7 @@ } 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 @@ HashTable *pfaults; sdlFaultPtr *tmp, pfault; ulong index; - char *key; + zstr key; uint key_len; pfaults = malloc(sizeof(HashTable)); @@ -2477,7 +2477,7 @@ } 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 @@ { sdlAttributePtr pattr; ulong index; - char *key; + zstr key; uint key_len; pattr = malloc(sizeof(sdlAttribute)); @@ -2541,7 +2541,7 @@ } 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 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ } *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 @@ 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) { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_soap.h?r1=1.44&r2=1.45&diff_format=u Index: php-src/ext/soap/php_soap.h diff -u php-src/ext/soap/php_soap.h:1.44 php-src/ext/soap/php_soap.h:1.45 --- php-src/ext/soap/php_soap.h:1.44 Wed Apr 19 10:49:16 2006 +++ php-src/ext/soap/php_soap.h Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_soap.h,v 1.44 2006/04/19 10:49:16 dmitry Exp $ */ +/* $Id: php_soap.h,v 1.45 2006/07/13 16:47:25 dmitry Exp $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H @@ -222,4 +222,6 @@ #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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/soap.c?r1=1.194&r2=1.195&diff_format=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.194 php-src/ext/soap/soap.c:1.195 --- php-src/ext/soap/soap.c:1.194 Tue Jul 11 14:36:05 2006 +++ php-src/ext/soap/soap.c Thu Jul 13 16:47:25 2006 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c,v 1.194 2006/07/11 14:36:05 dmitry Exp $ */ +/* $Id: soap.c,v 1.195 2006/07/13 16:47:25 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -395,6 +395,17 @@ # 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 @@ 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 @@ 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 @@ 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(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 @@ } } - 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 @@ 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 @@ 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 @@ service->uri = estrdup("http://unknown-uri/"); } } + efree(wsdl); } ret = zend_list_insert(service, le_service); @@ -1226,9 +1302,9 @@ 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 @@ 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 @@ 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 @@ 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 @@ } 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] = ¶m; - 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] = ¶m; - 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] = ¶m; + 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] = ¶m; + 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 @@ /* 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_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 @@ } 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 @@ 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 @@ } 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_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 @@ 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 @@ 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 @@ } 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 @@ } } 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 @@ } } 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 @@ 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 @@ 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 @@ xmlCharEncodingHandlerPtr old_encoding; HashTable *old_class_map; int old_features; + int free_location = 0; SOAP_CLIENT_BEGIN_CODE(); @@ -2458,10 +2599,14 @@ } 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 @@ } 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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), ¶m_name, ¶m_name_len, ¶m_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), ¶m_name, ¶m_name_len, ¶m_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 @@ } } } + if (param_name_type == IS_UNICODE) { + efree(param_name.v); + } zend_hash_move_forward_ex(Z_ARRVAL_P(ret), &pos); i++; http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/any.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/any.phpt diff -u php-src/ext/soap/tests/any.phpt:1.1 php-src/ext/soap/tests/any.phpt:1.2 --- php-src/ext/soap/tests/any.phpt:1.1 Tue Nov 1 11:11:19 2005 +++ php-src/ext/soap/tests/any.phpt Thu Jul 13 16:47:25 2006 @@ -81,3 +81,32 @@ } } } +--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) + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/classmap002.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/classmap002.phpt diff -u php-src/ext/soap/tests/classmap002.phpt:1.3 php-src/ext/soap/tests/classmap002.phpt:1.4 --- php-src/ext/soap/tests/classmap002.phpt:1.3 Wed Apr 20 06:36:09 2005 +++ php-src/ext/soap/tests/classmap002.phpt Thu Jul 13 16:47:25 2006 @@ -42,3 +42,11 @@ string(3) "aap" } ok +--UEXPECT-- +object(book)#2 (2) { + [u"a"]=> + unicode(5) "Blaat" + [u"b"]=> + unicode(3) "aap" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/server007.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/server007.phpt diff -u php-src/ext/soap/tests/server007.phpt:1.2 php-src/ext/soap/tests/server007.phpt:1.3 --- php-src/ext/soap/tests/server007.phpt:1.2 Thu Feb 5 20:26:03 2004 +++ php-src/ext/soap/tests/server007.phpt Thu Jul 13 16:47:25 2006 @@ -24,3 +24,11 @@ string(3) "Add" } ok +--UEXPECT-- +array(2) { + [0]=> + unicode(3) "Sub" + [1]=> + unicode(3) "Add" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/server008.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/server008.phpt diff -u php-src/ext/soap/tests/server008.phpt:1.2 php-src/ext/soap/tests/server008.phpt:1.3 --- php-src/ext/soap/tests/server008.phpt:1.2 Thu Feb 5 20:26:03 2004 +++ php-src/ext/soap/tests/server008.phpt Thu Jul 13 16:47:25 2006 @@ -27,3 +27,11 @@ string(4) "test" } ok +--UEXPECT-- +array(2) { + [0]=> + unicode(3) "Foo" + [1]=> + unicode(4) "test" +} +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug27722.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug27722.phpt diff -u php-src/ext/soap/tests/bugs/bug27722.phpt:1.1 php-src/ext/soap/tests/bugs/bug27722.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug27722.phpt:1.1 Thu Apr 1 13:42:38 2004 +++ php-src/ext/soap/tests/bugs/bug27722.phpt Thu Jul 13 16:47:25 2006 @@ -1,13 +1,13 @@ ---TEST-- -Bug #27722 (Segfault on schema without targetNamespace) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---GET-- -wsdl ---FILE-- -<?php -$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); -echo "ok\n"; -?> ---EXPECT-- +--TEST-- +Bug #27722 (Segfault on schema without targetNamespace) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); +echo "ok\n"; +?> +--EXPECT-- ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug27742.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug27742.phpt diff -u php-src/ext/soap/tests/bugs/bug27742.phpt:1.1 php-src/ext/soap/tests/bugs/bug27742.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug27742.phpt:1.1 Fri Apr 2 06:23:51 2004 +++ php-src/ext/soap/tests/bugs/bug27742.phpt Thu Jul 13 16:47:25 2006 @@ -1,13 +1,13 @@ ---TEST-- -Bug #27742 (WDSL SOAP Parsing Schema bug) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---GET-- -wsdl ---FILE-- -<?php -$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); -echo "ok\n"; -?> ---EXPECT-- -ok +--TEST-- +Bug #27742 (WDSL SOAP Parsing Schema bug) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--GET-- +wsdl +--FILE-- +<?php +$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28751.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28751.phpt diff -u php-src/ext/soap/tests/bugs/bug28751.phpt:1.1 php-src/ext/soap/tests/bugs/bug28751.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug28751.phpt:1.1 Tue Jul 6 07:30:33 2004 +++ php-src/ext/soap/tests/bugs/bug28751.phpt Thu Jul 13 16:47:25 2006 @@ -1,38 +1,38 @@ ---TEST-- -Bug #28751 (SoapServer does not call _autoload()) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function __autoload($className) { - class SoapServerActions { - function test() { - return "Hello World"; - } - } -} - -$server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); -$server->setClass("SoapServerActions"); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #28751 (SoapServer does not call _autoload()) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function __autoload($className) { + class SoapServerActions { + function test() { + return "Hello World"; + } + } +} + +$server = new SoapServer(NULL, array('uri'=>"http://testuri.org")); +$server->setClass("SoapServerActions"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" 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:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28969.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28969.phpt diff -u php-src/ext/soap/tests/bugs/bug28969.phpt:1.2 php-src/ext/soap/tests/bugs/bug28969.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug28969.phpt:1.2 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug28969.phpt Thu Jul 13 16:47:25 2006 @@ -1,38 +1,47 @@ ---TEST-- -Bug #28969 (Wrong data encoding of special characters) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function test() { - return "¦è¥"; -// return utf8_encode("¦è¥"); -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$x = new LocalSoapClient(NULL,array('location'=>'test://', - 'uri'=>'http://testuri.org', - 'encoding'=>'ISO-8859-1')); -var_dump($x->test()); -echo "ok\n"; -?> ---EXPECT-- -string(3) "¦è¥" -ok +--TEST-- +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() { + return "¦è¥"; +// return utf8_encode("¦è¥"); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug28985.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug28985.phpt diff -u php-src/ext/soap/tests/bugs/bug28985.phpt:1.1 php-src/ext/soap/tests/bugs/bug28985.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug28985.phpt:1.1 Mon Jul 19 14:55:35 2004 +++ php-src/ext/soap/tests/bugs/bug28985.phpt Thu Jul 13 16:47:25 2006 @@ -1,204 +1,399 @@ ---TEST-- -Bug #28985 (__getTypes() returning nothing on complex WSDL) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); -var_dump($client->__getTypes()); -?> ---EXPECT-- -array(42) { - [0]=> - string(100) "struct LoginMGDIS { - string iUserLogin; - string iUserId; - string iUserPassword; - string iProfilId; -}" - [1]=> - string(29) "struct LoginMGDISResponse { -}" - [2]=> - string(28) "struct GetIdentification { -}" - [3]=> - string(77) "struct GetIdentificationResponse { - ArrayOfAnyType GetIdentificationResult; -}" - [4]=> - string(43) "struct ArrayOfAnyType { - anyType anyType; -}" - [5]=> - string(37) "struct RollbackCurrentTransaction { -}" - [6]=> - string(45) "struct RollbackCurrentTransactionResponse { -}" - [7]=> - string(68) "struct GetListeProfil { - string iUserLogin; - string iUserPassword; -}" - [8]=> - string(86) "struct MGCodeLibelle { - string Code; - string Libelle; - boolean Defaut; - anyType Tag; -}" - [9]=> - string(61) "struct ArrayOfMGCodeLibelle { - MGCodeLibelle MGCodeLibelle; -}" - [10]=> - string(77) "struct GetListeProfilResponse { - ArrayOfMGCodeLibelle GetListeProfilResult; -}" - [11]=> - string(41) "struct GetListeValCodif { - string Code; -}" - [12]=> - string(43) "struct ArrayOfMGCodif { - MGCodif MGCodif; -}" - [13]=> - string(18) "struct MGCodif { -}" - [14]=> - string(75) "struct GetListeValCodifResponse { - ArrayOfMGCodif GetListeValCodifResult; -}" - [15]=> - string(39) "struct TestPhpSoap { - MGCodif entree; -}" - [16]=> - string(57) "struct TestPhpSoapResponse { - string TestPhpSoapResult; -}" - [17]=> - string(50) "struct GetListeCodif { - boolean iGetListeValeur; -}" - [18]=> - string(87) "struct MGCodifGrp { - string TypeCodif; - string LibCodif; - ArrayOfMGCodif ListeCodifs; -}" - [19]=> - string(52) "struct ArrayOfMGCodifGrp { - MGCodifGrp MGCodifGrp; -}" - [20]=> - string(72) "struct GetListeCodifResponse { - ArrayOfMGCodifGrp GetListeCodifResult; -}" - [21]=> - string(57) "struct DroitCreation { - string iObjet; - string iProfil; -}" - [22]=> - string(62) "struct DroitCreationResponse { - boolean DroitCreationResult; -}" - [23]=> - string(74) "struct ListeDroitCreation { - ArrayOfString iListeObjet; - string iProfil; -}" - [24]=> - string(40) "struct ArrayOfString { - string string; -}" - [25]=> - string(79) "struct ListeDroitCreationResponse { - ArrayOfAnyType ListeDroitCreationResult; -}" - [26]=> - string(87) "struct GetDroitsObjetProtege { - string iObjet; - string iProfil; - string iUtilisateur; -}" - [27]=> - string(154) "struct MGDroitsObjetProtege { - string LbUti; - string LbProf; - string LbServ; - string LbDir; - boolean isProtected; - ArrayOfMGDroitAcces ListeDroitsAcces; -}" - [28]=> - string(58) "struct ArrayOfMGDroitAcces { - MGDroitAcces MGDroitAcces; -}" - [29]=> - string(104) "struct MGDroitAcces { - string IdProfil; - boolean Lecture; - boolean Modification; - boolean Suppression; -}" - [30]=> - string(91) "struct GetDroitsObjetProtegeResponse { - MGDroitsObjetProtege GetDroitsObjetProtegeResult; -}" - [31]=> - string(76) "struct GetPrivileges { - string iIdSupport; - int iIdForme; - string iProfil; -}" - [32]=> - string(68) "struct GetPrivilegesResponse { - ArrayOfString GetPrivilegesResult; -}" - [33]=> - string(46) "struct GetLibelleProfil { - string iIdProfil; -}" - [34]=> - string(67) "struct GetLibelleProfilResponse { - string GetLibelleProfilResult; -}" - [35]=> - string(91) "struct GetValeurRecherche { - string iChampSource; - string iTable; - string iOrderByClause; -}" - [36]=> - string(78) "struct GetValeurRechercheResponse { - ArrayOfString GetValeurRechercheResult; -}" - [37]=> - string(128) "struct GetValeurRechercheWithClauseWhere { - string iChampSource; - string iTable; - string iClauseWhere; - string iOrderByClause; -}" - [38]=> - string(108) "struct GetValeurRechercheWithClauseWhereResponse { - ArrayOfString GetValeurRechercheWithClauseWhereResult; -}" - [39]=> - string(27) "struct GetEnvironnement { -}" - [40]=> - string(106) "struct MGEnvironnement { - string RepBureautique; - string RepBureautiqueImage; - string RepBureautiqueDoc; -}" - [41]=> - string(76) "struct GetEnvironnementResponse { - MGEnvironnement GetEnvironnementResult; -}" +--TEST-- +Bug #28985 (__getTypes() returning nothing on complex WSDL) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); +var_dump($client->__getTypes()); +?> +--EXPECT-- +array(42) { + [0]=> + string(100) "struct LoginMGDIS { + string iUserLogin; + string iUserId; + string iUserPassword; + string iProfilId; +}" + [1]=> + string(29) "struct LoginMGDISResponse { +}" + [2]=> + string(28) "struct GetIdentification { +}" + [3]=> + string(77) "struct GetIdentificationResponse { + ArrayOfAnyType GetIdentificationResult; +}" + [4]=> + string(43) "struct ArrayOfAnyType { + anyType anyType; +}" + [5]=> + string(37) "struct RollbackCurrentTransaction { +}" + [6]=> + string(45) "struct RollbackCurrentTransactionResponse { +}" + [7]=> + string(68) "struct GetListeProfil { + string iUserLogin; + string iUserPassword; +}" + [8]=> + string(86) "struct MGCodeLibelle { + string Code; + string Libelle; + boolean Defaut; + anyType Tag; +}" + [9]=> + string(61) "struct ArrayOfMGCodeLibelle { + MGCodeLibelle MGCodeLibelle; +}" + [10]=> + string(77) "struct GetListeProfilResponse { + ArrayOfMGCodeLibelle GetListeProfilResult; +}" + [11]=> + string(41) "struct GetListeValCodif { + string Code; +}" + [12]=> + string(43) "struct ArrayOfMGCodif { + MGCodif MGCodif; +}" + [13]=> + string(18) "struct MGCodif { +}" + [14]=> + string(75) "struct GetListeValCodifResponse { + ArrayOfMGCodif GetListeValCodifResult; +}" + [15]=> + string(39) "struct TestPhpSoap { + MGCodif entree; +}" + [16]=> + string(57) "struct TestPhpSoapResponse { + string TestPhpSoapResult; +}" + [17]=> + string(50) "struct GetListeCodif { + boolean iGetListeValeur; +}" + [18]=> + string(87) "struct MGCodifGrp { + string TypeCodif; + string LibCodif; + ArrayOfMGCodif ListeCodifs; +}" + [19]=> + string(52) "struct ArrayOfMGCodifGrp { + MGCodifGrp MGCodifGrp; +}" + [20]=> + string(72) "struct GetListeCodifResponse { + ArrayOfMGCodifGrp GetListeCodifResult; +}" + [21]=> + string(57) "struct DroitCreation { + string iObjet; + string iProfil; +}" + [22]=> + string(62) "struct DroitCreationResponse { + boolean DroitCreationResult; +}" + [23]=> + string(74) "struct ListeDroitCreation { + ArrayOfString iListeObjet; + string iProfil; +}" + [24]=> + string(40) "struct ArrayOfString { + string string; +}" + [25]=> + string(79) "struct ListeDroitCreationResponse { + ArrayOfAnyType ListeDroitCreationResult; +}" + [26]=> + string(87) "struct GetDroitsObjetProtege { + string iObjet; + string iProfil; + string iUtilisateur; +}" + [27]=> + string(154) "struct MGDroitsObjetProtege { + string LbUti; + string LbProf; + string LbServ; + string LbDir; + boolean isProtected; + ArrayOfMGDroitAcces ListeDroitsAcces; +}" + [28]=> + string(58) "struct ArrayOfMGDroitAcces { + MGDroitAcces MGDroitAcces; +}" + [29]=> + string(104) "struct MGDroitAcces { + string IdProfil; + boolean Lecture; + boolean Modification; + boolean Suppression; +}" + [30]=> + string(91) "struct GetDroitsObjetProtegeResponse { + MGDroitsObjetProtege GetDroitsObjetProtegeResult; +}" + [31]=> + string(76) "struct GetPrivileges { + string iIdSupport; + int iIdForme; + string iProfil; +}" + [32]=> + string(68) "struct GetPrivilegesResponse { + ArrayOfString GetPrivilegesResult; +}" + [33]=> + string(46) "struct GetLibelleProfil { + string iIdProfil; +}" + [34]=> + string(67) "struct GetLibelleProfilResponse { + string GetLibelleProfilResult; +}" + [35]=> + string(91) "struct GetValeurRecherche { + string iChampSource; + string iTable; + string iOrderByClause; +}" + [36]=> + string(78) "struct GetValeurRechercheResponse { + ArrayOfString GetValeurRechercheResult; +}" + [37]=> + string(128) "struct GetValeurRechercheWithClauseWhere { + string iChampSource; + string iTable; + string iClauseWhere; + string iOrderByClause; +}" + [38]=> + string(108) "struct GetValeurRechercheWithClauseWhereResponse { + ArrayOfString GetValeurRechercheWithClauseWhereResult; +}" + [39]=> + string(27) "struct GetEnvironnement { +}" + [40]=> + string(106) "struct MGEnvironnement { + string RepBureautique; + string RepBureautiqueImage; + string RepBureautiqueDoc; +}" + [41]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29061.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29061.phpt diff -u php-src/ext/soap/tests/bugs/bug29061.phpt:1.1 php-src/ext/soap/tests/bugs/bug29061.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug29061.phpt:1.1 Mon Jul 19 12:53:29 2004 +++ php-src/ext/soap/tests/bugs/bug29061.phpt Thu Jul 13 16:47:25 2006 @@ -1,12 +1,12 @@ ---TEST-- -Bug #29061 (soap extension segfaults) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); -$client->getQuote("ibm"); -echo "ok\n"; -?> ---EXPECT-- +--TEST-- +Bug #29061 (soap extension segfaults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); +$client->getQuote("ibm"); +echo "ok\n"; +?> +--EXPECT-- ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29109.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29109.phpt diff -u php-src/ext/soap/tests/bugs/bug29109.phpt:1.1 php-src/ext/soap/tests/bugs/bug29109.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug29109.phpt:1.1 Mon Jul 19 13:58:10 2004 +++ php-src/ext/soap/tests/bugs/bug29109.phpt Thu Jul 13 16:47:25 2006 @@ -1,18 +1,27 @@ ---TEST-- -Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); -var_dump($client->__getFunctions()); -?> ---EXPECT-- -array(3) { - [0]=> - string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" - [1]=> - string(19) "string HelloWorld()" - [2]=> - string(19) "string HelloWorld()" +--TEST-- +Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(3) { + [0]=> + string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" + [1]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29236.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29236.phpt diff -u php-src/ext/soap/tests/bugs/bug29236.phpt:1.2 php-src/ext/soap/tests/bugs/bug29236.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug29236.phpt:1.2 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/bugs/bug29236.phpt Thu Jul 13 16:47:25 2006 @@ -1,20 +1,31 @@ ---TEST-- -Bug #29236 (memory error when wsdl-cache is enabled) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); -var_dump($client->__getFunctions()); -?> ---EXPECT-- -array(4) { - [0]=> - string(59) "StartSessionResponse StartSession(StartSession $parameters)" - [1]=> - string(62) "VerifySessionResponse VerifySession(VerifySession $parameters)" - [2]=> - string(41) "LogoutResponse Logout(Logout $parameters)" - [3]=> - string(62) "GetSystemInfoResponse GetSystemInfo(GetSystemInfo $parameters)" -} +--TEST-- +Bug #29236 (memory error when wsdl-cache is enabled) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); +var_dump($client->__getFunctions()); +?> +--EXPECT-- +array(4) { + [0]=> + string(59) "StartSessionResponse StartSession(StartSession $parameters)" + [1]=> + string(62) "VerifySessionResponse VerifySession(VerifySession $parameters)" + [2]=> + string(41) "LogoutResponse Logout(Logout $parameters)" + [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)" +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29795.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29795.phpt diff -u php-src/ext/soap/tests/bugs/bug29795.phpt:1.3 php-src/ext/soap/tests/bugs/bug29795.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29795.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29795.phpt Thu Jul 13 16:47:25 2006 @@ -1,32 +1,32 @@ ---TEST-- -Bug #29795 (SegFault with Soap and Amazon's Web Services) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - } - - function __doRequest($request, $location, $action, $version) { - return <<<EOF -<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope> -EOF; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); -$ar=$client->GetPrice(); -echo "o"; -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); -$ar=$client->GetPrice(); -echo "k\n"; -?> ---EXPECT-- -ok +--TEST-- +Bug #29795 (SegFault with Soap and Amazon's Web Services) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + } + + function __doRequest($request, $location, $action, $version) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "o"; +$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$ar=$client->GetPrice(); +echo "k\n"; +?> +--EXPECT-- +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29830.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29830.phpt diff -u php-src/ext/soap/tests/bugs/bug29830.phpt:1.2 php-src/ext/soap/tests/bugs/bug29830.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug29830.phpt:1.2 Thu Aug 26 12:24:54 2004 +++ php-src/ext/soap/tests/bugs/bug29830.phpt Thu Jul 13 16:47:25 2006 @@ -1,25 +1,25 @@ ---TEST-- -Bug #29844 (SoapServer::setClass() should not export non-public methods) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -class hello_world { - public function hello($to) { - return 'Hello ' . $to; - } - private function bye($to) { - return 'Bye ' . $to; - } -} - -$server = new SoapServer(NULL, array("uri"=>"test://")); -$server->setClass('hello_world'); -$functions = $server->getFunctions(); -foreach($functions as $func) { - echo $func . "\n"; -} -?> ---EXPECT-- -hello +--TEST-- +Bug #29844 (SoapServer::setClass() should not export non-public methods) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } + private function bye($to) { + return 'Bye ' . $to; + } +} + +$server = new SoapServer(NULL, array("uri"=>"test://")); +$server->setClass('hello_world'); +$functions = $server->getFunctions(); +foreach($functions as $func) { + echo $func . "\n"; +} +?> +--EXPECT-- +hello http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29839.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29839.phpt diff -u php-src/ext/soap/tests/bugs/bug29839.phpt:1.3 php-src/ext/soap/tests/bugs/bug29839.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29839.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29839.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,41 @@ ---TEST-- -Bug #29839 incorrect convert (xml:lang to lang) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -function EchoString($s) { - return $s; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('EchoString'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); -$client->EchoString(array("value"=>"hello","lang"=>"en")); -echo $client->__getLastRequest(); -echo $client->__getLastResponse(); -echo "ok\n"; -?> ---EXPECT-- -<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #29839 incorrect convert (xml:lang to lang) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +echo "ok\n"; +?> +--EXPECT-- +<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug29844.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug29844.phpt diff -u php-src/ext/soap/tests/bugs/bug29844.phpt:1.3 php-src/ext/soap/tests/bugs/bug29844.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug29844.phpt:1.3 Mon Sep 13 11:55:24 2004 +++ php-src/ext/soap/tests/bugs/bug29844.phpt Thu Jul 13 16:47:25 2006 @@ -1,36 +1,38 @@ ---TEST-- -Bug #29844 (SOAP doesn't return the result of a valid SOAP request) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -class hello_world { - public function hello($to) { - return 'Hello ' . $to; - } -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->setClass('hello_world');; - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); -var_dump($client->hello('davey')); -?> ---EXPECT-- -string(11) "Hello davey" +--TEST-- +Bug #29844 (SOAP doesn't return the result of a valid SOAP request) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +class hello_world { + public function hello($to) { + return 'Hello ' . $to; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('hello_world');; + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); +var_dump($client->hello('davey')); +?> +--EXPECT-- +string(11) "Hello davey" +--UEXPECT-- +unicode(11) "Hello davey" http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30045.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30045.phpt diff -u php-src/ext/soap/tests/bugs/bug30045.phpt:1.4 php-src/ext/soap/tests/bugs/bug30045.phpt:1.5 --- php-src/ext/soap/tests/bugs/bug30045.phpt:1.4 Mon Apr 10 12:50:14 2006 +++ php-src/ext/soap/tests/bugs/bug30045.phpt Thu Jul 13 16:47:25 2006 @@ -1,171 +1,171 @@ ---TEST-- -Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests) ---SKIPIF-- -<?php - if (!extension_loaded('soap')) die('skip soap extension not available'); - if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); -?> ---FILE-- -<?php - -function foo($type, $num) { - return new SoapVar($num, $type); -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('foo'); - } - - function __doRequest($request, $location, $action, $version) { - $xml = simplexml_load_string($request); - echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; - unset($xml); - - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - - return $response; - } - -} - -$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://")); - -function test($type, $num) { - global $soap; - try { - printf(" %0.0f\n ", $num); - $ret = $soap->foo($type, new SoapVar($num, $type)); - printf(" %0.0f\n", $ret); - } catch (SoapFault $ex) { - var_dump($ex); - } -} -/* -echo "byte\n"; -//test(XSD_BYTE, -129); -test(XSD_BYTE, -128); -test(XSD_BYTE, 127); -//test(XSD_BYTE, 128); - -echo "\nshort\n"; -//test(XSD_SHORT, -32769); -test(XSD_SHORT, -32768); -test(XSD_SHORT, 32767); -//test(XSD_SHORT, 32768); - -echo "\nint\n"; -//test(XSD_INT, -2147483649); -test(XSD_INT, -2147483648); -test(XSD_INT, 2147483647); -//test(XSD_INT, 2147483648); - -echo "\nlong\n"; -//test(XSD_LONG, -9223372036854775809); -test(XSD_LONG, -9223372036854775808); -test(XSD_LONG, 9223372036854775807); -//test(XSD_LONG, 9223372036854775808); - -echo "\nunsignedByte\n"; -//test(XSD_UNSIGNEDBYTE, -1); -test(XSD_UNSIGNEDBYTE, 0); -test(XSD_UNSIGNEDBYTE, 255); -//test(XSD_UNSIGNEDBYTE, 256); - -echo "\nunsignedShort\n"; -//test(XSD_UNSIGNEDSHORT, -1); -test(XSD_UNSIGNEDSHORT, 0); -test(XSD_UNSIGNEDSHORT, 65535); -//test(XSD_UNSIGNEDSHORT, 65536); - -echo "\nunsignedInt\n"; -//test(XSD_UNSIGNEDINT, -1); -test(XSD_UNSIGNEDINT, 0); -test(XSD_UNSIGNEDINT, 4294967295); -//test(XSD_UNSIGNEDINT, 4294967296); - -echo "\nunsignedLong\n"; -//test(XSD_UNSIGNEDLONG, -1); -test(XSD_UNSIGNEDLONG, 0); -test(XSD_UNSIGNEDLONG, 18446744073709551615); -//test(XSD_UNSIGNEDLONG, 18446744073709551616); - -echo "\nnegativeInteger\n"; -test(XSD_NEGATIVEINTEGER, -18446744073709551616); -test(XSD_NEGATIVEINTEGER, -1); -//test(XSD_NEGATIVEINTEGER, 0); - -echo "\nnonPositiveInteger\n"; -test(XSD_NONPOSITIVEINTEGER, -18446744073709551616); -test(XSD_NONPOSITIVEINTEGER, 0); -//test(XSD_NONPOSITIVEINTEGER, 1); - -echo "\nnonNegativeInteger\n"; -//test(XSD_NONNEGATIVEINTEGER, -1); -test(XSD_NONNEGATIVEINTEGER, 0); -test(XSD_NONNEGATIVEINTEGER, 18446744073709551616); - -echo "\nPositiveInteger\n"; -//test(XSD_POSITIVEINTEGER, 0); -test(XSD_POSITIVEINTEGER, 1); -test(XSD_POSITIVEINTEGER, 18446744073709551616); - -echo "\ninteger\n"; -test(XSD_INTEGER, -18446744073709551616); -test(XSD_INTEGER, 18446744073709551616); -*/ -echo "long\n"; -test(XSD_LONG, 2147483647); -test(XSD_LONG, 2147483648); -test(XSD_LONG, 4294967296); -test(XSD_LONG, 8589934592); -test(XSD_LONG, 17179869184); - -echo "\nunsignedLong\n"; -test(XSD_UNSIGNEDLONG, 2147483647); -test(XSD_UNSIGNEDLONG, 2147483648); -test(XSD_UNSIGNEDLONG, 4294967296); -test(XSD_UNSIGNEDLONG, 8589934592); -test(XSD_UNSIGNEDLONG, 17179869184); - -?> ---EXPECT-- -long - 2147483647 - <param1 xsi:type="xsd:long">2147483647</param1> - 2147483647 - 2147483648 - <param1 xsi:type="xsd:long">2147483648</param1> - 2147483648 - 4294967296 - <param1 xsi:type="xsd:long">4294967296</param1> - 4294967296 - 8589934592 - <param1 xsi:type="xsd:long">8589934592</param1> - 8589934592 - 17179869184 - <param1 xsi:type="xsd:long">17179869184</param1> - 17179869184 - -unsignedLong - 2147483647 - <param1 xsi:type="xsd:unsignedLong">2147483647</param1> - 2147483647 - 2147483648 - <param1 xsi:type="xsd:unsignedLong">2147483648</param1> - 2147483648 - 4294967296 - <param1 xsi:type="xsd:unsignedLong">4294967296</param1> - 4294967296 - 8589934592 - <param1 xsi:type="xsd:unsignedLong">8589934592</param1> - 8589934592 - 17179869184 - <param1 xsi:type="xsd:unsignedLong">17179869184</param1> - 17179869184 +--TEST-- +Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); + if (!extension_loaded('simplexml')) die('skip simplexml extension not available'); +?> +--FILE-- +<?php + +function foo($type, $num) { + return new SoapVar($num, $type); +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('foo'); + } + + function __doRequest($request, $location, $action, $version) { + $xml = simplexml_load_string($request); + echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; + unset($xml); + + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + + return $response; + } + +} + +$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://")); + +function test($type, $num) { + global $soap; + try { + printf(" %0.0f\n ", $num); + $ret = $soap->foo($type, new SoapVar($num, $type)); + printf(" %0.0f\n", $ret); + } catch (SoapFault $ex) { + var_dump($ex); + } +} +/* +echo "byte\n"; +//test(XSD_BYTE, -129); +test(XSD_BYTE, -128); +test(XSD_BYTE, 127); +//test(XSD_BYTE, 128); + +echo "\nshort\n"; +//test(XSD_SHORT, -32769); +test(XSD_SHORT, -32768); +test(XSD_SHORT, 32767); +//test(XSD_SHORT, 32768); + +echo "\nint\n"; +//test(XSD_INT, -2147483649); +test(XSD_INT, -2147483648); +test(XSD_INT, 2147483647); +//test(XSD_INT, 2147483648); + +echo "\nlong\n"; +//test(XSD_LONG, -9223372036854775809); +test(XSD_LONG, -9223372036854775808); +test(XSD_LONG, 9223372036854775807); +//test(XSD_LONG, 9223372036854775808); + +echo "\nunsignedByte\n"; +//test(XSD_UNSIGNEDBYTE, -1); +test(XSD_UNSIGNEDBYTE, 0); +test(XSD_UNSIGNEDBYTE, 255); +//test(XSD_UNSIGNEDBYTE, 256); + +echo "\nunsignedShort\n"; +//test(XSD_UNSIGNEDSHORT, -1); +test(XSD_UNSIGNEDSHORT, 0); +test(XSD_UNSIGNEDSHORT, 65535); +//test(XSD_UNSIGNEDSHORT, 65536); + +echo "\nunsignedInt\n"; +//test(XSD_UNSIGNEDINT, -1); +test(XSD_UNSIGNEDINT, 0); +test(XSD_UNSIGNEDINT, 4294967295); +//test(XSD_UNSIGNEDINT, 4294967296); + +echo "\nunsignedLong\n"; +//test(XSD_UNSIGNEDLONG, -1); +test(XSD_UNSIGNEDLONG, 0); +test(XSD_UNSIGNEDLONG, 18446744073709551615); +//test(XSD_UNSIGNEDLONG, 18446744073709551616); + +echo "\nnegativeInteger\n"; +test(XSD_NEGATIVEINTEGER, -18446744073709551616); +test(XSD_NEGATIVEINTEGER, -1); +//test(XSD_NEGATIVEINTEGER, 0); + +echo "\nnonPositiveInteger\n"; +test(XSD_NONPOSITIVEINTEGER, -18446744073709551616); +test(XSD_NONPOSITIVEINTEGER, 0); +//test(XSD_NONPOSITIVEINTEGER, 1); + +echo "\nnonNegativeInteger\n"; +//test(XSD_NONNEGATIVEINTEGER, -1); +test(XSD_NONNEGATIVEINTEGER, 0); +test(XSD_NONNEGATIVEINTEGER, 18446744073709551616); + +echo "\nPositiveInteger\n"; +//test(XSD_POSITIVEINTEGER, 0); +test(XSD_POSITIVEINTEGER, 1); +test(XSD_POSITIVEINTEGER, 18446744073709551616); + +echo "\ninteger\n"; +test(XSD_INTEGER, -18446744073709551616); +test(XSD_INTEGER, 18446744073709551616); +*/ +echo "long\n"; +test(XSD_LONG, 2147483647); +test(XSD_LONG, 2147483648); +test(XSD_LONG, 4294967296); +test(XSD_LONG, 8589934592); +test(XSD_LONG, 17179869184); + +echo "\nunsignedLong\n"; +test(XSD_UNSIGNEDLONG, 2147483647); +test(XSD_UNSIGNEDLONG, 2147483648); +test(XSD_UNSIGNEDLONG, 4294967296); +test(XSD_UNSIGNEDLONG, 8589934592); +test(XSD_UNSIGNEDLONG, 17179869184); + +?> +--EXPECT-- +long + 2147483647 + <param1 xsi:type="xsd:long">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:long">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:long">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:long">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:long">17179869184</param1> + 17179869184 + +unsignedLong + 2147483647 + <param1 xsi:type="xsd:unsignedLong">2147483647</param1> + 2147483647 + 2147483648 + <param1 xsi:type="xsd:unsignedLong">2147483648</param1> + 2147483648 + 4294967296 + <param1 xsi:type="xsd:unsignedLong">4294967296</param1> + 4294967296 + 8589934592 + <param1 xsi:type="xsd:unsignedLong">8589934592</param1> + 8589934592 + 17179869184 + <param1 xsi:type="xsd:unsignedLong">17179869184</param1> + 17179869184 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30106.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30106.phpt diff -u php-src/ext/soap/tests/bugs/bug30106.phpt:1.2 php-src/ext/soap/tests/bugs/bug30106.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30106.phpt:1.2 Tue Mar 22 10:19:08 2005 +++ php-src/ext/soap/tests/bugs/bug30106.phpt Thu Jul 13 16:47:25 2006 @@ -1,72 +1,106 @@ ---TEST-- -Bug #30106 SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception. ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -function getContinentList() { - return array("getContinentListResult"=>array( - "schema"=>"<xsd:schema><element name=\"test\" type=\"xsd:string\"/></xsd:schema>", - "any"=>"<test>Hello World!</test><test>Bye World!</test>")); -} - -class LocalSoapClient extends SoapClient { - function __construct($wsdl, $options=array()) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction("getContinentList"); - } - - function __doRequest($request, $location, $action, $version) { - echo $request; - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - echo $response; - return $response; - } -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); -var_dump($client->__getFunctions()); -var_dump($client->__getTypes()); -$x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); -var_dump($x); -?> ---EXPECTF-- -array(1) { - [0]=> - string(71) "getContinentListResponse getContinentList(getContinentList $parameters)" -} -array(3) { - [0]=> - string(64) "struct getContinentList { - int AFFILIATE_ID; - string PASSWORD; -}" - [1]=> - string(83) "struct getContinentListResponse { - getContinentListResult getContinentListResult; -}" - [2]=> - string(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) { - ["getContinentListResult"]=> - object(stdClass)#%d (2) { - ["schema"]=> - string(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>" - ["any"]=> - string(48) "<test>Hello World!</test><test>Bye World!</test>" - } -} +--TEST-- +Bug #30106 SOAP cannot not parse 'ref' element. Causes Uncaught SoapFault exception. +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function getContinentList() { + return array("getContinentListResult"=>array( + "schema"=>"<xsd:schema><element name=\"test\" type=\"xsd:string\"/></xsd:schema>", + "any"=>"<test>Hello World!</test><test>Bye World!</test>")); +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("getContinentList"); + } + + function __doRequest($request, $location, $action, $version) { + echo $request; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + echo $response; + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); +var_dump($client->__getFunctions()); +var_dump($client->__getTypes()); +$x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); +var_dump($x); +?> +--EXPECTF-- +array(1) { + [0]=> + string(71) "getContinentListResponse getContinentList(getContinentList $parameters)" +} +array(3) { + [0]=> + string(64) "struct getContinentList { + int AFFILIATE_ID; + string PASSWORD; +}" + [1]=> + string(83) "struct getContinentListResponse { + getContinentListResult getContinentListResult; +}" + [2]=> + string(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) { + ["getContinentListResult"]=> + object(stdClass)#%d (2) { + ["schema"]=> + string(65) "<xsd:schema><element name="test" type="xsd:string"/></xsd:schema>" + ["any"]=> + 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>" + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30175.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30175.phpt diff -u php-src/ext/soap/tests/bugs/bug30175.phpt:1.2 php-src/ext/soap/tests/bugs/bug30175.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30175.phpt:1.2 Tue Oct 5 16:00:40 2004 +++ php-src/ext/soap/tests/bugs/bug30175.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,56 @@ ---TEST-- -Bug #30175 (SOAP results aren't parsed correctly) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php - -class LocalSoapClient extends SoapClient { - - function __doRequest($request, $location, $action, $version) { - return <<<EOF -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope -xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -xmlns:ns1="urn:qweb"> -<SOAP-ENV:Body -SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -id="_0"> -<ns1:HostInfo xsi:type="ns1:HostInfo"> -<name xsi:type="xsd:string">blah blah some name field</name> -<shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription> -<ipAddress xsi:type="xsd:string">127.0.0.1</ipAddress> -</ns1:HostInfo> -</SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); -var_dump($client->qwebGetHostInfo()); -?> ---EXPECT-- -array(3) { - ["name"]=> - string(25) "blah blah some name field" - ["shortDescription"]=> - string(42) "This is a description. more blah blah blah" - ["ipAddress"]=> - string(9) "127.0.0.1" -} +--TEST-- +Bug #30175 (SOAP results aren't parsed correctly) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php + +class LocalSoapClient extends SoapClient { + + function __doRequest($request, $location, $action, $version) { + return <<<EOF +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope +xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:ns1="urn:qweb"> +<SOAP-ENV:Body +SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +id="_0"> +<ns1:HostInfo xsi:type="ns1:HostInfo"> +<name xsi:type="xsd:string">blah blah some name field</name> +<shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription> +<ipAddress xsi:type="xsd:string">127.0.0.1</ipAddress> +</ns1:HostInfo> +</SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); +var_dump($client->qwebGetHostInfo()); +?> +--EXPECT-- +array(3) { + ["name"]=> + string(25) "blah blah some name field" + ["shortDescription"]=> + string(42) "This is a description. more blah blah blah" + ["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" +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30799.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30799.phpt diff -u php-src/ext/soap/tests/bugs/bug30799.phpt:1.2 php-src/ext/soap/tests/bugs/bug30799.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30799.phpt:1.2 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug30799.phpt Thu Jul 13 16:47:25 2006 @@ -1,25 +1,25 @@ ---TEST-- -Bug #30799 SoapServer doesn't handle private or protected properties ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class foo { - public $a="a"; - private $b="b"; - protected $c="c"; - -} - -$x = new SoapClient(NULL,array("location"=>"test://", - "uri" => "test://", - "exceptions" => 0, - "trace" => 1 )); -$x->test(new foo()); -echo $x->__getLastRequest(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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><param0 xsi:type="SOAP-ENC:Struct"><a xsi:type="xsd:string">a</a><b xsi:type="xsd:string">b</b><c xsi:type="xsd:string">c</c></param0></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #30799 SoapServer doesn't handle private or protected properties +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; + +} + +$x = new SoapClient(NULL,array("location"=>"test://", + "uri" => "test://", + "exceptions" => 0, + "trace" => 1 )); +$x->test(new foo()); +echo $x->__getLastRequest(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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><param0 xsi:type="SOAP-ENC:Struct"><a xsi:type="xsd:string">a</a><b xsi:type="xsd:string">b</b><c xsi:type="xsd:string">c</c></param0></ns1:test></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30928.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30928.phpt diff -u php-src/ext/soap/tests/bugs/bug30928.phpt:1.4 php-src/ext/soap/tests/bugs/bug30928.phpt:1.5 --- php-src/ext/soap/tests/bugs/bug30928.phpt:1.4 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug30928.phpt Thu Jul 13 16:47:25 2006 @@ -1,63 +1,81 @@ ---TEST-- -Bug #30928 When Using WSDL, SoapServer doesn't handle private or protected properties ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -class foo { - public $a="a"; - private $b="b"; - protected $c="c"; -} - -function test($x) { - return $x; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", - array()); -var_dump($x->test(new foo())); - -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", - array("classmap" => array('testType'=>'foo'))); -var_dump($x->test(new foo())); - -echo "ok\n"; -?> ---EXPECTF-- -object(stdClass)#%d (3) { - ["a"]=> - string(1) "a" - ["b"]=> - string(1) "b" - ["c"]=> - string(1) "c" -} -object(foo)#%d (3) { - ["a"]=> - string(1) "a" - ["b":"foo":private]=> - string(1) "b" - ["c":protected]=> - string(1) "c" -} -ok +--TEST-- +Bug #30928 When Using WSDL, SoapServer doesn't handle private or protected properties +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class foo { + public $a="a"; + private $b="b"; + protected $c="c"; +} + +function test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array()); +var_dump($x->test(new foo())); + +$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", + array("classmap" => array('testType'=>'foo'))); +var_dump($x->test(new foo())); + +echo "ok\n"; +?> +--EXPECTF-- +object(stdClass)#%d (3) { + ["a"]=> + string(1) "a" + ["b"]=> + string(1) "b" + ["c"]=> + string(1) "c" +} +object(foo)#%d (3) { + ["a"]=> + string(1) "a" + ["b":"foo":private]=> + string(1) "b" + ["c":protected]=> + 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug30994.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug30994.phpt diff -u php-src/ext/soap/tests/bugs/bug30994.phpt:1.2 php-src/ext/soap/tests/bugs/bug30994.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug30994.phpt:1.2 Tue Dec 14 13:58:57 2004 +++ php-src/ext/soap/tests/bugs/bug30994.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,47 @@ ---TEST-- -Bug #30994 SOAP server unable to handle request with references ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="utf-8"?> -<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" - xmlns:tns="http://spock/kunta/kunta" - xmlns:types="http://spock/kunta/kunta/encodedTypes" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - -<soap:Body -soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> - <q1:bassCall xmlns:q1="http://spock/bass/types/kunta"> - <system xsi:type="xsd:string">XXX</system> - <function xsi:type="xsd:string">TASKTEST</function> - <parameter href="#id1" /> - </q1:bassCall> - - <soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]"> - <Item href="#id2" /> - </soapenc:Array> - - <tns:Item id="id2" xsi:type="tns:Item"> - <key xsi:type="xsd:string">ABCabc123</key> - <val xsi:type="xsd:string">123456</val> - </tns:Item> - -</soap:Body> -</soap:Envelope> -EOF; - -function bassCall() { - return "ok"; -} - -$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); -$x->addFunction("bassCall"); -$x->handle(); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://spock/kunta/kunta" 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:bassCallResponse><return xsi:type="xsd:string">ok</return></ns1:bassCallResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #30994 SOAP server unable to handle request with references +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="utf-8"?> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:tns="http://spock/kunta/kunta" + xmlns:types="http://spock/kunta/kunta/encodedTypes" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + +<soap:Body +soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <q1:bassCall xmlns:q1="http://spock/bass/types/kunta"> + <system xsi:type="xsd:string">XXX</system> + <function xsi:type="xsd:string">TASKTEST</function> + <parameter href="#id1" /> + </q1:bassCall> + + <soapenc:Array id="id1" soapenc:arrayType="tns:Item[1]"> + <Item href="#id2" /> + </soapenc:Array> + + <tns:Item id="id2" xsi:type="tns:Item"> + <key xsi:type="xsd:string">ABCabc123</key> + <val xsi:type="xsd:string">123456</val> + </tns:Item> + +</soap:Body> +</soap:Envelope> +EOF; + +function bassCall() { + return "ok"; +} + +$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); +$x->addFunction("bassCall"); +$x->handle(); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://spock/kunta/kunta" 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:bassCallResponse><return xsi:type="xsd:string">ok</return></ns1:bassCallResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31422.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31422.phpt diff -u php-src/ext/soap/tests/bugs/bug31422.phpt:1.2 php-src/ext/soap/tests/bugs/bug31422.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug31422.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/bugs/bug31422.phpt Thu Jul 13 16:47:25 2006 @@ -1,42 +1,42 @@ ---TEST-- -Bug #31422 No Error-Logging on SoapServer-Side ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -log_errors=1 ---FILE-- -<?php -function Add($x,$y) { - fopen(); - user_error("Hello", E_USER_ERROR); - return $x+$y; -} - -$server = new SoapServer(null,array('uri'=>"http://testuri.org")); -$server->addfunction("Add"); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:Add xmlns:ns1="http://testuri.org"> - <x xsi:type="xsd:int">22</x> - <y xsi:type="xsd:int">33</y> - </ns1:Add> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; - -$server->handle(); -echo "ok\n"; -?> ---EXPECTF-- -PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d -PHP Fatal error: Hello in %sbug31422.php on line %d -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #31422 No Error-Logging on SoapServer-Side +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +log_errors=1 +--FILE-- +<?php +function Add($x,$y) { + fopen(); + user_error("Hello", E_USER_ERROR); + return $x+$y; +} + +$server = new SoapServer(null,array('uri'=>"http://testuri.org")); +$server->addfunction("Add"); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:Add xmlns:ns1="http://testuri.org"> + <x xsi:type="xsd:int">22</x> + <y xsi:type="xsd:int">33</y> + </ns1:Add> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; + +$server->handle(); +echo "ok\n"; +?> +--EXPECTF-- +PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422.php on line %d +PHP Fatal error: Hello in %sbug31422.php on line %d +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31695.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31695.phpt diff -u php-src/ext/soap/tests/bugs/bug31695.phpt:1.2 php-src/ext/soap/tests/bugs/bug31695.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug31695.phpt:1.2 Wed Mar 23 07:11:55 2005 +++ php-src/ext/soap/tests/bugs/bug31695.phpt Thu Jul 13 16:47:25 2006 @@ -1,62 +1,62 @@ ---TEST-- -Bug #31695 Cannot redefine endpoint when using WSDL ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -function Test($x) { - return $x; -} - -class LocalSoapClient extends SoapClient { - function __construct($wsdl, $options=array()) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction("Test"); - } - - function __doRequest($request, $location, $action, $version) { - echo "$location\n"; - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); -$client->Test("str"); -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); -$client->Test("str"); -$client->__soapCall("Test", - array("arg1"), - array("location"=>"test://2")); -$old = $client->__setLocation("test://3"); -echo "$old\n"; -$client->Test("str"); -$client->Test("str"); -$client->__setLocation($old); -$client->Test("str"); -$old = $client->__setLocation(); -$client->Test("str"); -$client->__setLocation($old); -$client->Test("str"); -$client->__setLocation(null); -$client->Test("str"); -var_dump($client->__setLocation()); -?> ---EXPECT-- -test://0 -test://1 -test://2 -test://1 -test://3 -test://3 -test://1 -test://0 -test://1 -test://0 -NULL +--TEST-- +Bug #31695 Cannot redefine endpoint when using WSDL +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +function Test($x) { + return $x; +} + +class LocalSoapClient extends SoapClient { + function __construct($wsdl, $options=array()) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("Test"); + } + + function __doRequest($request, $location, $action, $version) { + echo "$location\n"; + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); +$client->Test("str"); +$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); +$client->Test("str"); +$client->__soapCall("Test", + array("arg1"), + array("location"=>"test://2")); +$old = $client->__setLocation("test://3"); +echo "$old\n"; +$client->Test("str"); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$old = $client->__setLocation(); +$client->Test("str"); +$client->__setLocation($old); +$client->Test("str"); +$client->__setLocation(null); +$client->Test("str"); +var_dump($client->__setLocation()); +?> +--EXPECT-- +test://0 +test://1 +test://2 +test://1 +test://3 +test://3 +test://1 +test://0 +test://1 +test://0 +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug31755.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug31755.phpt diff -u php-src/ext/soap/tests/bugs/bug31755.phpt:1.3 php-src/ext/soap/tests/bugs/bug31755.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug31755.phpt:1.3 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug31755.phpt Thu Jul 13 16:47:25 2006 @@ -1,17 +1,17 @@ ---TEST-- -Bug #31422 No Error-Logging on SoapServer-Side ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$client=new SOAPClient(null, array('location' => 'http://localhost', -'uri' => 'myNS', 'exceptions' => false, 'trace' => true)); - -$header = new SOAPHeader(null, 'foo', 'bar'); - -$response= $client->__call('function', array(), null, $header); - -print $client->__getLastRequest(); -?> ---EXPECTF-- -Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace. in %s on line %d +--TEST-- +Bug #31422 No Error-Logging on SoapServer-Side +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$client=new SOAPClient(null, array('location' => 'http://localhost', +'uri' => 'myNS', 'exceptions' => false, 'trace' => true)); + +$header = new SOAPHeader(null, 'foo', 'bar'); + +$response= $client->__call('function', array(), null, $header); + +print $client->__getLastRequest(); +?> +--EXPECTF-- +Fatal error: SoapHeader::__construct(): Invalid parameters. Invalid namespace. in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug32776.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug32776.phpt diff -u php-src/ext/soap/tests/bugs/bug32776.phpt:1.2 php-src/ext/soap/tests/bugs/bug32776.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug32776.phpt:1.2 Wed Apr 20 10:59:02 2005 +++ php-src/ext/soap/tests/bugs/bug32776.phpt Thu Jul 13 16:47:25 2006 @@ -1,47 +1,55 @@ ---TEST-- -Bug #32776 SOAP doesn't support one-way operations ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -$d = null; - -function test($x) { - global $d; - $d = $x; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); -var_dump($x->test("Hello")); -var_dump($d); -var_dump($x->__getLastRequest()); -var_dump($x->__getLastResponse()); -echo "ok\n"; -?> ---EXPECT-- -NULL -string(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 +--TEST-- +Bug #32776 SOAP doesn't support one-way operations +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +$d = null; + +function test($x) { + global $d; + $d = $x; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); +var_dump($x->test("Hello")); +var_dump($d); +var_dump($x->__getLastRequest()); +var_dump($x->__getLastResponse()); +echo "ok\n"; +?> +--EXPECT-- +NULL +string(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 +--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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34449.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34449.phpt diff -u php-src/ext/soap/tests/bugs/bug34449.phpt:1.3 php-src/ext/soap/tests/bugs/bug34449.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug34449.phpt:1.3 Fri May 26 09:04:53 2006 +++ php-src/ext/soap/tests/bugs/bug34449.phpt Thu Jul 13 16:47:25 2006 @@ -1,20 +1,20 @@ ---TEST-- -Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -class TestSoapClient extends SoapClient { - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - exit; - } -} - -$my_xml = "<array><item/><item/><item/></array>"; -$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://')); -$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML)); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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:AnyFunction><array><item/><item/><item/></array></ns1:AnyFunction></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #34449 (ext/soap: XSD_ANYXML functionality not exposed) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +class TestSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + exit; + } +} + +$my_xml = "<array><item/><item/><item/></array>"; +$client = new TestSoapClient(null, array('location' => 'test://', 'uri' => 'test://')); +$client->AnyFunction(new SoapVar($my_xml, XSD_ANYXML)); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="test://" 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:AnyFunction><array><item/><item/><item/></array></ns1:AnyFunction></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34453.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34453.phpt diff -u php-src/ext/soap/tests/bugs/bug34453.phpt:1.1 php-src/ext/soap/tests/bugs/bug34453.phpt:1.2 --- php-src/ext/soap/tests/bugs/bug34453.phpt:1.1 Wed Sep 28 11:23:32 2005 +++ php-src/ext/soap/tests/bugs/bug34453.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,41 @@ ---TEST-- -Bug #29839 incorrect convert (xml:lang to lang) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php - -function EchoString($s) { - return $s; -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('EchoString'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); -$client->EchoString(array("value"=>"hello","lang"=>"en")); -echo $client->__getLastRequest(); -echo $client->__getLastResponse(); -echo "ok\n"; -?> ---EXPECT-- -<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #29839 incorrect convert (xml:lang to lang) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + +function EchoString($s) { + return $s; +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('EchoString'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); +$client->EchoString(array("value"=>"hello","lang"=>"en")); +echo $client->__getLastRequest(); +echo $client->__getLastResponse(); +echo "ok\n"; +?> +--EXPECT-- +<?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><string xml:lang="en"><ns1:value>hello</ns1:value></string></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://test-uri"><SOAP-ENV:Body><string xml:lang="en"><ns1:value>hello</ns1:value></string></SOAP-ENV:Body></SOAP-ENV:Envelope> ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug34643.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug34643.phpt diff -u php-src/ext/soap/tests/bugs/bug34643.phpt:1.2 php-src/ext/soap/tests/bugs/bug34643.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug34643.phpt:1.2 Mon Oct 3 09:52:54 2005 +++ php-src/ext/soap/tests/bugs/bug34643.phpt Thu Jul 13 16:47:25 2006 @@ -1,48 +1,48 @@ ---TEST-- -Bug #34643 (wsdl default value) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled", 0); - -class fp { - public function get_it($opt="zzz") { - return $opt; - } -} - -class LocalSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->setClass('fp'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } - -} - -$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); -print_r($cl->__getFunctions()); -echo $cl->get_it("aaa")."\n"; -echo $cl->get_it()."\n"; -var_dump($cl->get_it(null)); -?> ---EXPECT-- -Array -( - [0] => string get_it(string $opt) -) -aaa -zzz -NULL +--TEST-- +Bug #34643 (wsdl default value) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled", 0); + +class fp { + public function get_it($opt="zzz") { + return $opt; + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setClass('fp'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); +print_r($cl->__getFunctions()); +echo $cl->get_it("aaa")."\n"; +echo $cl->get_it()."\n"; +var_dump($cl->get_it(null)); +?> +--EXPECT-- +Array +( + [0] => string get_it(string $opt) +) +aaa +zzz +NULL http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug35142.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug35142.phpt diff -u php-src/ext/soap/tests/bugs/bug35142.phpt:1.3 php-src/ext/soap/tests/bugs/bug35142.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug35142.phpt:1.3 Fri Mar 3 09:20:51 2006 +++ php-src/ext/soap/tests/bugs/bug35142.phpt Thu Jul 13 16:47:25 2006 @@ -1,135 +1,181 @@ ---TEST-- -Bug #35142 SOAP Client/Server Complex Object Support ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled",0); -$timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; - -function PostEvents($x) { - var_dump($x); - exit(); - return $x; -} - -class TestSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('PostEvents'); - } - - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - $this->server->handle($request); - return $response; - } - -} - -$soapClient = new TestSoapClient($wsdl, - array('trace' => 1, 'exceptions' => 0, - 'classmap' => array('logOnEvent' => 'LogOnEvent', - 'logOffEvent' => 'LogOffEvent', - 'events' => 'IVREvents'))); - -$logOnEvent = new LogOnEvent(34567, $timestamp); -$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); -$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); -$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); - -$result = $soapClient->PostEvents($ivrEvents); - -class LogOffEvent { - public $audienceMemberId; - public $timestamp; - public $smokeStatus; - public $callInitiator; - - function __construct($audienceMemberId, $timestamp, $smokeStatus) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - $this->smokeStatus = $smokeStatus; - $this->callInitiator = "IVR"; - } -} - -class LogOnEvent { - public $audienceMemberId; - public $timestamp; - - function __construct($audienceMemberId, $timestamp) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - } -} - -class IVREvents { - public $version; - public $activityId; - public $messageId; - public $source; - public $logOnEvent; - public $logOffEvent; - - function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { - $this->version = $version; - $this->activityId = $activityId; - $this->messageId = $messageId; - $this->source = $source; - $this->logOnEvent = $logOnEvent; - $this->logOffEvent = $logOffEvent; - } -} -?> ---EXPECTF-- -<?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) { - ["version"]=> - string(3) "1.0" - ["activityId"]=> - int(101) - ["messageId"]=> - int(12345) - ["source"]=> - string(3) "IVR" - ["logOnEvent"]=> - object(LogOnEvent)#%d (2) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - } - ["logOffEvent"]=> - array(2) { - [0]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(6) "Smoked" - ["callInitiator"]=> - string(3) "IVR" - } - [1]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34568) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(9) "SmokeFree" - ["callInitiator"]=> - string(3) "IVR" - } - } -} +--TEST-- +Bug #35142 SOAP Client/Server Complex Object Support +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'))); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?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) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + object(LogOnEvent)#%d (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} +--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" + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36226.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36226.phpt diff -u php-src/ext/soap/tests/bugs/bug36226.phpt:1.3 php-src/ext/soap/tests/bugs/bug36226.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36226.phpt:1.3 Fri Mar 3 09:20:51 2006 +++ php-src/ext/soap/tests/bugs/bug36226.phpt Thu Jul 13 16:47:25 2006 @@ -1,139 +1,188 @@ ---TEST-- -Bug #36226 SOAP Inconsistent handling when passing potential arrays. ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -ini_set("soap.wsdl_cache_enabled",0); -$timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; - -function PostEvents($x) { - var_dump($x); - exit(); - return $x; -} - -class TestSoapClient extends SoapClient { - - function __construct($wsdl, $options) { - parent::__construct($wsdl, $options); - $this->server = new SoapServer($wsdl, $options); - $this->server->addFunction('PostEvents'); - } - - function __doRequest($request, $location, $action, $version) { - echo "$request\n"; - $this->server->handle($request); - return $response; - } - -} - -$soapClient = new TestSoapClient($wsdl, - array('trace' => 1, 'exceptions' => 0, - 'classmap' => array('logOnEvent' => 'LogOnEvent', - 'logOffEvent' => 'LogOffEvent', - 'events' => 'IVREvents'), - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)); - -$logOnEvent = new LogOnEvent(34567, $timestamp); -$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); -$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); -$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); - -$result = $soapClient->PostEvents($ivrEvents); - -class LogOffEvent { - public $audienceMemberId; - public $timestamp; - public $smokeStatus; - public $callInitiator; - - function __construct($audienceMemberId, $timestamp, $smokeStatus) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - $this->smokeStatus = $smokeStatus; - $this->callInitiator = "IVR"; - } -} - -class LogOnEvent { - public $audienceMemberId; - public $timestamp; - - function __construct($audienceMemberId, $timestamp) { - $this->audienceMemberId = $audienceMemberId; - $this->timestamp = $timestamp; - } -} - -class IVREvents { - public $version; - public $activityId; - public $messageId; - public $source; - public $logOnEvent; - public $logOffEvent; - - function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { - $this->version = $version; - $this->activityId = $activityId; - $this->messageId = $messageId; - $this->source = $source; - $this->logOnEvent = $logOnEvent; - $this->logOffEvent = $logOffEvent; - } -} -?> ---EXPECTF-- -<?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) { - ["version"]=> - string(3) "1.0" - ["activityId"]=> - int(101) - ["messageId"]=> - int(12345) - ["source"]=> - string(3) "IVR" - ["logOnEvent"]=> - array(1) { - [0]=> - object(LogOnEvent)#10 (2) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - } - } - ["logOffEvent"]=> - array(2) { - [0]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34567) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(6) "Smoked" - ["callInitiator"]=> - string(3) "IVR" - } - [1]=> - object(LogOffEvent)#%d (4) { - ["audienceMemberId"]=> - int(34568) - ["timestamp"]=> - string(25) "2005-11-08T11:22:07+03:00" - ["smokeStatus"]=> - string(9) "SmokeFree" - ["callInitiator"]=> - string(3) "IVR" - } - } -} +--TEST-- +Bug #36226 SOAP Inconsistent handling when passing potential arrays. +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$timestamp = "2005-11-08T11:22:07+03:00"; +$wsdl = dirname(__FILE__)."/bug35142.wsdl"; + +function PostEvents($x) { + var_dump($x); + exit(); + return $x; +} + +class TestSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction('PostEvents'); + } + + function __doRequest($request, $location, $action, $version) { + echo "$request\n"; + $this->server->handle($request); + return $response; + } + +} + +$soapClient = new TestSoapClient($wsdl, + array('trace' => 1, 'exceptions' => 0, + 'classmap' => array('logOnEvent' => 'LogOnEvent', + 'logOffEvent' => 'LogOffEvent', + 'events' => 'IVREvents'), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)); + +$logOnEvent = new LogOnEvent(34567, $timestamp); +$logOffEvents[] = new LogOffEvent(34567, $timestamp, "Smoked"); +$logOffEvents[] = new LogOffEvent(34568, $timestamp, "SmokeFree"); +$ivrEvents = new IVREvents("1.0", 101, 12345, 'IVR', $logOnEvent, $logOffEvents); + +$result = $soapClient->PostEvents($ivrEvents); + +class LogOffEvent { + public $audienceMemberId; + public $timestamp; + public $smokeStatus; + public $callInitiator; + + function __construct($audienceMemberId, $timestamp, $smokeStatus) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + $this->smokeStatus = $smokeStatus; + $this->callInitiator = "IVR"; + } +} + +class LogOnEvent { + public $audienceMemberId; + public $timestamp; + + function __construct($audienceMemberId, $timestamp) { + $this->audienceMemberId = $audienceMemberId; + $this->timestamp = $timestamp; + } +} + +class IVREvents { + public $version; + public $activityId; + public $messageId; + public $source; + public $logOnEvent; + public $logOffEvent; + + function __construct($version, $activityId, $messageId, $source, $logOnEvent=NULL, $logOffEvent=NULL) { + $this->version = $version; + $this->activityId = $activityId; + $this->messageId = $messageId; + $this->source = $source; + $this->logOnEvent = $logOnEvent; + $this->logOffEvent = $logOffEvent; + } +} +?> +--EXPECTF-- +<?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) { + ["version"]=> + string(3) "1.0" + ["activityId"]=> + int(101) + ["messageId"]=> + int(12345) + ["source"]=> + string(3) "IVR" + ["logOnEvent"]=> + array(1) { + [0]=> + object(LogOnEvent)#10 (2) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + } + } + ["logOffEvent"]=> + array(2) { + [0]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34567) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(6) "Smoked" + ["callInitiator"]=> + string(3) "IVR" + } + [1]=> + object(LogOffEvent)#%d (4) { + ["audienceMemberId"]=> + int(34568) + ["timestamp"]=> + string(25) "2005-11-08T11:22:07+03:00" + ["smokeStatus"]=> + string(9) "SmokeFree" + ["callInitiator"]=> + string(3) "IVR" + } + } +} +--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" + } + } +} http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36575.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36575.phpt diff -u php-src/ext/soap/tests/bugs/bug36575.phpt:1.3 php-src/ext/soap/tests/bugs/bug36575.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36575.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/bugs/bug36575.phpt Thu Jul 13 16:47:25 2006 @@ -1,52 +1,52 @@ ---TEST-- -Bug #36575 (Incorrect complex type instantiation with hierarchies) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -abstract class CT_A1 { - public $var1; -} - -class CT_A2 extends CT_A1 { - public $var2; -} - -class CT_A3 extends CT_A2 { - public $var3; -} - -// returns A2 in WSDL -function test( $a1 ) { - $a3 = new CT_A3(); - $a3->var1 = $a1->var1; - $a3->var2 = "var two"; - $a3->var3 = "var three"; - return $a3; -} - -$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); - -$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); -$a2 = new CT_A2(); -$a2->var1 = "one"; -$a2->var2 = "two"; -$client->test($a2); - -$soapRequest = $client->__getLastRequest(); - -echo $soapRequest; - -$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); -$server->addFunction("test"); -$server->handle($soapRequest); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><a1 xsi:type="ns2:A2"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">two</var2></a1></ns1:test></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="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><result xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">var two</var2><var3 xsi:type="xsd:string">var three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #36575 (Incorrect complex type instantiation with hierarchies) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +abstract class CT_A1 { + public $var1; +} + +class CT_A2 extends CT_A1 { + public $var2; +} + +class CT_A3 extends CT_A2 { + public $var3; +} + +// returns A2 in WSDL +function test( $a1 ) { + $a3 = new CT_A3(); + $a3->var1 = $a1->var1; + $a3->var2 = "var two"; + $a3->var3 = "var three"; + return $a3; +} + +$classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); + +$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); +$a2 = new CT_A2(); +$a2->var1 = "one"; +$a2->var2 = "two"; +$client->test($a2); + +$soapRequest = $client->__getLastRequest(); + +echo $soapRequest; + +$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); +$server->addFunction("test"); +$server->handle($soapRequest); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test><a1 xsi:type="ns2:A2"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">two</var2></a1></ns1:test></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="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:test.soap.types#" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><result xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2 xsi:type="xsd:string">var two</var2><var3 xsi:type="xsd:string">var three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36629.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36629.phpt diff -u php-src/ext/soap/tests/bugs/bug36629.phpt:1.3 php-src/ext/soap/tests/bugs/bug36629.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug36629.phpt:1.3 Wed Mar 15 16:14:40 2006 +++ php-src/ext/soap/tests/bugs/bug36629.phpt Thu Jul 13 16:47:25 2006 @@ -1,53 +1,53 @@ ---TEST-- -Bug #36629 (SoapServer::handle() exits on SOAP faults) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function test1() { - throw new SoapFault("Server", "test1"); -} -function test2() { - return new SoapFault("Server", "test2"); -} - -$server = new soapserver(null,array('uri'=>"http://testuri.org")); -$server->addfunction(array("test1","test2")); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test1 xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; -$server->handle(); - -$HTTP_RAW_POST_DATA = <<<EOF -<?xml version="1.0" encoding="ISO-8859-1"?> -<SOAP-ENV:Envelope - SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" - 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:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <ns1:test2 xmlns:ns1="http://testuri.org" /> - </SOAP-ENV:Body> -</SOAP-ENV:Envelope> -EOF; -$server->handle(); -echo "ok\n"; -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test1</faultstring></SOAP-ENV:Fault></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/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> -ok +--TEST-- +Bug #36629 (SoapServer::handle() exits on SOAP faults) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function test1() { + throw new SoapFault("Server", "test1"); +} +function test2() { + return new SoapFault("Server", "test2"); +} + +$server = new soapserver(null,array('uri'=>"http://testuri.org")); +$server->addfunction(array("test1","test2")); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test1 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle(); + +$HTTP_RAW_POST_DATA = <<<EOF +<?xml version="1.0" encoding="ISO-8859-1"?> +<SOAP-ENV:Envelope + SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" + 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:si="http://soapinterop.org/xsd"> + <SOAP-ENV:Body> + <ns1:test2 xmlns:ns1="http://testuri.org" /> + </SOAP-ENV:Body> +</SOAP-ENV:Envelope> +EOF; +$server->handle(); +echo "ok\n"; +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test1</faultstring></SOAP-ENV:Fault></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/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>test2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug36908.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug36908.phpt diff -u php-src/ext/soap/tests/bugs/bug36908.phpt:1.2 php-src/ext/soap/tests/bugs/bug36908.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug36908.phpt:1.2 Mon Apr 10 13:29:57 2006 +++ php-src/ext/soap/tests/bugs/bug36908.phpt Thu Jul 13 16:47:25 2006 @@ -1,46 +1,46 @@ ---TEST-- -Bug #36908 (wsdl default value overrides value in soap request) ---SKIPIF-- -<?php - if (!extension_loaded('soap')) die('skip soap extension not available'); -?> ---INI-- -soap.wsdl_cache_enabled=0 ---FILE-- -<?php -class PublisherService { - function add($publisher) { - return $publisher->region_id; - } -} -$input = -'<?xml version="1.0" encoding="UTF-8"?> -<soapenv:Envelope -xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" -xmlns:xsd="http://www.w3.org/2001/XMLSchema" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <soapenv:Body> - <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> - <publisher href="#id0"/> - </ns1:add> - <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" -xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0" -soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -xsi:type="ns3:publisher"> - <region_id href="#id5"/> - </multiRef> - <multiRef xmlns:ns5="http://soap.dev/soap/types" -xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5" -soapenc:root="0" -soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" -xsi:type="xsd:long">9</multiRef> - </soapenv:Body> -</soapenv:Envelope>'; -ini_set('soap.wsdl_cache_enabled', false); -$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); -$server->setClass("PublisherService"); -$server->handle($input); -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:PublisherService" 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:addResponse><out xsi:type="xsd:string">9</out></ns1:addResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #36908 (wsdl default value overrides value in soap request) +--SKIPIF-- +<?php + if (!extension_loaded('soap')) die('skip soap extension not available'); +?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +class PublisherService { + function add($publisher) { + return $publisher->region_id; + } +} +$input = +'<?xml version="1.0" encoding="UTF-8"?> +<soapenv:Envelope +xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" +xmlns:xsd="http://www.w3.org/2001/XMLSchema" +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <soapenv:Body> + <ns1:add xmlns:ns1="urn:PublisherService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> + <publisher href="#id0"/> + </ns1:add> + <multiRef xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" +xmlns:ns3="http://soap.dev/soap/types" id="id0" soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="ns3:publisher"> + <region_id href="#id5"/> + </multiRef> + <multiRef xmlns:ns5="http://soap.dev/soap/types" +xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" id="id5" +soapenc:root="0" +soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" +xsi:type="xsd:long">9</multiRef> + </soapenv:Body> +</soapenv:Envelope>'; +ini_set('soap.wsdl_cache_enabled', false); +$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); +$server->setClass("PublisherService"); +$server->handle($input); +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:PublisherService" 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:addResponse><out xsi:type="xsd:string">9</out></ns1:addResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug37278.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug37278.phpt diff -u php-src/ext/soap/tests/bugs/bug37278.phpt:1.3 php-src/ext/soap/tests/bugs/bug37278.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug37278.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/bugs/bug37278.phpt Thu Jul 13 16:47:25 2006 @@ -1,24 +1,24 @@ ---TEST-- -Bug #37278 (SOAP not respecting uri in __soapCall) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$options = array( - "location" => "test://", - "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", - "trace" => 1); - -$client = new SoapClient(null, $options); - -$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story"; - -try { - $client->__soapCall("list_ids", array(), array("uri" => $newNS)); -} catch (Exception $e) { - print $client->__getLastRequest(); -} -?> ---EXPECT-- -<?xml version="1.0" encoding="UTF-8"?> -<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" 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:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> +--TEST-- +Bug #37278 (SOAP not respecting uri in __soapCall) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$options = array( + "location" => "test://", + "uri" => "http://bricolage.sourceforge.net/Bric/SOAP/Auth", + "trace" => 1); + +$client = new SoapClient(null, $options); + +$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story"; + +try { + $client->__soapCall("list_ids", array(), array("uri" => $newNS)); +} catch (Exception $e) { + print $client->__getLastRequest(); +} +?> +--EXPECT-- +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" 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:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38004.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38004.phpt diff -u php-src/ext/soap/tests/bugs/bug38004.phpt:1.3 php-src/ext/soap/tests/bugs/bug38004.phpt:1.4 --- php-src/ext/soap/tests/bugs/bug38004.phpt:1.3 Mon Jul 10 07:26:31 2006 +++ php-src/ext/soap/tests/bugs/bug38004.phpt Thu Jul 13 16:47:25 2006 @@ -1,40 +1,40 @@ ---TEST-- -Bug #38004 (Parameters in SoapServer are decoded twice) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g; - $g = $param->strA."\n".$param->strB."\n"; - return $g; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl) { - parent::__construct($wsdl); - $this->server = new SoapServer($wsdl); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); -$strA = 'test & test'; -$strB = 'test & test'; -$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); -print_r($res); -print_r($g); -?> ---EXPECT-- -test & test -test & test -test & test -test & test +--TEST-- +Bug #38004 (Parameters in SoapServer are decoded twice) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Test($param) { + global $g; + $g = $param->strA."\n".$param->strB."\n"; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); +$strA = 'test & test'; +$strB = 'test & test'; +$res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); +print_r($res); +print_r($g); +?> +--EXPECT-- +test & test +test & test +test & test +test & test http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38005.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38005.phpt diff -u php-src/ext/soap/tests/bugs/bug38005.phpt:1.2 php-src/ext/soap/tests/bugs/bug38005.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38005.phpt:1.2 Mon Jul 10 07:41:52 2006 +++ php-src/ext/soap/tests/bugs/bug38005.phpt Thu Jul 13 16:47:25 2006 @@ -1,41 +1,44 @@ ---TEST-- -Bug #38005 (SoapFault faultstring doesn't follow encoding rules) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - return new SoapFault('Test', 'This is our fault: Ä'); -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl, $opt) { - parent::__construct($wsdl, $opt); - $this->server = new SoapServer($wsdl, $opt); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(NULL, array( - 'encoding' => 'ISO-8859-1', - 'uri' => "test://", - 'location' => "test://", - 'soap_version'=>SOAP_1_2, - 'trace'=>1, - 'exceptions'=>0)); -$res = $client->Test(); -echo($res->faultstring."\n"); -echo($client->__getLastResponse()); -?> ---EXPECT-- -This is our fault: Ä -<?xml version="1.0" encoding="UTF-8"?> -<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>Test</env:Value></env:Code><env:Reason><env:Text>This is our fault: Ã</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> +--TEST-- +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) { + return new SoapFault('Test', 'This is our fault: Ä'); +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(NULL, array( + 'encoding' => 'ISO-8859-1', + 'uri' => "test://", + 'location' => "test://", + 'soap_version'=>SOAP_1_2, + 'trace'=>1, + 'exceptions'=>0)); +$res = $client->Test(); +echo($res->faultstring."\n"); +echo($client->__getLastResponse()); +?> +--EXPECT-- +This is our fault: Ä +<?xml version="1.0" encoding="UTF-8"?> +<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"><env:Body><env:Fault><env:Code><env:Value>Test</env:Value></env:Code><env:Reason><env:Text>This is our fault: Ã</env:Text></env:Reason></env:Fault></env:Body></env:Envelope> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38055.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38055.phpt diff -u php-src/ext/soap/tests/bugs/bug38055.phpt:1.2 php-src/ext/soap/tests/bugs/bug38055.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38055.phpt:1.2 Mon Jul 10 10:33:55 2006 +++ php-src/ext/soap/tests/bugs/bug38055.phpt Thu Jul 13 16:47:25 2006 @@ -1,39 +1,39 @@ ---TEST-- -Bug #38055 (Wrong interpretation of boolean parameters) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g1, $g2; - $g1 = $param->boolA; - $g2 = $param->boolB; - return 1; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl) { - parent::__construct($wsdl); - $this->server = new SoapServer($wsdl); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); -$boolA = 1; -$boolB = '1'; -$res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); -var_dump($g1); -var_dump($g2); -?> ---EXPECT-- -bool(true) -bool(true) +--TEST-- +Bug #38055 (Wrong interpretation of boolean parameters) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +function Test($param) { + global $g1, $g2; + $g1 = $param->boolA; + $g2 = $param->boolB; + return 1; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl) { + parent::__construct($wsdl); + $this->server = new SoapServer($wsdl); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); +$boolA = 1; +$boolB = '1'; +$res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); +var_dump($g1); +var_dump($g2); +?> +--EXPECT-- +bool(true) +bool(true) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug38067.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/bugs/bug38067.phpt diff -u php-src/ext/soap/tests/bugs/bug38067.phpt:1.2 php-src/ext/soap/tests/bugs/bug38067.phpt:1.3 --- php-src/ext/soap/tests/bugs/bug38067.phpt:1.2 Wed Jul 12 09:00:15 2006 +++ php-src/ext/soap/tests/bugs/bug38067.phpt Thu Jul 13 16:47:25 2006 @@ -1,40 +1,43 @@ ---TEST-- -Bug #38067 (Parameters are not decoded from utf-8 when using encoding option) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -function Test($param) { - global $g; - $g = $param->str; - return $g; -} - -class TestSoapClient extends SoapClient { - function __construct($wsdl, $opt) { - parent::__construct($wsdl, $opt); - $this->server = new SoapServer($wsdl, $opt); - $this->server->addFunction('Test'); - } - - function __doRequest($request, $location, $action, $version) { - ob_start(); - $this->server->handle($request); - $response = ob_get_contents(); - ob_end_clean(); - return $response; - } -} - -$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', - array('encoding' => 'ISO-8859-1')); -$str = 'test: Ä'; -$res = $client->Test(array('str'=>$str)); -echo $str."\n"; -echo $res."\n"; -echo $g."\n"; -?> ---EXPECT-- -test: Ä -test: Ä -test: Ä +--TEST-- +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) { + global $g; + $g = $param->str; + return $g; +} + +class TestSoapClient extends SoapClient { + function __construct($wsdl, $opt) { + parent::__construct($wsdl, $opt); + $this->server = new SoapServer($wsdl, $opt); + $this->server->addFunction('Test'); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', + array('encoding' => 'ISO-8859-1')); +$str = 'test: Ä'; +$res = $client->Test(array('str'=>$str)); +echo $str."\n"; +echo $res."\n"; +echo $g."\n"; +?> +--EXPECT-- +test: Ä +test: Ä +test: Ä http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005p.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005s.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt diff -u php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.1 php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt:1.1 Sun Apr 3 15:51:18 2005 +++ php-src/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt Thu Jul 13 16:47:25 2006 @@ -5,7 +5,7 @@ --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"); http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt Thu Jul 13 16:47:26 2006 @@ -33,3 +33,17 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt Thu Jul 13 16:47:26 2006 @@ -40,3 +40,24 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.3 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.4 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt Thu Jul 13 16:47:26 2006 @@ -47,3 +47,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.1 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt:1.1 Sun Apr 3 15:51:20 2005 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt Thu Jul 13 16:47:26 2006 @@ -48,3 +48,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt diff -u php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.1 php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.2 --- php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt:1.1 Sun Apr 3 15:51:20 2005 +++ php-src/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt Thu Jul 13 16:47:26 2006 @@ -48,3 +48,31 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema004.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/schema/schema004.phpt diff -u php-src/ext/soap/tests/schema/schema004.phpt:1.1 php-src/ext/soap/tests/schema/schema004.phpt:1.2 --- php-src/ext/soap/tests/schema/schema004.phpt:1.1 Wed Jan 28 13:33:48 2004 +++ php-src/ext/soap/tests/schema/schema004.phpt Thu Jul 13 16:47:26 2006 @@ -17,4 +17,9 @@ <?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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema009.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema009.phpt diff -u php-src/ext/soap/tests/schema/schema009.phpt:1.2 php-src/ext/soap/tests/schema/schema009.phpt:1.3 --- php-src/ext/soap/tests/schema/schema009.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema009.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema010.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema010.phpt diff -u php-src/ext/soap/tests/schema/schema010.phpt:1.2 php-src/ext/soap/tests/schema/schema010.phpt:1.3 --- php-src/ext/soap/tests/schema/schema010.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema010.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema011.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema011.phpt diff -u php-src/ext/soap/tests/schema/schema011.phpt:1.2 php-src/ext/soap/tests/schema/schema011.phpt:1.3 --- php-src/ext/soap/tests/schema/schema011.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema011.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema012.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema012.phpt diff -u php-src/ext/soap/tests/schema/schema012.phpt:1.2 php-src/ext/soap/tests/schema/schema012.phpt:1.3 --- php-src/ext/soap/tests/schema/schema012.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema012.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema013.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema013.phpt diff -u php-src/ext/soap/tests/schema/schema013.phpt:1.2 php-src/ext/soap/tests/schema/schema013.phpt:1.3 --- php-src/ext/soap/tests/schema/schema013.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema013.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema014.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema014.phpt diff -u php-src/ext/soap/tests/schema/schema014.phpt:1.2 php-src/ext/soap/tests/schema/schema014.phpt:1.3 --- php-src/ext/soap/tests/schema/schema014.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema014.phpt Thu Jul 13 16:47:26 2006 @@ -18,3 +18,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema015.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema015.phpt diff -u php-src/ext/soap/tests/schema/schema015.phpt:1.2 php-src/ext/soap/tests/schema/schema015.phpt:1.3 --- php-src/ext/soap/tests/schema/schema015.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema015.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema016.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema016.phpt diff -u php-src/ext/soap/tests/schema/schema016.phpt:1.2 php-src/ext/soap/tests/schema/schema016.phpt:1.3 --- php-src/ext/soap/tests/schema/schema016.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema016.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema017.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema017.phpt diff -u php-src/ext/soap/tests/schema/schema017.phpt:1.2 php-src/ext/soap/tests/schema/schema017.phpt:1.3 --- php-src/ext/soap/tests/schema/schema017.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema017.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema018.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema018.phpt diff -u php-src/ext/soap/tests/schema/schema018.phpt:1.2 php-src/ext/soap/tests/schema/schema018.phpt:1.3 --- php-src/ext/soap/tests/schema/schema018.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema018.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema019.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema019.phpt diff -u php-src/ext/soap/tests/schema/schema019.phpt:1.2 php-src/ext/soap/tests/schema/schema019.phpt:1.3 --- php-src/ext/soap/tests/schema/schema019.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema019.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema020.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema020.phpt diff -u php-src/ext/soap/tests/schema/schema020.phpt:1.2 php-src/ext/soap/tests/schema/schema020.phpt:1.3 --- php-src/ext/soap/tests/schema/schema020.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema020.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema021.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema021.phpt diff -u php-src/ext/soap/tests/schema/schema021.phpt:1.2 php-src/ext/soap/tests/schema/schema021.phpt:1.3 --- php-src/ext/soap/tests/schema/schema021.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema021.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema022.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema022.phpt diff -u php-src/ext/soap/tests/schema/schema022.phpt:1.2 php-src/ext/soap/tests/schema/schema022.phpt:1.3 --- php-src/ext/soap/tests/schema/schema022.phpt:1.2 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema022.phpt Thu Jul 13 16:47:26 2006 @@ -22,3 +22,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> 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema030.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema030.phpt diff -u php-src/ext/soap/tests/schema/schema030.phpt:1.2 php-src/ext/soap/tests/schema/schema030.phpt:1.3 --- php-src/ext/soap/tests/schema/schema030.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema030.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema031.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema031.phpt diff -u php-src/ext/soap/tests/schema/schema031.phpt:1.2 php-src/ext/soap/tests/schema/schema031.phpt:1.3 --- php-src/ext/soap/tests/schema/schema031.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema031.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema032.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema032.phpt diff -u php-src/ext/soap/tests/schema/schema032.phpt:1.2 php-src/ext/soap/tests/schema/schema032.phpt:1.3 --- php-src/ext/soap/tests/schema/schema032.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema032.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,12 @@ 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 + http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema033.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema033.phpt diff -u php-src/ext/soap/tests/schema/schema033.phpt:1.2 php-src/ext/soap/tests/schema/schema033.phpt:1.3 --- php-src/ext/soap/tests/schema/schema033.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema033.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema034.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema034.phpt diff -u php-src/ext/soap/tests/schema/schema034.phpt:1.2 php-src/ext/soap/tests/schema/schema034.phpt:1.3 --- php-src/ext/soap/tests/schema/schema034.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema034.phpt Thu Jul 13 16:47:26 2006 @@ -35,3 +35,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema035.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema035.phpt diff -u php-src/ext/soap/tests/schema/schema035.phpt:1.2 php-src/ext/soap/tests/schema/schema035.phpt:1.3 --- php-src/ext/soap/tests/schema/schema035.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema035.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema036.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema036.phpt diff -u php-src/ext/soap/tests/schema/schema036.phpt:1.2 php-src/ext/soap/tests/schema/schema036.phpt:1.3 --- php-src/ext/soap/tests/schema/schema036.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema036.phpt Thu Jul 13 16:47:26 2006 @@ -35,3 +35,16 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema037.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema037.phpt diff -u php-src/ext/soap/tests/schema/schema037.phpt:1.4 php-src/ext/soap/tests/schema/schema037.phpt:1.5 --- php-src/ext/soap/tests/schema/schema037.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema037.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema038.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema038.phpt diff -u php-src/ext/soap/tests/schema/schema038.phpt:1.4 php-src/ext/soap/tests/schema/schema038.phpt:1.5 --- php-src/ext/soap/tests/schema/schema038.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema038.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema039.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema039.phpt diff -u php-src/ext/soap/tests/schema/schema039.phpt:1.4 php-src/ext/soap/tests/schema/schema039.phpt:1.5 --- php-src/ext/soap/tests/schema/schema039.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema039.phpt Thu Jul 13 16:47:26 2006 @@ -29,3 +29,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema040.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema040.phpt diff -u php-src/ext/soap/tests/schema/schema040.phpt:1.4 php-src/ext/soap/tests/schema/schema040.phpt:1.5 --- php-src/ext/soap/tests/schema/schema040.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema040.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema041.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema041.phpt diff -u php-src/ext/soap/tests/schema/schema041.phpt:1.2 php-src/ext/soap/tests/schema/schema041.phpt:1.3 --- php-src/ext/soap/tests/schema/schema041.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema041.phpt Thu Jul 13 16:47:26 2006 @@ -29,3 +29,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema042.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema042.phpt diff -u php-src/ext/soap/tests/schema/schema042.phpt:1.4 php-src/ext/soap/tests/schema/schema042.phpt:1.5 --- php-src/ext/soap/tests/schema/schema042.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema042.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema043.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema043.phpt diff -u php-src/ext/soap/tests/schema/schema043.phpt:1.4 php-src/ext/soap/tests/schema/schema043.phpt:1.5 --- php-src/ext/soap/tests/schema/schema043.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema043.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema044.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema044.phpt diff -u php-src/ext/soap/tests/schema/schema044.phpt:1.4 php-src/ext/soap/tests/schema/schema044.phpt:1.5 --- php-src/ext/soap/tests/schema/schema044.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema044.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema045.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema045.phpt diff -u php-src/ext/soap/tests/schema/schema045.phpt:1.4 php-src/ext/soap/tests/schema/schema045.phpt:1.5 --- php-src/ext/soap/tests/schema/schema045.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema045.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema046.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema046.phpt diff -u php-src/ext/soap/tests/schema/schema046.phpt:1.4 php-src/ext/soap/tests/schema/schema046.phpt:1.5 --- php-src/ext/soap/tests/schema/schema046.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema046.phpt Thu Jul 13 16:47:26 2006 @@ -36,3 +36,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema047.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema047.phpt diff -u php-src/ext/soap/tests/schema/schema047.phpt:1.4 php-src/ext/soap/tests/schema/schema047.phpt:1.5 --- php-src/ext/soap/tests/schema/schema047.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema047.phpt Thu Jul 13 16:47:26 2006 @@ -32,3 +32,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema048.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/soap/tests/schema/schema048.phpt diff -u php-src/ext/soap/tests/schema/schema048.phpt:1.4 php-src/ext/soap/tests/schema/schema048.phpt:1.5 --- php-src/ext/soap/tests/schema/schema048.phpt:1.4 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema048.phpt Thu Jul 13 16:47:26 2006 @@ -34,3 +34,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema049.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema049.phpt diff -u php-src/ext/soap/tests/schema/schema049.phpt:1.3 php-src/ext/soap/tests/schema/schema049.phpt:1.4 --- php-src/ext/soap/tests/schema/schema049.phpt:1.3 Mon Oct 10 15:40:43 2005 +++ php-src/ext/soap/tests/schema/schema049.phpt Thu Jul 13 16:47:26 2006 @@ -33,3 +33,11 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema050.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema050.phpt diff -u php-src/ext/soap/tests/schema/schema050.phpt:1.2 php-src/ext/soap/tests/schema/schema050.phpt:1.3 --- php-src/ext/soap/tests/schema/schema050.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema050.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema051.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema051.phpt diff -u php-src/ext/soap/tests/schema/schema051.phpt:1.2 php-src/ext/soap/tests/schema/schema051.phpt:1.3 --- php-src/ext/soap/tests/schema/schema051.phpt:1.2 Thu Jan 20 12:48:00 2005 +++ php-src/ext/soap/tests/schema/schema051.phpt Thu Jul 13 16:47:26 2006 @@ -31,3 +31,18 @@ } } 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema052.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema052.phpt diff -u php-src/ext/soap/tests/schema/schema052.phpt:1.2 php-src/ext/soap/tests/schema/schema052.phpt:1.3 --- php-src/ext/soap/tests/schema/schema052.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema052.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema053.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema053.phpt diff -u php-src/ext/soap/tests/schema/schema053.phpt:1.2 php-src/ext/soap/tests/schema/schema053.phpt:1.3 --- php-src/ext/soap/tests/schema/schema053.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema053.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,11 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema054.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema054.phpt diff -u php-src/ext/soap/tests/schema/schema054.phpt:1.3 php-src/ext/soap/tests/schema/schema054.phpt:1.4 --- php-src/ext/soap/tests/schema/schema054.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema054.phpt Thu Jul 13 16:47:26 2006 @@ -19,3 +19,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema055.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema055.phpt diff -u php-src/ext/soap/tests/schema/schema055.phpt:1.3 php-src/ext/soap/tests/schema/schema055.phpt:1.4 --- php-src/ext/soap/tests/schema/schema055.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema055.phpt Thu Jul 13 16:47:26 2006 @@ -26,3 +26,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema062.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/soap/tests/schema/schema062.phpt diff -u php-src/ext/soap/tests/schema/schema062.phpt:1.6 php-src/ext/soap/tests/schema/schema062.phpt:1.7 --- php-src/ext/soap/tests/schema/schema062.phpt:1.6 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema062.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema064.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema064.phpt diff -u php-src/ext/soap/tests/schema/schema064.phpt:1.2 php-src/ext/soap/tests/schema/schema064.phpt:1.3 --- php-src/ext/soap/tests/schema/schema064.phpt:1.2 Thu Jan 20 12:48:01 2005 +++ php-src/ext/soap/tests/schema/schema064.phpt Thu Jul 13 16:47:26 2006 @@ -55,3 +55,25 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema065.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema065.phpt diff -u php-src/ext/soap/tests/schema/schema065.phpt:1.5 php-src/ext/soap/tests/schema/schema065.phpt:1.6 --- php-src/ext/soap/tests/schema/schema065.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema065.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema066.phpt?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/soap/tests/schema/schema066.phpt diff -u php-src/ext/soap/tests/schema/schema066.phpt:1.6 php-src/ext/soap/tests/schema/schema066.phpt:1.7 --- php-src/ext/soap/tests/schema/schema066.phpt:1.6 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema066.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema067.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema067.phpt diff -u php-src/ext/soap/tests/schema/schema067.phpt:1.5 php-src/ext/soap/tests/schema/schema067.phpt:1.6 --- php-src/ext/soap/tests/schema/schema067.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema067.phpt Thu Jul 13 16:47:26 2006 @@ -24,3 +24,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema069.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema069.phpt diff -u php-src/ext/soap/tests/schema/schema069.phpt:1.5 php-src/ext/soap/tests/schema/schema069.phpt:1.6 --- php-src/ext/soap/tests/schema/schema069.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema069.phpt Thu Jul 13 16:47:26 2006 @@ -25,3 +25,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema070.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/soap/tests/schema/schema070.phpt diff -u php-src/ext/soap/tests/schema/schema070.phpt:1.5 php-src/ext/soap/tests/schema/schema070.phpt:1.6 --- php-src/ext/soap/tests/schema/schema070.phpt:1.5 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema070.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema074.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/schema/schema074.phpt diff -u php-src/ext/soap/tests/schema/schema074.phpt:1.1 php-src/ext/soap/tests/schema/schema074.phpt:1.2 --- php-src/ext/soap/tests/schema/schema074.phpt:1.1 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/schema074.phpt Thu Jul 13 16:47:26 2006 @@ -27,3 +27,13 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema075.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema075.phpt diff -u php-src/ext/soap/tests/schema/schema075.phpt:1.3 php-src/ext/soap/tests/schema/schema075.phpt:1.4 --- php-src/ext/soap/tests/schema/schema075.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema075.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema076.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema076.phpt diff -u php-src/ext/soap/tests/schema/schema076.phpt:1.3 php-src/ext/soap/tests/schema/schema076.phpt:1.4 --- php-src/ext/soap/tests/schema/schema076.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema076.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema077.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/soap/tests/schema/schema077.phpt diff -u php-src/ext/soap/tests/schema/schema077.phpt:1.3 php-src/ext/soap/tests/schema/schema077.phpt:1.4 --- php-src/ext/soap/tests/schema/schema077.phpt:1.3 Fri May 26 09:04:54 2006 +++ php-src/ext/soap/tests/schema/schema077.phpt Thu Jul 13 16:47:26 2006 @@ -28,3 +28,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema078.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema078.phpt diff -u php-src/ext/soap/tests/schema/schema078.phpt:1.2 php-src/ext/soap/tests/schema/schema078.phpt:1.3 --- php-src/ext/soap/tests/schema/schema078.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema078.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema079.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema079.phpt diff -u php-src/ext/soap/tests/schema/schema079.phpt:1.2 php-src/ext/soap/tests/schema/schema079.phpt:1.3 --- php-src/ext/soap/tests/schema/schema079.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema079.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/schema080.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/soap/tests/schema/schema080.phpt diff -u php-src/ext/soap/tests/schema/schema080.phpt:1.2 php-src/ext/soap/tests/schema/schema080.phpt:1.3 --- php-src/ext/soap/tests/schema/schema080.phpt:1.2 Tue Feb 7 12:49:30 2006 +++ php-src/ext/soap/tests/schema/schema080.phpt Thu Jul 13 16:47:26 2006 @@ -30,3 +30,15 @@ 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 http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/schema/test_schema.inc?r1=1.9&r2=1.10&diff_format=u Index: php-src/ext/soap/tests/schema/test_schema.inc diff -u php-src/ext/soap/tests/schema/test_schema.inc:1.9 php-src/ext/soap/tests/schema/test_schema.inc:1.10 --- php-src/ext/soap/tests/schema/test_schema.inc:1.9 Sun Apr 3 15:39:56 2005 +++ php-src/ext/soap/tests/schema/test_schema.inc Thu Jul 13 16:47:26 2006 @@ -52,7 +52,7 @@ $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));