From eba2aa9bd046b98b5122186d01106561bb8ede29 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 23 Apr 2004 12:22:41 +0000 Subject: Support for for string/hexbinary/base64binary data --- ext/soap/php_encoding.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/soap/php_encoding.c') diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 451a659615..5bda11a881 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -461,6 +461,8 @@ static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data) if (data && data->children) { if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) { ZVAL_STRING(ret, data->children->content, 1); + } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) { + ZVAL_STRING(ret, data->children->content, 1); } else { php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules"); } @@ -479,6 +481,8 @@ static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data) if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) { whiteSpace_replace(data->children->content); ZVAL_STRING(ret, data->children->content, 1); + } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) { + ZVAL_STRING(ret, data->children->content, 1); } else { php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules"); } @@ -497,6 +501,8 @@ static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data) if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) { whiteSpace_collapse(data->children->content); ZVAL_STRING(ret, data->children->content, 1); + } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) { + ZVAL_STRING(ret, data->children->content, 1); } else { php_error(E_ERROR,"SOAP-ERROR: Encoding: Violation of encoding rules"); } -- cgit v1.2.1