]> granicus.if.org Git - php/commitdiff
Nuke signed/unsigned compiler warnings
authorDmitry Stogov <dmitry@php.net>
Tue, 11 Jul 2006 14:24:39 +0000 (14:24 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 11 Jul 2006 14:24:39 +0000 (14:24 +0000)
ext/soap/php_encoding.c
ext/soap/php_encoding.h
ext/soap/php_http.c
ext/soap/php_packet_soap.c
ext/soap/php_schema.c
ext/soap/php_sdl.c
ext/soap/php_sdl.h
ext/soap/php_xml.c
ext/soap/php_xml.h
ext/soap/soap.c

index 9ba5b2b39cd453fab668c3d877b23e2c378f6f93..5521f1592a800308cef0d639a3ea4a1fe6c1e40b 100644 (file)
@@ -218,7 +218,7 @@ encode defaultEncoding[] = {
 int numDefaultEncodings = sizeof(defaultEncoding)/sizeof(encode);
 
 
-void whiteSpace_replace(char* str)
+void whiteSpace_replace(xmlChar* str)
 {
        while (*str != '\0') {
                if (*str == '\x9' || *str == '\xA' || *str == '\xD') {
@@ -228,10 +228,10 @@ void whiteSpace_replace(char* str)
        }
 }
 
-void whiteSpace_collapse(char* str)
+void whiteSpace_collapse(xmlChar* str)
 {
-       char *pos;
-       char old;
+       xmlChar *pos;
+       xmlChar old;
 
        pos = str;
        whiteSpace_replace(str);
@@ -320,7 +320,7 @@ xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr par
                }
 
                if (zend_hash_find(ht, "enc_name", sizeof("enc_name"), (void **)&zname) == SUCCESS) {
-                       xmlNodeSetName(node, Z_STRVAL_PP(zname));
+                       xmlNodeSetName(node, BAD_CAST(Z_STRVAL_PP(zname)));
                }
                if (zend_hash_find(ht, "enc_namens", sizeof("enc_namens"), (void **)&znamens) == SUCCESS) {
                        xmlNsPtr nsp = encode_add_ns(node, Z_STRVAL_PP(znamens));
@@ -560,22 +560,22 @@ static zval *to_zval_string(encodeTypePtr type, xmlNodePtr data)
                        TSRMLS_FETCH();
 
                        if (SOAP_GLOBAL(encoding) != NULL) {
-                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, strlen(data->children->content));
+                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
                                xmlBufferPtr out = xmlBufferCreate();
                                int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
 
                                if (n >= 0) {
                                        ZVAL_STRING(ret, (char*)xmlBufferContent(out), 1);
                                } else {
-                                       ZVAL_STRING(ret, data->children->content, 1);
+                                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                                }
                                xmlBufferFree(out);
                                xmlBufferFree(in);
                        } else {
-                               ZVAL_STRING(ret, data->children->content, 1);
+                               ZVAL_STRING(ret, (char*)data->children->content, 1);
                        }
                } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
-                       ZVAL_STRING(ret, data->children->content, 1);
+                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                } else {
                        soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                }
@@ -596,22 +596,22 @@ static zval *to_zval_stringr(encodeTypePtr type, xmlNodePtr data)
 
                        whiteSpace_replace(data->children->content);
                        if (SOAP_GLOBAL(encoding) != NULL) {
-                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, strlen(data->children->content));
+                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
                                xmlBufferPtr out = xmlBufferCreate();
                                int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
 
                                if (n >= 0) {
                                        ZVAL_STRING(ret, (char*)xmlBufferContent(out), 1);
                                } else {
-                                       ZVAL_STRING(ret, data->children->content, 1);
+                                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                                }
                                xmlBufferFree(out);
                                xmlBufferFree(in);
                        } else {
-                               ZVAL_STRING(ret, data->children->content, 1);
+                               ZVAL_STRING(ret, (char*)data->children->content, 1);
                        }
                } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
-                       ZVAL_STRING(ret, data->children->content, 1);
+                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                } else {
                        soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                }
@@ -632,22 +632,22 @@ static zval *to_zval_stringc(encodeTypePtr type, xmlNodePtr data)
 
                        whiteSpace_collapse(data->children->content);
                        if (SOAP_GLOBAL(encoding) != NULL) {
-                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, strlen(data->children->content));
+                               xmlBufferPtr in  = xmlBufferCreateStatic(data->children->content, xmlStrlen(data->children->content));
                                xmlBufferPtr out = xmlBufferCreate();
                                int n = xmlCharEncOutFunc(SOAP_GLOBAL(encoding), out, in);
 
                                if (n >= 0) {
                                        ZVAL_STRING(ret, (char*)xmlBufferContent(out), 1);
                                } else {
-                                       ZVAL_STRING(ret, data->children->content, 1);
+                                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                                }
                                xmlBufferFree(out);
                                xmlBufferFree(in);
                        } else {
-                               ZVAL_STRING(ret, data->children->content, 1);
+                               ZVAL_STRING(ret, (char*)data->children->content, 1);
                        }
                } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
-                       ZVAL_STRING(ret, data->children->content, 1);
+                       ZVAL_STRING(ret, (char*)data->children->content, 1);
                } else {
                        soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                }
@@ -667,7 +667,7 @@ static zval *to_zval_base64(encodeTypePtr type, xmlNodePtr data)
        FIND_XML_NULL(data, ret);
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
-                       whiteSpace_collapse((char*)data->children->content);
+                       whiteSpace_collapse(data->children->content);
                        str = (char*)php_base64_decode(data->children->content, strlen((char*)data->children->content), &str_len);
                        ZVAL_STRINGL(ret, str, str_len, 0);
                } else if (data->children->type == XML_CDATA_SECTION_NODE && data->children->next == NULL) {
@@ -693,7 +693,7 @@ static zval *to_zval_hexbin(encodeTypePtr type, xmlNodePtr data)
        FIND_XML_NULL(data, ret);
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
-                       whiteSpace_collapse((char*)data->children->content);
+                       whiteSpace_collapse(data->children->content);
                } else if (data->children->type != XML_CDATA_SECTION_NODE || data->children->next != NULL) {
                        soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                        return ret;
@@ -733,7 +733,7 @@ static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNo
        int new_len;
        TSRMLS_FETCH();
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
@@ -757,18 +757,18 @@ static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int style, xmlNo
 
                if (n >= 0) {
                        efree(str);
-                       str = estrdup(xmlBufferContent(out));
+                       str = estrdup((char*)xmlBufferContent(out));
                        new_len = n;
-               } else if (!php_libxml_xmlCheckUTF8(str)) {
+               } 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(str)) {
+       } 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(str, new_len);
+       text = xmlNewTextLen(BAD_CAST(str), new_len);
        xmlAddChild(ret, text);
        efree(str);
 
@@ -784,7 +784,7 @@ static xmlNodePtr to_xml_base64(encodeTypePtr type, zval *data, int style, xmlNo
        unsigned char *str;
        int str_len;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
@@ -819,7 +819,7 @@ static xmlNodePtr to_xml_hexbin(encodeTypePtr type, zval *data, int style, xmlNo
        zval tmp;
        int i, j;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
@@ -859,7 +859,7 @@ static zval *to_zval_double(encodeTypePtr type, xmlNodePtr data)
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
                        whiteSpace_collapse(data->children->content);
-                       ZVAL_DOUBLE(ret, atof(data->children->content));
+                       ZVAL_DOUBLE(ret, atof((char*)data->children->content));
                } else {
                        soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                }
@@ -879,9 +879,9 @@ static zval *to_zval_long(encodeTypePtr type, xmlNodePtr data)
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
                        whiteSpace_collapse(data->children->content);
                        errno = 0;
-                       ret->value.lval = strtol(data->children->content, NULL, 0);
+                       ret->value.lval = strtol((char*)data->children->content, NULL, 0);
                        if (errno == ERANGE) { /* overflow */
-                               ret->value.dval = zend_strtod(data->children->content, NULL);
+                               ret->value.dval = zend_strtod((char*)data->children->content, NULL);
                                ret->type = IS_DOUBLE;
                        } else {
                                ret->type = IS_LONG;
@@ -899,7 +899,7 @@ static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNode
 {
        xmlNodePtr ret;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
@@ -907,7 +907,7 @@ static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNode
                char s[256];
 
                sprintf(s, "%0.0f",floor(Z_DVAL_P(data)));
-               xmlNodeSetContent(ret, s);
+               xmlNodeSetContent(ret, BAD_CAST(s));
        } else {
                zval tmp = *data;
 
@@ -916,7 +916,7 @@ static xmlNodePtr to_xml_long(encodeTypePtr type, zval *data, int style, xmlNode
                        convert_to_long(&tmp);
                }
                convert_to_string(&tmp);
-               xmlNodeSetContentLen(ret, Z_STRVAL(tmp), Z_STRLEN(tmp));
+               xmlNodeSetContentLen(ret, BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
                zval_dtor(&tmp);
        }
 
@@ -931,7 +931,7 @@ static xmlNodePtr to_xml_double(encodeTypePtr type, zval *data, int style, xmlNo
        xmlNodePtr ret;
        zval tmp;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
@@ -941,7 +941,7 @@ static xmlNodePtr to_xml_double(encodeTypePtr type, zval *data, int style, xmlNo
                convert_to_double(&tmp);
        }
        convert_to_string(&tmp);
-       xmlNodeSetContentLen(ret, Z_STRVAL(tmp), Z_STRLEN(tmp));
+       xmlNodeSetContentLen(ret, BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
        zval_dtor(&tmp);
 
        if (style == SOAP_ENCODED) {
@@ -959,16 +959,16 @@ static zval *to_zval_bool(encodeTypePtr type, xmlNodePtr data)
        if (data && data->children) {
                if (data->children->type == XML_TEXT_NODE && data->children->next == NULL) {
                        whiteSpace_collapse(data->children->content);
-                       if (stricmp(data->children->content,"true") == 0 ||
-                               stricmp(data->children->content,"t") == 0 ||
-                               strcmp(data->children->content,"1") == 0) {
+                       if (stricmp((char*)data->children->content, "true") == 0 ||
+                               stricmp((char*)data->children->content, "t") == 0 ||
+                               strcmp((char*)data->children->content, "1") == 0) {
                                ZVAL_BOOL(ret, 1);
-                       } else if (stricmp(data->children->content,"false") == 0 ||
-                               stricmp(data->children->content,"f") == 0 ||
-                               strcmp(data->children->content,"0") == 0) {
+                       } else if (stricmp((char*)data->children->content, "false") == 0 ||
+                               stricmp((char*)data->children->content, "f") == 0 ||
+                               strcmp((char*)data->children->content, "0") == 0) {
                                ZVAL_BOOL(ret, 0);
                        } else {
-                               ZVAL_STRING(ret, data->children->content, 1);
+                               ZVAL_STRING(ret, (char*)data->children->content, 1);
                                convert_to_boolean(ret);
                        }
                } else {
@@ -984,14 +984,14 @@ static xmlNodePtr to_xml_bool(encodeTypePtr type, zval *data, int style, xmlNode
 {
        xmlNodePtr ret;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
 
        if (zend_is_true(data)) {
-               xmlNodeSetContent(ret, "true");
+               xmlNodeSetContent(ret, BAD_CAST("true"));
        } else {
-               xmlNodeSetContent(ret, "false");
+               xmlNodeSetContent(ret, BAD_CAST("false"));
        }
 
        if (style == SOAP_ENCODED) {
@@ -1013,7 +1013,7 @@ static xmlNodePtr to_xml_null(encodeTypePtr type, zval *data, int style, xmlNode
 {
        xmlNodePtr ret;
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        if (style == SOAP_ENCODED) {
                set_xsi_nil(ret);
@@ -1141,18 +1141,18 @@ static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr
 
                                        node = check_and_resolve_href(node);
                                        if (node && node->children && node->children->content) {
-                                               if (model->u.element->fixed && strcmp(model->u.element->fixed,node->children->content) != 0) {
+                                               if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != 0) {
                                                        soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content);
                                                }
                                                val = master_to_zval(model->u.element->encode, node);
                                        } else if (model->u.element->fixed) {
-                                               xmlNodePtr dummy = xmlNewNode(NULL, "BOGUS");
-                                               xmlNodeSetContent(dummy, model->u.element->fixed);
+                                               xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST("BOGUS"));
+                                               xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed));
                                                val = master_to_zval(model->u.element->encode, dummy);
                                                xmlFreeNode(dummy);
                                        } else if (model->u.element->def && !model->u.element->nillable) {
-                                               xmlNodePtr dummy = xmlNewNode(NULL, "BOGUS");
-                                               xmlNodeSetContent(dummy, model->u.element->def);
+                                               xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST("BOGUS"));
+                                               xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def));
                                                val = master_to_zval(model->u.element->encode, dummy);
                                                xmlFreeNode(dummy);
                                        } else {
@@ -1166,18 +1166,18 @@ static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr
                                                add_next_index_zval(array, val);
                                                do {
                                                        if (node && node->children && node->children->content) {
-                                                               if (model->u.element->fixed && strcmp(model->u.element->fixed,node->children->content) != 0) {
+                                                               if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != 0) {
                                                                        soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content);
                                                                }
                                                                val = master_to_zval(model->u.element->encode, node);
                                                        } else if (model->u.element->fixed) {
-                                                               xmlNodePtr dummy = xmlNewNode(NULL, "BOGUS");
-                                                               xmlNodeSetContent(dummy, model->u.element->fixed);
+                                                               xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST("BOGUS"));
+                                                               xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed));
                                                                val = master_to_zval(model->u.element->encode, dummy);
                                                                xmlFreeNode(dummy);
                                                        } else if (model->u.element->def && !model->u.element->nillable) {
-                                                               xmlNodePtr dummy = xmlNewNode(NULL, "BOGUS");
-                                                               xmlNodeSetContent(dummy, model->u.element->def);
+                                                               xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST("BOGUS"));
+                                                               xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def));
                                                                val = master_to_zval(model->u.element->encode, dummy);
                                                                xmlFreeNode(dummy);
                                                        } else {
@@ -1336,11 +1336,11 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e
                        while (zend_hash_get_current_data_ex(sdlType->attributes, (void**)&attr, &pos) == SUCCESS) {
                                if ((*attr)->name) {
                                        xmlAttrPtr val = get_attribute(data->properties, (*attr)->name);
-                                       xmlChar *str_val = NULL;
+                                       char *str_val = NULL;
 
                                        if (val && val->children && val->children->content) {
-                                               str_val = val->children->content;
-                                               if ((*attr)->fixed && strcmp((*attr)->fixed,str_val) != 0) {
+                                               str_val = (char*)val->children->content;
+                                               if ((*attr)->fixed && strcmp((*attr)->fixed, str_val) != 0) {
                                                        soap_error3(E_ERROR, "Encoding: Attribute '%s' has fixed value '%s' (value '%s' is not allowed)", (*attr)->name, (*attr)->fixed, str_val);
                                                }
                                        } else if ((*attr)->fixed) {
@@ -1429,17 +1429,17 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *
                                        zend_hash_internal_pointer_reset(ht);
                                        while (zend_hash_get_current_data(ht,(void**)&val) == SUCCESS) {
                                                if (Z_TYPE_PP(val) == IS_NULL && model->u.element->nillable) {
-                                                       property = xmlNewNode(NULL,"BOGUS");
+                                                       property = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                                        xmlAddChild(node, property);
                                                        set_xsi_nil(property);
                                                } else {
                                                        property = master_to_xml(enc, *val, style, node);
                                                        if (property->children && property->children->content &&
-                                                           model->u.element->fixed && strcmp(model->u.element->fixed,property->children->content) != 0) {
+                                                           model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != 0) {
                                                                soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, property->children->content);
                                                        }
                                                }
-                                               xmlNodeSetName(property, model->u.element->name);
+                                               xmlNodeSetName(property, BAD_CAST(model->u.element->name));
                                                if (style == SOAP_LITERAL &&
                                                    model->u.element->namens &&
                                                    model->u.element->form == XSD_FORM_QUALIFIED) {
@@ -1450,17 +1450,17 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *
                                        }
                                } else {
                                        if (Z_TYPE_P(data) == IS_NULL && model->u.element->nillable) {
-                                               property = xmlNewNode(NULL,"BOGUS");
+                                               property = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                                xmlAddChild(node, property);
                                                set_xsi_nil(property);
                                        } else {
                                                property = master_to_xml(enc, data, style, node);
                                                if (property->children && property->children->content &&
-                                                   model->u.element->fixed && strcmp(model->u.element->fixed,property->children->content) != 0) {
+                                                   model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != 0) {
                                                        soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, property->children->content);
                                                }
                                        }
-                                       xmlNodeSetName(property, model->u.element->name);
+                                       xmlNodeSetName(property, BAD_CAST(model->u.element->name));
                                        if (style == SOAP_LITERAL &&
                                            model->u.element->namens &&
                                            model->u.element->form == XSD_FORM_QUALIFIED) {
@@ -1470,7 +1470,7 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *
                                }
                                return 1;
                        } else if (strict && model->u.element->nillable && model->min_occurs > 0) {
-                               property = xmlNewNode(NULL,model->u.element->name);
+                               property = xmlNewNode(NULL, BAD_CAST(model->u.element->name));
                                xmlAddChild(node, property);
                                set_xsi_nil(property);
                                if (style == SOAP_LITERAL &&
@@ -1604,7 +1604,7 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
        TSRMLS_FETCH();
 
        if (!data || Z_TYPE_P(data) == IS_NULL) {
-               xmlParam = xmlNewNode(NULL,"BOGUS");
+               xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                xmlAddChild(parent, xmlParam);
                if (style == SOAP_ENCODED) {
                        set_xsi_nil(xmlParam);
@@ -1637,11 +1637,11 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                } else if (prop == NULL) {                                      
                                        xmlParam = master_to_xml(enc, data, style, parent);
                                } else {
-                                       xmlParam = xmlNewNode(NULL,"BOGUS");
+                                       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                        xmlAddChild(parent, xmlParam);
                                }
                        } else {
-                               xmlParam = xmlNewNode(NULL,"BOGUS");
+                               xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                xmlAddChild(parent, xmlParam);
                        }
                } else if (sdlType->kind == XSD_TYPEKIND_EXTENSION &&
@@ -1662,12 +1662,12 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                } else if (prop == NULL) {
                                        xmlParam = master_to_xml(sdlType->encode, data, style, parent);
                                } else {
-                                       xmlParam = xmlNewNode(NULL,"BOGUS");
+                                       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                        xmlAddChild(parent, xmlParam);
                                }
                        }
                } else {
-                       xmlParam = xmlNewNode(NULL,"BOGUS");
+                       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                        xmlAddChild(parent, xmlParam);
                }
 
@@ -1685,13 +1685,13 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                while (zend_hash_get_current_data(prop,(void**)&val) == SUCCESS) {
                                        xmlNodePtr property;
                                        if (Z_TYPE_PP(val) == IS_NULL && array_el->nillable) {
-                                               property = xmlNewNode(NULL,"BOGUS");
+                                               property = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                                xmlAddChild(xmlParam, property);
                                                set_xsi_nil(property);
                                        } else {
                                                property = master_to_xml(array_el->encode, *val, style, xmlParam);
                                        }
-                                       xmlNodeSetName(property, array_el->name);
+                                       xmlNodeSetName(property, BAD_CAST(array_el->name));
                                        if (style == SOAP_LITERAL &&
                                            array_el->namens &&
                                            array_el->form == XSD_FORM_QUALIFIED) {
@@ -1717,7 +1717,7 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
 
                                                        dummy = master_to_xml((*attr)->encode, zattr, SOAP_LITERAL, xmlParam);
                                                        if (dummy->children && dummy->children->content) {
-                                                               if ((*attr)->fixed && strcmp((*attr)->fixed,dummy->children->content) != 0) {
+                                                               if ((*attr)->fixed && strcmp((*attr)->fixed, (char*)dummy->children->content) != 0) {
                                                                        soap_error3(E_ERROR, "Encoding: Attribute '%s' has fixed value '%s' (value '%s' is not allowed)", (*attr)->name, (*attr)->fixed, dummy->children->content);
                                                                }
                                                                /* we need to handle xml: namespace specially, since it is
@@ -1728,9 +1728,9 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                                                     (*attr)->form == XSD_FORM_QUALIFIED)) {
                                                                        xmlNsPtr nsp = encode_add_ns(xmlParam, (*attr)->namens);
 
-                                                                       xmlSetNsProp(xmlParam, nsp, (*attr)->name, dummy->children->content);
+                                                                       xmlSetNsProp(xmlParam, nsp, BAD_CAST((*attr)->name), dummy->children->content);
                                                                } else {
-                                                                       xmlSetProp(xmlParam, (*attr)->name, dummy->children->content);
+                                                                       xmlSetProp(xmlParam, BAD_CAST((*attr)->name), dummy->children->content);
                                                                }
                                                        }
                                                        xmlUnlinkNode(dummy);
@@ -1745,7 +1745,7 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                        set_ns_and_type(xmlParam, type);
                }
        } else {
-               xmlParam = xmlNewNode(NULL,"BOGUS");
+               xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                xmlAddChild(parent, xmlParam);
 
                if (prop != NULL) {
@@ -1775,7 +1775,7 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
                                                prop_name = str_key;
                                        }
                                        if (prop_name) {
-                                               xmlNodeSetName(property, prop_name);
+                                               xmlNodeSetName(property, BAD_CAST(prop_name));
                                        }
                                }
                                zend_hash_move_forward(prop);
@@ -1929,17 +1929,17 @@ static void add_xml_array_elements(xmlNodePtr xmlParam,
                                                xparam = master_to_xml(enc, (*zdata), style, xmlParam);
                                        }
                                } else {
-                                       xparam = xmlNewNode(NULL,"BOGUS");
+                                       xparam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                        xmlAddChild(xmlParam, xparam);
                                }
 
                                if (type) {
-                                       xmlNodeSetName(xparam, type->name);
+                                       xmlNodeSetName(xparam, BAD_CAST(type->name));
                                } else if (style == SOAP_LITERAL && enc && enc->details.type_str) {
-                                       xmlNodeSetName(xparam, enc->details.type_str);
+                                       xmlNodeSetName(xparam, BAD_CAST(enc->details.type_str));
                                        xmlSetNs(xparam, ns);
                                } else {
-                                       xmlNodeSetName(xparam, "item");
+                                       xmlNodeSetName(xparam, BAD_CAST("item"));
                                }
                        } else {
                                if (zdata) {
@@ -1955,15 +1955,15 @@ static void add_xml_array_elements(xmlNodePtr xmlParam,
                        if (dimension == 1) {
                                xmlNodePtr xparam;
 
-                               xparam = xmlNewNode(NULL,"BOGUS");
+                               xparam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
                                xmlAddChild(xmlParam, xparam);
                                if (type) {
-                                       xmlNodeSetName(xparam, type->name);
+                                       xmlNodeSetName(xparam, BAD_CAST(type->name));
                                } else if (style == SOAP_LITERAL && enc && enc->details.type_str) {
-                                       xmlNodeSetName(xparam, enc->details.type_str);
+                                       xmlNodeSetName(xparam, BAD_CAST(enc->details.type_str));
                                        xmlSetNs(xparam, ns);
                                } else {
-                                       xmlNodeSetName(xparam, "item");
+                                       xmlNodeSetName(xparam, BAD_CAST("item"));
                                }
                        } else {
                          add_xml_array_elements(xmlParam, type, enc, ns, dimension-1, dims+1, NULL, style);
@@ -1996,7 +1996,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod
 
        soap_version = SOAP_GLOBAL(soap_version);
 
-       xmlParam = xmlNewNode(NULL,"BOGUS");
+       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, xmlParam);
 
        FIND_ZVAL_NULL(data, xmlParam, style);
@@ -2200,7 +2200,7 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
                xmlNsPtr nsptr;
 
                parse_namespace(attr->children->content, &type, &ns);
-               nsptr = xmlSearchNs(attr->doc, attr->parent, ns);
+               nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns));
 
                end = strrchr(type,'[');
                if (end) {
@@ -2209,7 +2209,7 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
                        dims = get_position(dimension, end+1);
                }
                if (nsptr != NULL) {
-                       enc = get_encoder(SOAP_GLOBAL(sdl), nsptr->href, type);
+                       enc = get_encoder(SOAP_GLOBAL(sdl), (char*)nsptr->href, type);
                }
                efree(type);
                if (ns) {efree(ns);}
@@ -2221,17 +2221,17 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
                xmlNsPtr nsptr;
 
                parse_namespace(attr->children->content, &type, &ns);
-               nsptr = xmlSearchNs(attr->doc, attr->parent, ns);
+               nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       enc = get_encoder(SOAP_GLOBAL(sdl), nsptr->href, type);
+                       enc = get_encoder(SOAP_GLOBAL(sdl), (char*)nsptr->href, type);
                }
                efree(type);
                if (ns) {efree(ns);}
 
                if ((attr = get_attribute(data->properties,"arraySize")) &&
                    attr->children && attr->children->content) {
-                       dimension = calc_dimension_12(attr->children->content);
-                       dims = get_position_12(dimension, attr->children->content);
+                       dimension = calc_dimension_12((char*)attr->children->content);
+                       dims = get_position_12(dimension, (char*)attr->children->content);
                } else {
                        dims = emalloc(sizeof(int));
                        *dims = 0;
@@ -2240,8 +2240,8 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
        } else if ((attr = get_attribute(data->properties,"arraySize")) &&
            attr->children && attr->children->content) {
 
-               dimension = calc_dimension_12(attr->children->content);
-               dims = get_position_12(dimension, attr->children->content);
+               dimension = calc_dimension_12((char*)attr->children->content);
+               dims = get_position_12(dimension, (char*)attr->children->content);
 
        } else if (type->sdl_type != NULL &&
                   type->sdl_type->attributes != NULL &&
@@ -2320,10 +2320,10 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
        if (data &&
            (attr = get_attribute(data->properties,"offset")) &&
             attr->children && attr->children->content) {
-               char* tmp = strrchr(attr->children->content,'[');
+               char* tmp = strrchr((char*)attr->children->content,'[');
 
                if (tmp == NULL) {
-                       tmp = attr->children->content;
+                       tmp = (char*)attr->children->content;
                }
                get_position_ex(dimension, tmp, &pos);
        }
@@ -2338,9 +2338,9 @@ static zval *to_zval_array(encodeTypePtr type, xmlNodePtr data)
 
                        tmpVal = master_to_zval(enc, trav);
                        if (position != NULL && position->children && position->children->content) {
-                               char* tmp = strrchr(position->children->content,'[');
+                               char* tmp = strrchr((char*)position->children->content, '[');
                                if (tmp == NULL) {
-                                       tmp = position->children->content;
+                                       tmp = (char*)position->children->content;
                                }
                                get_position_ex(dimension, tmp, &pos);
                        }
@@ -2392,7 +2392,7 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
        xmlNodePtr xmlParam;
        int i;
 
-       xmlParam = xmlNewNode(NULL,"BOGUS");
+       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, xmlParam);
        FIND_ZVAL_NULL(data, xmlParam, style);
 
@@ -2408,15 +2408,15 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
 
                        zend_hash_get_current_data(data->value.ht, (void **)&temp_data);
                        if (Z_TYPE_PP(temp_data) != IS_NULL) {
-                               item = xmlNewNode(NULL,"item");
+                               item = xmlNewNode(NULL, BAD_CAST("item"));
                                xmlAddChild(xmlParam, item);
-                               key = xmlNewNode(NULL,"key");
+                               key = xmlNewNode(NULL, BAD_CAST("key"));
                                xmlAddChild(item,key);
                                if (zend_hash_get_current_key(data->value.ht, &key_val, (long *)&int_val, FALSE) == HASH_KEY_IS_STRING) {
                                        if (style == SOAP_ENCODED) {
                                                set_xsi_type(key, "xsd:string");
                                        }
-                                       xmlNodeSetContent(key, key_val);
+                                       xmlNodeSetContent(key, BAD_CAST(key_val));
                                } else {
                                        smart_str tmp = {0};
                                        smart_str_append_long(&tmp, int_val);
@@ -2425,14 +2425,14 @@ static xmlNodePtr to_xml_map(encodeTypePtr type, zval *data, int style, xmlNodeP
                                        if (style == SOAP_ENCODED) {
                                                set_xsi_type(key, "xsd:int");
                                        }
-                                       xmlNodeSetContentLen(key, tmp.c, tmp.len);
+                                       xmlNodeSetContentLen(key, BAD_CAST(tmp.c), tmp.len);
 
                                        smart_str_free(&tmp);
                                }
 
                                xparam = master_to_xml(get_conversion((*temp_data)->type), (*temp_data), style, item);
 
-                               xmlNodeSetName(xparam, "value");
+                               xmlNodeSetName(xparam, BAD_CAST("value"));
                        }
                        zend_hash_move_forward(data->value.ht);
                }
@@ -2511,7 +2511,7 @@ static zval *guess_zval_convert(encodeTypePtr type, xmlNodePtr data)
 {
        encodePtr enc = NULL;
        xmlAttrPtr tmpattr;
-       char *type_name = NULL;
+       xmlChar *type_name = NULL;
        zval *ret;
        TSRMLS_FETCH();
 
@@ -2580,7 +2580,7 @@ static zval *guess_zval_convert(encodeTypePtr type, xmlNodePtr data)
 #endif
                add_property_zval(soapvar, "enc_value", ret);
                parse_namespace(type_name, &cptype, &ns);
-               nsptr = xmlSearchNs(data->doc, data, ns);
+               nsptr = xmlSearchNs(data->doc, data, BAD_CAST(ns));
                add_property_string(soapvar, "enc_stype", cptype, 1);
                if (nsptr) {
                        add_property_string(soapvar, "enc_ns", (char*)nsptr->href, 1);
@@ -2605,7 +2605,7 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
 
        xmlNodePtr xmlParam;
 
-       xmlParam = xmlNewNode(NULL,"BOGUS");
+       xmlParam = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, xmlParam);
        FIND_ZVAL_NULL(data, xmlParam, style);
 
@@ -2642,10 +2642,10 @@ static xmlNodePtr to_xml_datetime_ex(encodeTypePtr type, zval *data, char *forma
                }
                strcat(buf, tzbuf);
 
-               xmlNodeSetContent(xmlParam, buf);
+               xmlNodeSetContent(xmlParam, BAD_CAST(buf));
                efree(buf);
        } else if (Z_TYPE_P(data) == IS_STRING) {
-               xmlNodeSetContentLen(xmlParam, Z_STRVAL_P(data), Z_STRLEN_P(data));
+               xmlNodeSetContentLen(xmlParam, BAD_CAST(Z_STRVAL_P(data)), Z_STRLEN_P(data));
        }
 
        if (style == SOAP_ENCODED) {
@@ -2719,7 +2719,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                }
        }
 
-       ret = xmlNewNode(NULL,"BOGUS");
+       ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
        xmlAddChild(parent, ret);
        FIND_ZVAL_NULL(data, ret, style);
        if (Z_TYPE_P(data) == IS_ARRAY) {
@@ -2734,7 +2734,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                                if (list.len != 0) {
                                        smart_str_appendc(&list, ' ');
                                }
-                               smart_str_appends(&list, dummy->children->content);
+                               smart_str_appends(&list, (char*)dummy->children->content);
                        } else {
                                soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                        }
@@ -2743,7 +2743,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                        zend_hash_move_forward(ht);
                }
                smart_str_0(&list);
-               xmlNodeSetContentLen(ret, list.c, list.len);
+               xmlNodeSetContentLen(ret, BAD_CAST(list.c), list.len);
                smart_str_free(&list);
        } else {
                zval tmp = *data;
@@ -2756,7 +2756,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                        data = &tmp;
                }
                str = estrndup(Z_STRVAL_P(data), Z_STRLEN_P(data));
-               whiteSpace_collapse(str);
+               whiteSpace_collapse(BAD_CAST(str));
                start = str;
                while (start != NULL && *start != '\0') {
                        xmlNodePtr dummy;
@@ -2773,7 +2773,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                                if (list.len != 0) {
                                        smart_str_appendc(&list, ' ');
                                }
-                               smart_str_appends(&list, dummy->children->content);
+                               smart_str_appends(&list, (char*)dummy->children->content);
                        } else {
                                soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
                        }
@@ -2783,7 +2783,7 @@ static xmlNodePtr to_xml_list(encodeTypePtr enc, zval *data, int style, xmlNodeP
                        start = next;
                }
                smart_str_0(&list);
-               xmlNodeSetContentLen(ret, list.c, list.len);
+               xmlNodeSetContentLen(ret, BAD_CAST(list.c), list.len);
                smart_str_free(&list);
                efree(str);
                if (data == &tmp) {zval_dtor(&tmp);}
@@ -2824,13 +2824,13 @@ static xmlNodePtr to_xml_any(encodeTypePtr type, zval *data, int style, xmlNodeP
        xmlNodePtr ret;
 
        if (Z_TYPE_P(data) == IS_STRING) {
-               ret = xmlNewTextLen(Z_STRVAL_P(data), Z_STRLEN_P(data));
+               ret = xmlNewTextLen(BAD_CAST(Z_STRVAL_P(data)), Z_STRLEN_P(data));
        } else {
                zval tmp = *data;
 
                zval_copy_ctor(&tmp);
                convert_to_string(&tmp);
-               ret = xmlNewTextLen(Z_STRVAL(tmp), Z_STRLEN(tmp));
+               ret = xmlNewTextLen(BAD_CAST(Z_STRVAL(tmp)), Z_STRLEN(tmp));
                zval_dtor(&tmp);
        }
        ret->name = xmlStringTextNoenc;
@@ -2989,7 +2989,7 @@ static xmlNodePtr check_and_resolve_href(xmlNodePtr data)
                if (href) {
                        /*  Internal href try and find node */
                        if (href->children->content[0] == '#') {
-                               xmlNodePtr ret = get_node_with_attribute_recursive(data->doc->children, NULL, "id", &href->children->content[1]);
+                               xmlNodePtr ret = get_node_with_attribute_recursive(data->doc->children, NULL, "id", (char*)&href->children->content[1]);
                                if (!ret) {
                                        soap_error1(E_ERROR, "Encoding: Unresolved reference '%s'", href->children->content);
                                }
@@ -3002,7 +3002,7 @@ static xmlNodePtr check_and_resolve_href(xmlNodePtr data)
                /* SOAP 1.2 enc:id enc:ref */
                href = get_attribute_ex(data->properties, "ref", SOAP_1_2_ENC_NAMESPACE);
                if (href) {
-                       char* id;
+                       xmlChar* id;
                        xmlNodePtr ret;
 
                        if (href->children->content[0] == '#') {
@@ -3010,7 +3010,7 @@ static xmlNodePtr check_and_resolve_href(xmlNodePtr data)
                        } else {
                                id = href->children->content;
                        }
-                       ret = get_node_with_attribute_recursive_ex(data->doc->children, NULL, NULL, "id", id, SOAP_1_2_ENC_NAMESPACE);
+                       ret = get_node_with_attribute_recursive_ex(data->doc->children, NULL, NULL, "id", (char*)id, SOAP_1_2_ENC_NAMESPACE);
                        if (!ret) {
                                soap_error1(E_ERROR, "Encoding: Unresolved reference '%s'", href->children->content);
                        } else if (ret == data) {
@@ -3043,13 +3043,13 @@ xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns)
          return NULL;
        }
 
-       xmlns = xmlSearchNsByHref(node->doc,node,ns);
+       xmlns = xmlSearchNsByHref(node->doc, node, BAD_CAST(ns));
        if (xmlns == NULL) {
-               char* prefix;
+               xmlChar* prefix;
                TSRMLS_FETCH();
 
                if (zend_hash_find(&SOAP_GLOBAL(defEncNs), (char*)ns, strlen(ns) + 1, (void **)&prefix) == SUCCESS) {
-                       xmlns = xmlNewNs(node->doc->children,ns,prefix);
+                       xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), prefix);
                } else {
                        smart_str prefix = {0};
                        int num = ++SOAP_GLOBAL(cur_uniq_ns);
@@ -3057,7 +3057,7 @@ xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns)
                        smart_str_appendl(&prefix, "ns", 2);
                        smart_str_append_long(&prefix, num);
                        smart_str_0(&prefix);
-                       xmlns = xmlNewNs(node->doc->children,ns,prefix.c);
+                       xmlns = xmlNewNs(node->doc->children, BAD_CAST(ns), BAD_CAST(prefix.c));
                        smart_str_free(&prefix);
                }
        }
@@ -3066,7 +3066,7 @@ xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns)
 
 static void set_ns_prop(xmlNodePtr node, char *ns, char *name, char *val)
 {
-       xmlSetNsProp(node, encode_add_ns(node, ns), name, val);
+       xmlSetNsProp(node, encode_add_ns(node, ns), BAD_CAST(name), BAD_CAST(val));
 }
 
 static void set_xsi_nil(xmlNodePtr node)
@@ -3211,7 +3211,7 @@ static encodePtr get_array_type(xmlNodePtr node, zval *array, smart_str *type TS
                        if (cur_ns) {
                                xmlNsPtr ns = encode_add_ns(node,cur_ns);
 
-                               smart_str_appends(type, ns->prefix);
+                               smart_str_appends(type, (char*)ns->prefix);
                                smart_str_appendc(type, ':');
                                smart_str_appends(&array_type, cur_ns);
                                smart_str_appendc(&array_type, ':');
@@ -3246,7 +3246,7 @@ static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smar
                        ns = SOAP_1_1_ENC_NAMESPACE;
                }
                xmlns = encode_add_ns(node,ns);
-               smart_str_appends(ret, xmlns->prefix);
+               smart_str_appends(ret, (char*)xmlns->prefix);
                smart_str_appendc(ret, ':');
        }
        smart_str_appendl(ret, type, strlen(type));
index 1a896d0336ad1b3813be351dbaa50c42b1c9f97a..2e92ec37573550a1391c0bfac3db53064db982a2 100644 (file)
@@ -207,8 +207,8 @@ zval *to_zval_user(encodeTypePtr type, xmlNodePtr node);
 zval *to_zval_after_user(encodeTypePtr type, zval *data);
 #endif
 
-void whiteSpace_replace(char* str);
-void whiteSpace_collapse(char* str);
+void whiteSpace_replace(xmlChar* str);
+void whiteSpace_collapse(xmlChar* str);
 
 xmlNodePtr sdl_guess_convert_xml(encodeTypePtr enc, zval* data, int style, xmlNodePtr parent);
 zval *sdl_guess_convert_zval(encodeTypePtr enc, xmlNodePtr data);
index e8cb6840db39955d8e5349c82390929a65bff0e4..e7cb9810d9f9a7761634b860900bc11328ea8a6c 100644 (file)
@@ -60,7 +60,7 @@ void proxy_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
        zval **login, **password;
 
        if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_login", sizeof("_proxy_login"), (void **)&login) == SUCCESS) {
-               char* buf;
+               unsigned char* buf;
                int len;
                smart_str auth = {0};
 
@@ -70,9 +70,9 @@ void proxy_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
                        smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
                }
                smart_str_0(&auth);
-               buf = php_base64_encode(auth.c, auth.len, &len);
+               buf = php_base64_encode((unsigned char*)auth.c, auth.len, &len);
                smart_str_append_const(soap_headers, "Proxy-Authorization: Basic ");
-               smart_str_appendl(soap_headers, buf, len);
+               smart_str_appendl(soap_headers, (char*)buf, len);
                smart_str_append_const(soap_headers, "\r\n");
                efree(buf);
                smart_str_free(&auth);
@@ -86,7 +86,7 @@ void basic_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
 
        if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_login", sizeof("_login"), (void **)&login) == SUCCESS &&
                        !zend_hash_exists(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest"))) {
-               char* buf;
+               unsigned char* buf;
                int len;
                smart_str auth = {0};
 
@@ -96,9 +96,9 @@ void basic_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
                        smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
                }
                smart_str_0(&auth);
-               buf = php_base64_encode(auth.c, auth.len, &len);
+               buf = php_base64_encode((unsigned char*)auth.c, auth.len, &len);
                smart_str_append_const(soap_headers, "Authorization: Basic ");
-               smart_str_appendl(soap_headers, buf, len);
+               smart_str_appendl(soap_headers, (char*)buf, len);
                smart_str_append_const(soap_headers, "\r\n");
                efree(buf);
                smart_str_free(&auth);
@@ -470,7 +470,7 @@ try_again:
 
                                        PHP_MD5Init(&md5ctx);
                                        sprintf(cnonce, "%d", rand());
-                                       PHP_MD5Update(&md5ctx, cnonce, strlen(cnonce));
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, strlen(cnonce));
                                        PHP_MD5Final(hash, &md5ctx);
                                        make_digest(cnonce, hash);
 
@@ -484,16 +484,16 @@ try_again:
                                        }
 
                                        PHP_MD5Init(&md5ctx);
-                                       PHP_MD5Update(&md5ctx, Z_STRVAL_PP(login), Z_STRLEN_PP(login));
-                                       PHP_MD5Update(&md5ctx, ":", 1);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)Z_STRVAL_PP(login), Z_STRLEN_PP(login));
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                        if (zend_hash_find(Z_ARRVAL_PP(digest), "realm", sizeof("realm"), (void **)&tmp) == SUCCESS &&
                                            Z_TYPE_PP(tmp) == IS_STRING) {
-                                               PHP_MD5Update(&md5ctx, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
                                        }
-                                       PHP_MD5Update(&md5ctx, ":", 1);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                        if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_password", sizeof("_password"), (void **)&password) == SUCCESS &&
                                            Z_TYPE_PP(password) == IS_STRING) {
-                                               PHP_MD5Update(&md5ctx, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)Z_STRVAL_PP(password), Z_STRLEN_PP(password));
                                        }
                                        PHP_MD5Final(hash, &md5ctx);
                                        make_digest(HA1, hash);
@@ -502,26 +502,26 @@ try_again:
                                            Z_STRLEN_PP(tmp) == sizeof("md5-sess")-1 &&
                                            stricmp(Z_STRVAL_PP(tmp), "md5-sess") == 0) {
                                                PHP_MD5Init(&md5ctx);
-                                               PHP_MD5Update(&md5ctx, HA1, 32);
-                                               PHP_MD5Update(&md5ctx, ":", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)HA1, 32);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                                if (zend_hash_find(Z_ARRVAL_PP(digest), "nonce", sizeof("nonce"), (void **)&tmp) == SUCCESS &&
                                                    Z_TYPE_PP(tmp) == IS_STRING) {
-                                                       PHP_MD5Update(&md5ctx, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+                                                       PHP_MD5Update(&md5ctx, (unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
                                                }
-                                               PHP_MD5Update(&md5ctx, ":", 1);
-                                               PHP_MD5Update(&md5ctx, cnonce, 8);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, 8);
                                                PHP_MD5Final(hash, &md5ctx);
                                                make_digest(HA1, hash);
                                        }
 
                                        PHP_MD5Init(&md5ctx);
-                                       PHP_MD5Update(&md5ctx, "POST:", sizeof("POST:")-1);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)"POST:", sizeof("POST:")-1);
                                        if (phpurl->path) {
-                                               PHP_MD5Update(&md5ctx, phpurl->path, strlen(phpurl->path));
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->path, strlen(phpurl->path));
                                        }
                                        if (phpurl->query) {
-                                               PHP_MD5Update(&md5ctx, "?", 1);
-                                               PHP_MD5Update(&md5ctx, phpurl->query, strlen(phpurl->query));
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)"?", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)phpurl->query, strlen(phpurl->query));
                                        }
 
                                        /* TODO: Support for qop="auth-int" */
@@ -538,24 +538,24 @@ try_again:
                                        make_digest(HA2, hash);
 
                                        PHP_MD5Init(&md5ctx);
-                                       PHP_MD5Update(&md5ctx, HA1, 32);
-                                       PHP_MD5Update(&md5ctx, ":", 1);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)HA1, 32);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                        if (zend_hash_find(Z_ARRVAL_PP(digest), "nonce", sizeof("nonce"), (void **)&tmp) == SUCCESS &&
                                            Z_TYPE_PP(tmp) == IS_STRING) {
-                                               PHP_MD5Update(&md5ctx, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
                                        }
-                                       PHP_MD5Update(&md5ctx, ":", 1);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                        if (zend_hash_find(Z_ARRVAL_PP(digest), "qop", sizeof("qop"), (void **)&tmp) == SUCCESS &&
                                            Z_TYPE_PP(tmp) == IS_STRING) {
-                                               PHP_MD5Update(&md5ctx, nc, 8);
-                                               PHP_MD5Update(&md5ctx, ":", 1);
-                                               PHP_MD5Update(&md5ctx, cnonce, 8);
-                                               PHP_MD5Update(&md5ctx, ":", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)nc, 8);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, 8);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                                /* TODO: Support for qop="auth-int" */
-                                               PHP_MD5Update(&md5ctx, "auth", sizeof("auth")-1);
-                                               PHP_MD5Update(&md5ctx, ":", 1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)"auth", sizeof("auth")-1);
+                                               PHP_MD5Update(&md5ctx, (unsigned char*)":", 1);
                                        }
-                                       PHP_MD5Update(&md5ctx, HA2, 32);
+                                       PHP_MD5Update(&md5ctx, (unsigned char*)HA2, 32);
                                        PHP_MD5Final(hash, &md5ctx);
                                        make_digest(response, hash);
        
@@ -602,7 +602,7 @@ try_again:
                                        smart_str_append_const(&soap_headers, "\"\r\n");
                                }
                        } else {
-                               char* buf;
+                               unsigned char* buf;
                                int len;
 
                                smart_str auth = {0};
@@ -613,9 +613,9 @@ try_again:
                                        smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
                                }
                                smart_str_0(&auth);
-                               buf = php_base64_encode(auth.c, auth.len, &len);
+                               buf = php_base64_encode((unsigned char*)auth.c, auth.len, &len);
                                smart_str_append_const(&soap_headers, "Authorization: Basic ");
-                               smart_str_appendl(&soap_headers, buf, len);
+                               smart_str_appendl(&soap_headers, (char*)buf, len);
                                smart_str_append_const(&soap_headers, "\r\n");
                                efree(buf);
                                smart_str_free(&auth);
index 92d9df5161f9605ce5d8d9be42ef610ab7d3ebcf..9ed55d2b1d7805b64611eb3c2ad02e92e52200d0 100644 (file)
@@ -90,7 +90,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
                                add_soap_fault(this_ptr, "Client", "encodingStyle cannot be specified on the Envelope", NULL, NULL TSRMLS_CC);
                                xmlFreeDoc(response);
                                return FALSE;
-                       } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                       } else if (strcmp((char*)attr->children->content, SOAP_1_1_ENC_NAMESPACE) != 0) {
                                add_soap_fault(this_ptr, "Client", "Unknown data encoding style", NULL, NULL TSRMLS_CC);
                                xmlFreeDoc(response);
                                return FALSE;
@@ -140,7 +140,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
                                add_soap_fault(this_ptr, "Client", "encodingStyle cannot be specified on the Body", NULL, NULL TSRMLS_CC);
                                xmlFreeDoc(response);
                                return FALSE;
-                       } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                       } else if (strcmp((char*)attr->children->content, SOAP_1_1_ENC_NAMESPACE) != 0) {
                                add_soap_fault(this_ptr, "Client", "Unknown data encoding style", NULL, NULL TSRMLS_CC);
                                xmlFreeDoc(response);
                                return FALSE;
@@ -166,7 +166,7 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
                                        add_soap_fault(this_ptr, "Client", "encodingStyle cannot be specified on the Header", NULL, NULL TSRMLS_CC);
                                        xmlFreeDoc(response);
                                        return FALSE;
-                               } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                               } else if (strcmp((char*)attr->children->content, SOAP_1_1_ENC_NAMESPACE) != 0) {
                                        add_soap_fault(this_ptr, "Client", "Unknown data encoding style", NULL, NULL TSRMLS_CC);
                                        xmlFreeDoc(response);
                                        return FALSE;
@@ -184,35 +184,35 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
                xmlNodePtr tmp;
 
                if (soap_version == SOAP_1_1) {
-                       tmp = get_node(fault->children,"faultcode");
+                       tmp = get_node(fault->children, "faultcode");
                        if (tmp != NULL && tmp->children != NULL) {
-                               faultcode = tmp->children->content;
+                               faultcode = (char*)tmp->children->content;
                        }
 
-                       tmp = get_node(fault->children,"faultstring");
+                       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);
                        }
 
-                       tmp = get_node(fault->children,"faultactor");
+                       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);
                        }
 
-                       tmp = get_node(fault->children,"detail");
+                       tmp = get_node(fault->children, "detail");
                        if (tmp != NULL) {
                                details = master_to_zval(NULL, tmp);
                        }
                } else {
-                       tmp = get_node(fault->children,"Code");
+                       tmp = get_node(fault->children, "Code");
                        if (tmp != NULL && tmp->children != NULL) {
-                               tmp = get_node(tmp->children,"Value");
+                               tmp = get_node(tmp->children, "Value");
                                if (tmp != NULL && tmp->children != NULL) {
-                                       faultcode = tmp->children->content;
+                                       faultcode = (char*)tmp->children->content;
                                }
                        }
 
@@ -394,10 +394,10 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction
                                        sdlSoapBindingFunctionHeaderPtr *hdr;
 
                                        if (trav->ns) {
-                                               smart_str_appends(&key,trav->ns->href);
+                                               smart_str_appends(&key, (char*)trav->ns->href);
                                                smart_str_appendc(&key,':');
                                        }
-                                       smart_str_appends(&key,trav->name);
+                                       smart_str_appends(&key, (char*)trav->name);
                                        smart_str_0(&key);
                                        if (zend_hash_find(hdrs, key.c, key.len+1, (void**)&hdr) == SUCCESS) {
                                                enc = (*hdr)->encode;
index 42f05c64ff957c625d6ace5cbbca1c714c77b0d2..9040eec57d3db0bebe734852d35edb09fa84349f 100644 (file)
@@ -46,7 +46,7 @@ static int schema_restriction_var_char(xmlNodePtr val, sdlRestrictionCharPtr *va
 
 static void schema_type_fixup(sdlCtx *ctx, sdlTypePtr type);
 
-static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns, const char *type)
+static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *type)
 {
        smart_str nscat = {0};
        encodePtr enc, *enc_ptr;
@@ -55,9 +55,9 @@ static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns,
                sdl->encoders = emalloc(sizeof(HashTable));
                zend_hash_init(sdl->encoders, 0, NULL, delete_encoder, 0);
        }
-       smart_str_appends(&nscat, ns);
+       smart_str_appends(&nscat, (char*)ns);
        smart_str_appendc(&nscat, ':');
-       smart_str_appends(&nscat, type);
+       smart_str_appends(&nscat, (char*)type);
        smart_str_0(&nscat);
        if (zend_hash_find(sdl->encoders, nscat.c, nscat.len + 1, (void**)&enc_ptr) == SUCCESS) {
                enc = *enc_ptr;
@@ -73,8 +73,8 @@ static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns,
        }
        memset(enc, 0, sizeof(encode));
 
-       enc->details.ns = estrdup(ns);
-       enc->details.type_str = estrdup(type);
+       enc->details.ns = estrdup((char*)ns);
+       enc->details.type_str = estrdup((char*)type);
        enc->details.sdl_type = cur_type;
        enc->to_xml = sdl_guess_convert_xml;
        enc->to_zval = sdl_guess_convert_zval;
@@ -86,9 +86,9 @@ static encodePtr create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns,
        return enc;
 }
 
-static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char *ns, const char *type)
+static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const xmlChar *ns, const xmlChar *type)
 {
-       encodePtr enc = get_encoder(sdl, ns, type);
+       encodePtr enc = get_encoder(sdl, (char*)ns, (char*)type);
        if (enc == NULL) {
                enc = create_encoder(sdl, cur_type, ns, type);
        }
@@ -97,12 +97,12 @@ static encodePtr get_create_encoder(sdlPtr sdl, sdlTypePtr cur_type, const char
 
 static void schema_load_file(sdlCtx *ctx, xmlAttrPtr ns, xmlChar *location, xmlAttrPtr tns, int import TSRMLS_DC) {
        if (location != NULL &&
-           !zend_hash_exists(&ctx->docs, location, strlen(location)+1)) {
+           !zend_hash_exists(&ctx->docs, (char*)location, xmlStrlen(location)+1)) {
                xmlDocPtr doc;
                xmlNodePtr schema;
                xmlAttrPtr new_tns;
 
-               doc = soap_xmlParseFile(location TSRMLS_CC);
+               doc = soap_xmlParseFile((char*)location TSRMLS_CC);
                if (doc == NULL) {
                        soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s'", location);
                }
@@ -113,7 +113,7 @@ static void schema_load_file(sdlCtx *ctx, xmlAttrPtr ns, xmlChar *location, xmlA
                }
                new_tns = get_attribute(schema->properties, "targetNamespace");
                if (import) {
-                       if (ns != NULL && (new_tns == NULL || strcmp(ns->children->content,new_tns->children->content) != 0)) {
+                       if (ns != NULL && (new_tns == NULL || xmlStrcmp(ns->children->content, new_tns->children->content) != 0)) {
                                xmlFreeDoc(doc);
                                soap_error2(E_ERROR, "Parsing Schema: can't import schema from '%s', unexpected 'targetNamespace'='%s'", location, ns->children->content);
                        }
@@ -125,14 +125,14 @@ static void schema_load_file(sdlCtx *ctx, xmlAttrPtr ns, xmlChar *location, xmlA
                        new_tns = get_attribute(schema->properties, "targetNamespace");
                        if (new_tns == NULL) {
                                if (tns != NULL) {
-                                       xmlSetProp(schema, "targetNamespace", tns->children->content);
+                                       xmlSetProp(schema, BAD_CAST("targetNamespace"), tns->children->content);
                                }
-                       } else if (tns != NULL && strcmp(tns->children->content,new_tns->children->content) != 0) {
+                       } else if (tns != NULL && xmlStrcmp(tns->children->content, new_tns->children->content) != 0) {
                                xmlFreeDoc(doc);
                                soap_error1(E_ERROR, "Parsing Schema: can't include schema from '%s', different 'targetNamespace'", location);
                        }
                }
-               zend_hash_add(&ctx->docs, location, strlen(location)+1, (void**)&doc, sizeof(xmlDocPtr), NULL);
+               zend_hash_add(&ctx->docs, (char*)location, xmlStrlen(location)+1, (void**)&doc, sizeof(xmlDocPtr), NULL);
                load_schema(ctx, schema TSRMLS_CC);
        }
 }
@@ -177,8 +177,8 @@ int load_schema(sdlCtx *ctx, xmlNodePtr schema TSRMLS_DC)
 
        tns = get_attribute(schema->properties, "targetNamespace");
        if (tns == NULL) {
-               tns = xmlSetProp(schema, "targetNamespace", "");
-               xmlNewNs(schema, "", NULL);
+               tns = xmlSetProp(schema, BAD_CAST("targetNamespace"), BAD_CAST(""));
+               xmlNewNs(schema, BAD_CAST(""), NULL);
        }
 
        trav = schema->children;
@@ -231,7 +231,7 @@ int load_schema(sdlCtx *ctx, xmlNodePtr schema TSRMLS_DC)
                        ns = get_attribute(trav->properties, "namespace");
                        location = get_attribute(trav->properties, "schemaLocation");
 
-                       if (ns != NULL && tns != NULL && strcmp(ns->children->content,tns->children->content) == 0) {
+                       if (ns != NULL && tns != NULL && xmlStrcmp(ns->children->content, tns->children->content) == 0) {
                                if (location) {
                                        soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
                                } else {
@@ -318,8 +318,8 @@ static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType,
                memset(newType, 0, sizeof(sdlType));
                newType->kind = XSD_TYPEKIND_SIMPLE;
                if (name != NULL) {
-                       newType->name = estrdup(name->children->content);
-                       newType->namens = estrdup(ns->children->content);
+                       newType->name = estrdup((char*)name->children->content);
+                       newType->namens = estrdup((char*)ns->children->content);
                } else {
                        newType->name = estrdup(cur_type->name);
                        newType->namens = estrdup(cur_type->namens);
@@ -348,8 +348,8 @@ static int schema_simpleType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr simpleType,
                newType = emalloc(sizeof(sdlType));
                memset(newType, 0, sizeof(sdlType));
                newType->kind = XSD_TYPEKIND_SIMPLE;
-               newType->name = estrdup(name->children->content);
-               newType->namens = estrdup(ns->children->content);
+               newType->name = estrdup((char*)name->children->content);
+               newType->namens = estrdup((char*)ns->children->content);
 
                if (cur_type == NULL) {
                        zend_hash_next_index_insert(sdl->types,  &newType, sizeof(sdlTypePtr), (void **)&ptr);
@@ -416,7 +416,7 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
                xmlNsPtr nsptr;
 
                parse_namespace(itemType->children->content, &type, &ns);
-               nsptr = xmlSearchNs(listType->doc, listType, ns);
+               nsptr = xmlSearchNs(listType->doc, listType, BAD_CAST(ns));
                if (nsptr != NULL) {
                        sdlTypePtr newType, *tmp;
 
@@ -424,9 +424,9 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
                        memset(newType, 0, sizeof(sdlType));
 
                        newType->name = estrdup(type);
-                       newType->namens = estrdup(nsptr->href);
+                       newType->namens = estrdup((char*)nsptr->href);
 
-                       newType->encode = get_create_encoder(sdl, newType, (char *)nsptr->href, type);
+                       newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type));
 
                        if (cur_type->elements == NULL) {
                                cur_type->elements = emalloc(sizeof(HashTable));
@@ -454,7 +454,7 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
                memset(newType, 0, sizeof(sdlType));
 
                newType->name = estrdup("anonymous");
-               newType->namens = estrdup(tns->children->content);
+               newType->namens = estrdup((char*)tns->children->content);
 
                if (cur_type->elements == NULL) {
                        cur_type->elements = emalloc(sizeof(HashTable));
@@ -490,8 +490,8 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
                char *type, *ns;
                xmlNsPtr nsptr;
 
-               str = estrdup(memberTypes->children->content);
-               whiteSpace_collapse(str);
+               str = estrdup((char*)memberTypes->children->content);
+               whiteSpace_collapse(BAD_CAST(str));
                start = str;
                while (start != NULL && *start != '\0') {
                        end = strchr(start,' ');
@@ -502,8 +502,8 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
                                next = end+1;
                        }
 
-                       parse_namespace(start, &type, &ns);
-                       nsptr = xmlSearchNs(unionType->doc, unionType, ns);
+                       parse_namespace(BAD_CAST(start), &type, &ns);
+                       nsptr = xmlSearchNs(unionType->doc, unionType, BAD_CAST(ns));
                        if (nsptr != NULL) {
                                sdlTypePtr newType, *tmp;
 
@@ -511,9 +511,9 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
                                memset(newType, 0, sizeof(sdlType));
 
                                newType->name = estrdup(type);
-                               newType->namens = estrdup(nsptr->href);
+                               newType->namens = estrdup((char*)nsptr->href);
 
-                               newType->encode = get_create_encoder(sdl, newType, (char *)nsptr->href, type);
+                               newType->encode = get_create_encoder(sdl, newType, nsptr->href, BAD_CAST(type));
 
                                if (cur_type->elements == NULL) {
                                        cur_type->elements = emalloc(sizeof(HashTable));
@@ -542,7 +542,7 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
                        memset(newType, 0, sizeof(sdlType));
 
                        newType->name = estrdup("anonymous");
-                       newType->namens = estrdup(tns->children->content);
+                       newType->namens = estrdup((char*)tns->children->content);
 
                        if (cur_type->elements == NULL) {
                                cur_type->elements = emalloc(sizeof(HashTable));
@@ -626,9 +626,9 @@ static int schema_restriction_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodeP
                xmlNsPtr nsptr;
 
                parse_namespace(base->children->content, &type, &ns);
-               nsptr = xmlSearchNs(restType->doc, restType, ns);
+               nsptr = xmlSearchNs(restType->doc, restType, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       cur_type->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, type);
+                       cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type));
                }
                if (type) {efree(type);}
                if (ns) {efree(ns);}
@@ -729,9 +729,9 @@ static int schema_restriction_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNode
                xmlNsPtr nsptr;
 
                parse_namespace(base->children->content, &type, &ns);
-               nsptr = xmlSearchNs(restType->doc, restType, ns);
+               nsptr = xmlSearchNs(restType->doc, restType, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       cur_type->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, type);
+                       cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type));
                }
                if (type) {efree(type);}
                if (ns) {efree(ns);}
@@ -792,8 +792,8 @@ static int schema_restriction_var_int(xmlNodePtr val, sdlRestrictionIntPtr *valp
        fixed = get_attribute(val->properties, "fixed");
        (*valptr)->fixed = FALSE;
        if (fixed != NULL) {
-               if (!strncmp(fixed->children->content, "true", sizeof("true")) ||
-                       !strncmp(fixed->children->content, "1", sizeof("1")))
+               if (!strncmp((char*)fixed->children->content, "true", sizeof("true")) ||
+                       !strncmp((char*)fixed->children->content, "1", sizeof("1")))
                        (*valptr)->fixed = TRUE;
        }
 
@@ -802,7 +802,7 @@ static int schema_restriction_var_int(xmlNodePtr val, sdlRestrictionIntPtr *valp
                soap_error0(E_ERROR, "Parsing Schema: missing restriction value");
        }
 
-       (*valptr)->value = atoi(value->children->content);
+       (*valptr)->value = atoi((char*)value->children->content);
 
        return TRUE;
 }
@@ -819,8 +819,8 @@ static int schema_restriction_var_char(xmlNodePtr val, sdlRestrictionCharPtr *va
        fixed = get_attribute(val->properties, "fixed");
        (*valptr)->fixed = FALSE;
        if (fixed != NULL) {
-               if (!strncmp(fixed->children->content, "true", sizeof("true")) ||
-                   !strncmp(fixed->children->content, "1", sizeof("1"))) {
+               if (!strncmp((char*)fixed->children->content, "true", sizeof("true")) ||
+                   !strncmp((char*)fixed->children->content, "1", sizeof("1"))) {
                        (*valptr)->fixed = TRUE;
                }
        }
@@ -830,7 +830,7 @@ static int schema_restriction_var_char(xmlNodePtr val, sdlRestrictionCharPtr *va
                soap_error0(E_ERROR, "Parsing Schema: missing restriction value");
        }
 
-       (*valptr)->value = estrdup(value->children->content);
+       (*valptr)->value = estrdup((char*)value->children->content);
        return TRUE;
 }
 
@@ -854,9 +854,9 @@ static int schema_extension_simpleContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr
                xmlNsPtr nsptr;
 
                parse_namespace(base->children->content, &type, &ns);
-               nsptr = xmlSearchNs(extType->doc, extType, ns);
+               nsptr = xmlSearchNs(extType->doc, extType, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       cur_type->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, type);
+                       cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type));
                }
                if (type) {efree(type);}
                if (ns) {efree(ns);}
@@ -909,9 +909,9 @@ static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePt
                xmlNsPtr nsptr;
 
                parse_namespace(base->children->content, &type, &ns);
-               nsptr = xmlSearchNs(extType->doc, extType, ns);
+               nsptr = xmlSearchNs(extType->doc, extType, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       cur_type->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, type);
+                       cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(type));
                }
                if (type) {efree(type);}
                if (ns) {efree(ns);}
@@ -959,6 +959,28 @@ static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePt
        return TRUE;
 }
 
+void schema_min_max(xmlNodePtr node, sdlContentModelPtr model)
+{
+       xmlAttrPtr attr = get_attribute(node->properties, "minOccurs");
+
+       if (attr) {
+               model->min_occurs = atoi((char*)attr->children->content);
+       } else {
+               model->min_occurs = 1;
+       }
+
+       attr = get_attribute(node->properties, "maxOccurs");
+       if (attr) {
+               if (!strncmp((char*)attr->children->content, "unbounded", sizeof("unbounded"))) {
+                       model->max_occurs = -1;
+               } else {
+                       model->max_occurs = atoi((char*)attr->children->content);
+               }
+       } else {
+               model->max_occurs = 1;
+       }
+}
+
 /*
 <all
   id = ID
@@ -971,7 +993,6 @@ static int schema_extension_complexContent(sdlPtr sdl, xmlAttrPtr tns, xmlNodePt
 static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur_type, sdlContentModelPtr model)
 {
        xmlNodePtr trav;
-       xmlAttrPtr attr;
        sdlContentModelPtr newModel;
 
        newModel = emalloc(sizeof(sdlContentModel));
@@ -984,22 +1005,7 @@ static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur
                zend_hash_next_index_insert(model->u.content,&newModel,sizeof(sdlContentModelPtr), NULL);
        }
 
-       newModel->min_occurs = 1;
-       newModel->max_occurs = 1;
-
-       attr = get_attribute(all->properties, "minOccurs");
-       if (attr) {
-               newModel->min_occurs = atoi(attr->children->content);
-       }
-
-       attr = get_attribute(all->properties, "maxOccurs");
-       if (attr) {
-               if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                       newModel->max_occurs = -1;
-               } else {
-                       newModel->max_occurs = atoi(attr->children->content);
-               }
-       }
+       schema_min_max(all, newModel);
 
        trav = all->children;
        if (trav != NULL && node_is_equal(trav,"annotation")) {
@@ -1031,7 +1037,6 @@ static int schema_all(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr all, sdlTypePtr cur
 static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTypePtr cur_type, sdlContentModelPtr model)
 {
        xmlNodePtr trav;
-       xmlAttrPtr attr;
        xmlAttrPtr ns, name, ref = NULL;
        sdlContentModelPtr newModel;
 
@@ -1053,9 +1058,9 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp
                        xmlNsPtr nsptr;
 
                        parse_namespace(ref->children->content, &type, &ns);
-                       nsptr = xmlSearchNs(groupType->doc, groupType, ns);
+                       nsptr = xmlSearchNs(groupType->doc, groupType, BAD_CAST(ns));
                        if (nsptr != NULL) {
-                               smart_str_appends(&key, nsptr->href);
+                               smart_str_appends(&key, (char*)nsptr->href);
                                smart_str_appendc(&key, ':');
                        }
                        smart_str_appends(&key, type);
@@ -1073,9 +1078,9 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp
                        newModel->u.content = emalloc(sizeof(HashTable));
                        zend_hash_init(newModel->u.content, 0, NULL, delete_model, 0);
 
-                       smart_str_appends(&key, ns->children->content);
+                       smart_str_appends(&key, (char*)ns->children->content);
                        smart_str_appendc(&key, ':');
-                       smart_str_appends(&key, name->children->content);
+                       smart_str_appends(&key, (char*)name->children->content);
                        smart_str_0(&key);
                }
 
@@ -1106,22 +1111,7 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp
                soap_error0(E_ERROR, "Parsing Schema: group has no 'name' nor 'ref' attributes");
        }
 
-       newModel->min_occurs = 1;
-       newModel->max_occurs = 1;
-
-       attr = get_attribute(groupType->properties, "minOccurs");
-       if (attr) {
-               newModel->min_occurs = atoi(attr->children->content);
-       }
-
-       attr = get_attribute(groupType->properties, "maxOccurs");
-       if (attr) {
-               if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                       newModel->max_occurs = -1;
-               } else {
-                       newModel->max_occurs = atoi(attr->children->content);
-               }
-       }
+       schema_min_max(groupType, newModel);
 
        trav = groupType->children;
        if (trav != NULL && node_is_equal(trav,"annotation")) {
@@ -1171,7 +1161,6 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp
 static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlTypePtr cur_type, sdlContentModelPtr model)
 {
        xmlNodePtr trav;
-       xmlAttrPtr attr;
        sdlContentModelPtr newModel;
 
        newModel = emalloc(sizeof(sdlContentModel));
@@ -1184,22 +1173,7 @@ static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlT
                zend_hash_next_index_insert(model->u.content,&newModel,sizeof(sdlContentModelPtr), NULL);
        }
 
-       newModel->min_occurs = 1;
-       newModel->max_occurs = 1;
-
-       attr = get_attribute(choiceType->properties, "minOccurs");
-       if (attr) {
-               newModel->min_occurs = atoi(attr->children->content);
-       }
-
-       attr = get_attribute(choiceType->properties, "maxOccurs");
-       if (attr) {
-               if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                       newModel->max_occurs = -1;
-               } else {
-                       newModel->max_occurs = atoi(attr->children->content);
-               }
-       }
+       schema_min_max(choiceType, newModel);
 
        trav = choiceType->children;
        if (trav != NULL && node_is_equal(trav,"annotation")) {
@@ -1237,7 +1211,6 @@ static int schema_choice(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr choiceType, sdlT
 static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTypePtr cur_type, sdlContentModelPtr model)
 {
        xmlNodePtr trav;
-       xmlAttrPtr attr;
        sdlContentModelPtr newModel;
 
        newModel = emalloc(sizeof(sdlContentModel));
@@ -1250,22 +1223,7 @@ static int schema_sequence(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr seqType, sdlTy
                zend_hash_next_index_insert(model->u.content,&newModel,sizeof(sdlContentModelPtr), NULL);
        }
 
-       newModel->min_occurs = 1;
-       newModel->max_occurs = 1;
-
-       attr = get_attribute(seqType->properties, "minOccurs");
-       if (attr) {
-               newModel->min_occurs = atoi(attr->children->content);
-       }
-
-       attr = get_attribute(seqType->properties, "maxOccurs");
-       if (attr) {
-               if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                       newModel->max_occurs = -1;
-               } else {
-                       newModel->max_occurs = atoi(attr->children->content);
-               }
-       }
+       schema_min_max(seqType, newModel);
 
        trav = seqType->children;
        if (trav != NULL && node_is_equal(trav,"annotation")) {
@@ -1306,26 +1264,11 @@ static int schema_any(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr anyType, sdlTypePtr
 {
        if (model != NULL) {
                sdlContentModelPtr newModel;
-               xmlAttrPtr attr;
 
                newModel = emalloc(sizeof(sdlContentModel));
                newModel->kind = XSD_CONTENT_ANY;
-               newModel->min_occurs = 1;
-               newModel->max_occurs = 1;
 
-               attr = get_attribute(anyType->properties, "minOccurs");
-               if (attr) {
-                       newModel->min_occurs = atoi(attr->children->content);
-               }
-
-               attr = get_attribute(anyType->properties, "maxOccurs");
-               if (attr) {
-                       if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                               newModel->max_occurs = -1;
-                       } else {
-                               newModel->max_occurs = atoi(attr->children->content);
-                       }
-               }
+               schema_min_max(anyType, newModel);
 
                zend_hash_next_index_insert(model->u.content, &newModel, sizeof(sdlContentModelPtr), NULL);
        }
@@ -1403,8 +1346,8 @@ static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, s
                memset(newType, 0, sizeof(sdlType));
                newType->kind = XSD_TYPEKIND_COMPLEX;
                if (name != NULL) {
-                       newType->name = estrdup(name->children->content);
-                       newType->namens = estrdup(ns->children->content);
+                       newType->name = estrdup((char*)name->children->content);
+                       newType->namens = estrdup((char*)ns->children->content);
                } else {
                        newType->name = estrdup(cur_type->name);
                        newType->namens = estrdup(cur_type->namens);
@@ -1433,8 +1376,8 @@ static int schema_complexType(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr compType, s
                newType = emalloc(sizeof(sdlType));
                memset(newType, 0, sizeof(sdlType));
                newType->kind = XSD_TYPEKIND_COMPLEX;
-               newType->name = estrdup(name->children->content);
-               newType->namens = estrdup(ns->children->content);
+               newType->name = estrdup((char*)name->children->content);
+               newType->namens = estrdup((char*)ns->children->content);
 
                zend_hash_next_index_insert(sdl->types,  &newType, sizeof(sdlTypePtr), (void **)&ptr);
 
@@ -1542,11 +1485,11 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                        xmlNsPtr nsptr;
 
                        parse_namespace(ref->children->content, &type, &ns);
-                       nsptr = xmlSearchNs(element->doc, element, ns);
+                       nsptr = xmlSearchNs(element->doc, element, BAD_CAST(ns));
                        if (nsptr != NULL) {
-                               smart_str_appends(&nscat, nsptr->href);
+                               smart_str_appends(&nscat, (char*)nsptr->href);
                                smart_str_appendc(&nscat, ':');
-                               newType->namens = estrdup(nsptr->href);
+                               newType->namens = estrdup((char*)nsptr->href);
                        }
                        smart_str_appends(&nscat, type);
                        newType->name = estrdup(type);
@@ -1556,8 +1499,8 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                        newType->ref = estrdup(nscat.c);
                        smart_str_free(&nscat);
                } else {
-                       newType->name = estrdup(name->children->content);
-                       newType->namens = estrdup(ns->children->content);
+                       newType->name = estrdup((char*)name->children->content);
+                       newType->namens = estrdup((char*)ns->children->content);
                }
 
                newType->nillable = FALSE;
@@ -1595,22 +1538,9 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
 
                        newModel->kind = XSD_CONTENT_ELEMENT;
                        newModel->u.element = newType;
-                       newModel->min_occurs = 1;
-                       newModel->max_occurs = 1;
 
-                       attr = get_attribute(attrs, "maxOccurs");
-                       if (attr) {
-                               if (!strncmp(attr->children->content, "unbounded", sizeof("unbounded"))) {
-                                       newModel->max_occurs = -1;
-                               } else {
-                                       newModel->max_occurs = atoi(attr->children->content);
-                               }
-                       }
+                       schema_min_max(element, newModel);
 
-                       attr = get_attribute(attrs, "minOccurs");
-                       if (attr) {
-                               newModel->min_occurs = atoi(attr->children->content);
-                       }
 
                        zend_hash_next_index_insert(model->u.content, &newModel, sizeof(sdlContentModelPtr), NULL);
                }
@@ -1626,8 +1556,8 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                if (ref != NULL) {
                        soap_error0(E_ERROR, "Parsing Schema: element has both 'ref' and 'nillable' attributes");
                }
-               if (!stricmp(attr->children->content, "true") ||
-                       !stricmp(attr->children->content, "1")) {
+               if (!stricmp((char*)attr->children->content, "true") ||
+                       !stricmp((char*)attr->children->content, "1")) {
                        cur_type->nillable = TRUE;
                } else {
                        cur_type->nillable = FALSE;
@@ -1641,7 +1571,7 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                if (ref != NULL) {
                        soap_error0(E_ERROR, "Parsing Schema: element has both 'ref' and 'fixed' attributes");
                }
-               cur_type->fixed = estrdup(attr->children->content);
+               cur_type->fixed = estrdup((char*)attr->children->content);
        }
 
        attr = get_attribute(attrs, "default");
@@ -1651,15 +1581,15 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                } else if (ref != NULL) {
                        soap_error0(E_ERROR, "Parsing Schema: element has both 'default' and 'fixed' attributes");
                }
-               cur_type->def = estrdup(attr->children->content);
+               cur_type->def = estrdup((char*)attr->children->content);
        }
 
        /* form */
        attr = get_attribute(attrs, "form");
        if (attr) {
-               if (strncmp(attr->children->content,"qualified",sizeof("qualified")) == 0) {
+               if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) {
                  cur_type->form = XSD_FORM_QUALIFIED;
-               } else if (strncmp(attr->children->content,"unqualified",sizeof("unqualified")) == 0) {
+               } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) {
                  cur_type->form = XSD_FORM_UNQUALIFIED;
                } else {
                  cur_type->form = XSD_FORM_DEFAULT;
@@ -1673,7 +1603,7 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                        if (node_is_equal_ex(parent, "schema", SCHEMA_NAMESPACE)) {
                                xmlAttrPtr def;
                                def = get_attribute(parent->properties, "elementFormDefault");
-                               if(def == NULL || strncmp(def->children->content, "qualified", sizeof("qualified"))) {
+                               if(def == NULL || strncmp((char*)def->children->content, "qualified", sizeof("qualified"))) {
                                        cur_type->form = XSD_FORM_UNQUALIFIED;
                                } else {
                                        cur_type->form = XSD_FORM_QUALIFIED;
@@ -1697,9 +1627,9 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp
                        soap_error0(E_ERROR, "Parsing Schema: element has both 'ref' and 'type' attributes");
                }
                parse_namespace(type->children->content, &cptype, &str_ns);
-               nsptr = xmlSearchNs(element->doc, element, str_ns);
+               nsptr = xmlSearchNs(element->doc, element, BAD_CAST(str_ns));
                if (nsptr != NULL) {
-                       cur_type->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, (char *)cptype);
+                       cur_type->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype));
                }
                if (str_ns) {efree(str_ns);}
                if (cptype) {efree(cptype);}
@@ -1781,11 +1711,11 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                        xmlNsPtr nsptr;
 
                        parse_namespace(ref->children->content, &attr_name, &ns);
-                       nsptr = xmlSearchNs(attrType->doc, attrType, ns);
+                       nsptr = xmlSearchNs(attrType->doc, attrType, BAD_CAST(ns));
                        if (nsptr != NULL) {
-                               smart_str_appends(&key, nsptr->href);
+                               smart_str_appends(&key, (char*)nsptr->href);
                                smart_str_appendc(&key, ':');
-                               newAttr->namens = estrdup(nsptr->href);
+                               newAttr->namens = estrdup((char*)nsptr->href);
                        }
                        smart_str_appends(&key, attr_name);
                        smart_str_0(&key);
@@ -1800,11 +1730,11 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                                ns = tns;
                        }
                        if (ns != NULL) {
-                               smart_str_appends(&key, ns->children->content);
+                               smart_str_appends(&key, (char*)ns->children->content);
                                smart_str_appendc(&key, ':');
-                               newAttr->namens = estrdup(ns->children->content);
+                               newAttr->namens = estrdup((char*)ns->children->content);
                        }
-                       smart_str_appends(&key, name->children->content);
+                       smart_str_appends(&key, (char*)name->children->content);
                        smart_str_0(&key);
                }
 
@@ -1836,9 +1766,9 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                        soap_error0(E_ERROR, "Parsing Schema: attribute has both 'ref' and 'type' attributes");
                }
                parse_namespace(type->children->content, &cptype, &str_ns);
-               nsptr = xmlSearchNs(attrType->doc, attrType, str_ns);
+               nsptr = xmlSearchNs(attrType->doc, attrType, BAD_CAST(str_ns));
                if (nsptr != NULL) {
-                       newAttr->encode = get_create_encoder(sdl, cur_type, (char *)nsptr->href, (char *)cptype);
+                       newAttr->encode = get_create_encoder(sdl, cur_type, nsptr->href, BAD_CAST(cptype));
                }
                if (str_ns) {efree(str_ns);}
                if (cptype) {efree(cptype);}
@@ -1847,13 +1777,13 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
        attr = attrType->properties;
        while (attr != NULL) {
                if (attr_is_equal_ex(attr, "default", SCHEMA_NAMESPACE)) {
-                       newAttr->def = estrdup(attr->children->content);
+                       newAttr->def = estrdup((char*)attr->children->content);
                } else if (attr_is_equal_ex(attr, "fixed", SCHEMA_NAMESPACE)) {
-                       newAttr->fixed = estrdup(attr->children->content);
+                       newAttr->fixed = estrdup((char*)attr->children->content);
                } else if (attr_is_equal_ex(attr, "form", SCHEMA_NAMESPACE)) {
-                       if (strncmp(attr->children->content,"qualified",sizeof("qualified")) == 0) {
+                       if (strncmp((char*)attr->children->content, "qualified", sizeof("qualified")) == 0) {
                          newAttr->form = XSD_FORM_QUALIFIED;
-                       } else if (strncmp(attr->children->content,"unqualified",sizeof("unqualified")) == 0) {
+                       } else if (strncmp((char*)attr->children->content, "unqualified", sizeof("unqualified")) == 0) {
                          newAttr->form = XSD_FORM_UNQUALIFIED;
                        } else {
                          newAttr->form = XSD_FORM_DEFAULT;
@@ -1861,17 +1791,17 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                } else if (attr_is_equal_ex(attr, "id", SCHEMA_NAMESPACE)) {
                        /* skip */
                } else if (attr_is_equal_ex(attr, "name", SCHEMA_NAMESPACE)) {
-                       newAttr->name = estrdup(attr->children->content);
+                       newAttr->name = estrdup((char*)attr->children->content);
                } else if (attr_is_equal_ex(attr, "ref", SCHEMA_NAMESPACE)) {
                        /* already processed */
                } else if (attr_is_equal_ex(attr, "type", SCHEMA_NAMESPACE)) {
                        /* already processed */
                } else if (attr_is_equal_ex(attr, "use", SCHEMA_NAMESPACE)) {
-                       if (strncmp(attr->children->content,"prohibited",sizeof("prohibited")) == 0) {
+                       if (strncmp((char*)attr->children->content, "prohibited", sizeof("prohibited")) == 0) {
                          newAttr->use = XSD_USE_PROHIBITED;
-                       } else if (strncmp(attr->children->content,"required",sizeof("required")) == 0) {
+                       } else if (strncmp((char*)attr->children->content, "required", sizeof("required")) == 0) {
                          newAttr->use = XSD_USE_REQUIRED;
-                       } else if (strncmp(attr->children->content,"optional",sizeof("optional")) == 0) {
+                       } else if (strncmp((char*)attr->children->content, "optional", sizeof("optional")) == 0) {
                          newAttr->use = XSD_USE_OPTIONAL;
                        } else {
                          newAttr->use = XSD_USE_DEFAULT;
@@ -1879,7 +1809,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                } else {
                        xmlNsPtr nsPtr = attr_find_ns(attr);
 
-                       if (strncmp(nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
+                       if (strncmp((char*)nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
                                smart_str key2 = {0};
                                sdlExtraAttributePtr ext;
                                xmlNsPtr nsptr;
@@ -1888,12 +1818,12 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                                ext = emalloc(sizeof(sdlExtraAttribute));
                                memset(ext, 0, sizeof(sdlExtraAttribute));
                                parse_namespace(attr->children->content, &value, &ns);
-                               nsptr = xmlSearchNs(attr->doc, attr->parent, ns);
+                               nsptr = xmlSearchNs(attr->doc, attr->parent, BAD_CAST(ns));
                                if (nsptr) {
-                                       ext->ns = estrdup(nsptr->href);
+                                       ext->ns = estrdup((char*)nsptr->href);
                                        ext->val = estrdup(value);
                                } else {
-                                       ext->val = estrdup(attr->children->content);
+                                       ext->val = estrdup((char*)attr->children->content);
                                }
                                if (ns) {efree(ns);}
                                efree(value);
@@ -1903,9 +1833,9 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                                        zend_hash_init(newAttr->extraAttributes, 0, NULL, delete_extra_attribute, 0);
                                }
 
-                               smart_str_appends(&key2, nsPtr->href);
+                               smart_str_appends(&key2, (char*)nsPtr->href);
                                smart_str_appendc(&key2, ':');
-                               smart_str_appends(&key2, attr->name);
+                               smart_str_appends(&key2, (char*)attr->name);
                                smart_str_0(&key2);
                                zend_hash_add(newAttr->extraAttributes, key2.c, key2.len + 1, &ext, sizeof(sdlExtraAttributePtr), NULL);
                                smart_str_free(&key2);
@@ -1919,7 +1849,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                        if (node_is_equal_ex(parent, "schema", SCHEMA_NAMESPACE)) {
                                xmlAttrPtr def;
                                def = get_attribute(parent->properties, "attributeFormDefault");
-                               if(def == NULL || strncmp(def->children->content, "qualified", sizeof("qualified"))) {
+                               if(def == NULL || strncmp((char*)def->children->content, "qualified", sizeof("qualified"))) {
                                        newAttr->form = XSD_FORM_UNQUALIFIED;
                                } else {
                                        newAttr->form = XSD_FORM_QUALIFIED;
@@ -1948,7 +1878,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
                        dummy_type = emalloc(sizeof(sdlType));
                        memset(dummy_type, 0, sizeof(sdlType));
                        dummy_type->name = estrdup("anonymous");
-                       dummy_type->namens = estrdup(tns->children->content);
+                       dummy_type->namens = estrdup((char*)tns->children->content);
                        schema_simpleType(sdl, tns, trav, dummy_type);
                        newAttr->encode = dummy_type->encode;
                        delete_type(&dummy_type);
@@ -1983,8 +1913,8 @@ static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGrou
                        }
                        newType = emalloc(sizeof(sdlType));
                        memset(newType, 0, sizeof(sdlType));
-                       newType->name = estrdup(name->children->content);
-                       newType->namens = estrdup(ns->children->content);
+                       newType->name = estrdup((char*)name->children->content);
+                       newType->namens = estrdup((char*)ns->children->content);
 
                        smart_str_appends(&key, newType->namens);
                        smart_str_appendc(&key, ':');
@@ -2010,9 +1940,9 @@ static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGrou
                        memset(newAttr, 0, sizeof(sdlAttribute));
 
                        parse_namespace(ref->children->content, &group_name, &ns);
-                       nsptr = xmlSearchNs(attrGroup->doc, attrGroup, ns);
+                       nsptr = xmlSearchNs(attrGroup->doc, attrGroup, BAD_CAST(ns));
                        if (nsptr != NULL) {
-                               smart_str_appends(&key, nsptr->href);
+                               smart_str_appends(&key, (char*)nsptr->href);
                                smart_str_appendc(&key, ':');
                        }
                        smart_str_appends(&key, group_name);
index 5acb1145a2ff95df05ce0c31305a06233ec171a5..29ada5f054b4a99587ba553d493f8284791ba425 100644 (file)
@@ -46,28 +46,28 @@ static void delete_header(void *header);
 static void delete_header_persistent(void *header);
 static void delete_document(void *doc_ptr);
 
-encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr node, const char *type)
+encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr node, const xmlChar *type)
 {
        encodePtr enc = NULL;
        xmlNsPtr nsptr;
        char *ns, *cptype;
 
        parse_namespace(type, &cptype, &ns);
-       nsptr = xmlSearchNs(node->doc, node, ns);
+       nsptr = xmlSearchNs(node->doc, node, BAD_CAST(ns));
        if (nsptr != NULL) {
-               enc = get_encoder(sdl, nsptr->href, cptype);
+               enc = get_encoder(sdl, (char*)nsptr->href, cptype);
                if (enc == NULL) {
                        enc = get_encoder_ex(sdl, cptype, strlen(cptype));
                }
        } else {
-               enc = get_encoder_ex(sdl, type, strlen(type));
+               enc = get_encoder_ex(sdl, (char*)type, xmlStrlen(type));
        }
        efree(cptype);
        if (ns) {efree(ns);}
        return enc;
 }
 
-static sdlTypePtr get_element(sdlPtr sdl, xmlNodePtr node, const char *type)
+static sdlTypePtr get_element(sdlPtr sdl, xmlNodePtr node, const xmlChar *type)
 {
        sdlTypePtr ret = NULL;
 
@@ -77,9 +77,9 @@ static sdlTypePtr get_element(sdlPtr sdl, xmlNodePtr node, const char *type)
                sdlTypePtr *sdl_type;
 
                parse_namespace(type, &cptype, &ns);
-               nsptr = xmlSearchNs(node->doc, node, ns);
+               nsptr = xmlSearchNs(node->doc, node, BAD_CAST(ns));
                if (nsptr != NULL) {
-                       int ns_len = strlen(nsptr->href);
+                       int ns_len = xmlStrlen(nsptr->href);
                        int type_len = strlen(cptype);
                        int len = ns_len + type_len + 1;
                        char *nscat = emalloc(len + 1);
@@ -96,7 +96,7 @@ static sdlTypePtr get_element(sdlPtr sdl, xmlNodePtr node, const char *type)
                        }
                        efree(nscat);
                } else {
-                       if (zend_hash_find(sdl->elements, (char*)type, strlen(type) + 1, (void **)&sdl_type) == SUCCESS) {
+                       if (zend_hash_find(sdl->elements, (char*)type, xmlStrlen(type) + 1, (void **)&sdl_type) == SUCCESS) {
                                ret = *sdl_type;
                        }
                }
@@ -213,12 +213,12 @@ sdlBindingPtr get_binding_from_name(sdlPtr sdl, char *name, char *ns)
 
 static int is_wsdl_element(xmlNodePtr node)
 {
-       if (node->ns && strcmp(node->ns->href,WSDL_NAMESPACE) != 0) {
+       if (node->ns && strcmp((char*)node->ns->href, WSDL_NAMESPACE) != 0) {
                xmlAttrPtr attr;
                if ((attr = get_attribute_ex(node->properties, "required", WSDL_NAMESPACE)) != NULL &&
                     attr->children && attr->children->content &&
-                    (strcmp(attr->children->content,"1") == 0 ||
-                     strcmp(attr->children->content,"true") == 0)) {
+                    (strcmp((char*)attr->children->content, "1") == 0 ||
+                     strcmp((char*)attr->children->content, "true") == 0)) {
                        soap_error1(E_ERROR, "Parsing WSDL: Unknown required WSDL extension '%s'", node->ns->href);
                }
                return 0;
@@ -261,7 +261,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
        if (!include) {
                targetNamespace = get_attribute(definitions->properties, "targetNamespace");
                if (targetNamespace) {
-                       tmpsdl->target_ns = estrdup(targetNamespace->children->content);
+                       tmpsdl->target_ns = estrdup((char*)targetNamespace->children->content);
                }
        }
 
@@ -296,14 +296,14 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
                                        uri = xmlBuildURI(tmp->children->content, base);
                                        xmlFree(base);
                                }
-                               load_wsdl_ex(this_ptr, uri, ctx, 1 TSRMLS_CC);
+                               load_wsdl_ex(this_ptr, (char*)uri, ctx, 1 TSRMLS_CC);
                                xmlFree(uri);
                        }
 
                } else if (node_is_equal(trav,"message")) {
                        xmlAttrPtr name = get_attribute(trav->properties, "name");
                        if (name && name->children && name->children->content) {
-                               if (zend_hash_add(&ctx->messages, name->children->content, strlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
+                               if (zend_hash_add(&ctx->messages, (char*)name->children->content, xmlStrlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
                                        soap_error1(E_ERROR, "Parsing WSDL: <message> '%s' already defined", name->children->content);
                                }
                        } else {
@@ -313,7 +313,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
                } else if (node_is_equal(trav,"portType")) {
                        xmlAttrPtr name = get_attribute(trav->properties, "name");
                        if (name && name->children && name->children->content) {
-                               if (zend_hash_add(&ctx->portTypes, name->children->content, strlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
+                               if (zend_hash_add(&ctx->portTypes, (char*)name->children->content, xmlStrlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
                                        soap_error1(E_ERROR, "Parsing WSDL: <portType> '%s' already defined", name->children->content);
                                }
                        } else {
@@ -323,7 +323,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
                } else if (node_is_equal(trav,"binding")) {
                        xmlAttrPtr name = get_attribute(trav->properties, "name");
                        if (name && name->children && name->children->content) {
-                               if (zend_hash_add(&ctx->bindings, name->children->content, strlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
+                               if (zend_hash_add(&ctx->bindings, (char*)name->children->content, xmlStrlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
                                        soap_error1(E_ERROR, "Parsing WSDL: <binding> '%s' already defined", name->children->content);
                                }
                        } else {
@@ -333,7 +333,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
                } else if (node_is_equal(trav,"service")) {
                        xmlAttrPtr name = get_attribute(trav->properties, "name");
                        if (name && name->children && name->children->content) {
-                               if (zend_hash_add(&ctx->services, name->children->content, strlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
+                               if (zend_hash_add(&ctx->services, (char*)name->children->content, xmlStrlen(name->children->content)+1,&trav, sizeof(xmlNodePtr), NULL) != SUCCESS) {
                                        soap_error1(E_ERROR, "Parsing WSDL: <service> '%s' already defined", name->children->content);
                                }
                        } else {
@@ -358,9 +358,9 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
                soap_error0(E_ERROR, "Parsing WSDL: Missing message attribute for <header>");
        }
 
-       ctype = strrchr(tmp->children->content,':');
+       ctype = strrchr((char*)tmp->children->content,':');
        if (ctype == NULL) {
-               ctype = tmp->children->content;
+               ctype = (char*)tmp->children->content;
        } else {
                ++ctype;
        }
@@ -372,17 +372,17 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
        if (!tmp) {
                soap_error0(E_ERROR, "Parsing WSDL: Missing part attribute for <header>");
        }
-       part = get_node_with_attribute_ex((*message)->children, "part", WSDL_NAMESPACE, "name", tmp->children->content, NULL);
+       part = get_node_with_attribute_ex((*message)->children, "part", WSDL_NAMESPACE, "name", (char*)tmp->children->content, NULL);
        if (!part) {
                soap_error1(E_ERROR, "Parsing WSDL: Missing part '%s' in <message>", tmp->children->content);
        }
 
        h = emalloc(sizeof(sdlSoapBindingFunctionHeader));
        memset(h, 0, sizeof(sdlSoapBindingFunctionHeader));
-       h->name = estrdup(tmp->children->content);
+       h->name = estrdup((char*)tmp->children->content);
 
        tmp = get_attribute(header->properties, "use");
-       if (tmp && !strncmp(tmp->children->content, "encoded", sizeof("encoded"))) {
+       if (tmp && !strncmp((char*)tmp->children->content, "encoded", sizeof("encoded"))) {
                h->use = SOAP_ENCODED;
        } else {
                h->use = SOAP_LITERAL;
@@ -390,15 +390,15 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
 
        tmp = get_attribute(header->properties, "namespace");
        if (tmp) {
-               h->ns = estrdup(tmp->children->content);
+               h->ns = estrdup((char*)tmp->children->content);
        }
 
        if (h->use == SOAP_ENCODED) {
                tmp = get_attribute(header->properties, "encodingStyle");
                if (tmp) {
-                       if (strncmp(tmp->children->content,SOAP_1_1_ENC_NAMESPACE,sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
+                       if (strncmp((char*)tmp->children->content, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
                                h->encodingStyle = SOAP_ENCODING_1_1;
-                       } else if (strncmp(tmp->children->content,SOAP_1_2_ENC_NAMESPACE,sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
+                       } else if (strncmp((char*)tmp->children->content, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
                                h->encodingStyle = SOAP_ENCODING_1_2;
                        } else {
                                soap_error1(E_ERROR, "Parsing WSDL: Unknown encodingStyle '%s'", tmp->children->content);
@@ -469,7 +469,7 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
                        body = trav;
 
                        tmp = get_attribute(body->properties, "use");
-                       if (tmp && !strncmp(tmp->children->content, "literal", sizeof("literal"))) {
+                       if (tmp && !strncmp((char*)tmp->children->content, "literal", sizeof("literal"))) {
                                binding->use = SOAP_LITERAL;
                        } else {
                                binding->use = SOAP_ENCODED;
@@ -477,13 +477,13 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
 
                        tmp = get_attribute(body->properties, "namespace");
                        if (tmp) {
-                               binding->ns = estrdup(tmp->children->content);
+                               binding->ns = estrdup((char*)tmp->children->content);
                        }
 
                        tmp = get_attribute(body->properties, "parts");
                        if (tmp) {
                                HashTable    ht;
-                               char *parts = tmp->children->content;
+                               char *parts = (char*)tmp->children->content;
 
                                /* Delete all parts those are not in the "parts" attribute */
                                zend_hash_init(&ht, 0, NULL, delete_parameter, 0);
@@ -524,9 +524,9 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
                        if (binding->use == SOAP_ENCODED) {
                                tmp = get_attribute(body->properties, "encodingStyle");
                                if (tmp) {
-                                       if (strncmp(tmp->children->content,SOAP_1_1_ENC_NAMESPACE,sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
+                                       if (strncmp((char*)tmp->children->content, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
                                                binding->encodingStyle = SOAP_ENCODING_1_1;
-                                       } else if (strncmp(tmp->children->content,SOAP_1_2_ENC_NAMESPACE,sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
+                                       } else if (strncmp((char*)tmp->children->content, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
                                                binding->encodingStyle = SOAP_ENCODING_1_2;
                                        } else {
                                                soap_error1(E_ERROR, "Parsing WSDL: Unknown encodingStyle '%s'", tmp->children->content);
@@ -561,15 +561,15 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
        }
 }
 
-static HashTable* wsdl_message(sdlCtx *ctx, char* message_name)
+static HashTable* wsdl_message(sdlCtx *ctx, xmlChar* message_name)
 {
        xmlNodePtr trav, part, message = NULL, *tmp;
        HashTable* parameters = NULL;
        char *ctype;
 
-       ctype = strrchr(message_name,':');
+       ctype = strrchr((char*)message_name,':');
        if (ctype == NULL) {
-               ctype = message_name;
+               ctype = (char*)message_name;
        } else {
                ++ctype;
        }
@@ -586,7 +586,7 @@ static HashTable* wsdl_message(sdlCtx *ctx, char* message_name)
                xmlAttrPtr element, type, name;
                sdlParamPtr param;
 
-               if (trav->ns != NULL && strcmp(trav->ns->href,WSDL_NAMESPACE) != 0) {
+               if (trav->ns != NULL && strcmp((char*)trav->ns->href, WSDL_NAMESPACE) != 0) {
                        soap_error1(E_ERROR, "Parsing WSDL: Unexpected extensibility element <%s>", trav->name);
                }
                if (node_is_equal(trav,"documentation")) {
@@ -606,7 +606,7 @@ static HashTable* wsdl_message(sdlCtx *ctx, char* message_name)
                        soap_error1(E_ERROR, "Parsing WSDL: No name associated with <part> '%s'", message->name);
                }
 
-               param->paramName = estrdup(name->children->content);
+               param->paramName = estrdup((char*)name->children->content);
 
                type = get_attribute(part->properties, "type");
                if (type != NULL) {
@@ -690,22 +690,22 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                trav2 = port->children;
                                while (trav2 != NULL) {
                                        if (node_is_equal(trav2,"address") && trav2->ns) {
-                                               if (!strncmp(trav2->ns->href, WSDL_SOAP11_NAMESPACE, sizeof(WSDL_SOAP11_NAMESPACE))) {
+                                               if (!strncmp((char*)trav2->ns->href, WSDL_SOAP11_NAMESPACE, sizeof(WSDL_SOAP11_NAMESPACE))) {
                                                        address = trav2;
                                                        wsdl_soap_namespace = WSDL_SOAP11_NAMESPACE;
                                                        tmpbinding->bindingType = BINDING_SOAP;
-                                               } else if (!strncmp(trav2->ns->href, WSDL_SOAP12_NAMESPACE, sizeof(WSDL_SOAP12_NAMESPACE))) {
+                                               } else if (!strncmp((char*)trav2->ns->href, WSDL_SOAP12_NAMESPACE, sizeof(WSDL_SOAP12_NAMESPACE))) {
                                                        address = trav2;
                                                        wsdl_soap_namespace = WSDL_SOAP12_NAMESPACE;
                                                        tmpbinding->bindingType = BINDING_SOAP;
-                                               } else if (!strncmp(trav2->ns->href, RPC_SOAP12_NAMESPACE, sizeof(RPC_SOAP12_NAMESPACE))) {
+                                               } else if (!strncmp((char*)trav2->ns->href, RPC_SOAP12_NAMESPACE, sizeof(RPC_SOAP12_NAMESPACE))) {
                                                        address = trav2;
                                                        wsdl_soap_namespace = RPC_SOAP12_NAMESPACE;
                                                        tmpbinding->bindingType = BINDING_SOAP;
-                                               } else if (!strncmp(trav2->ns->href, WSDL_HTTP11_NAMESPACE, sizeof(WSDL_HTTP11_NAMESPACE))) {
+                                               } else if (!strncmp((char*)trav2->ns->href, WSDL_HTTP11_NAMESPACE, sizeof(WSDL_HTTP11_NAMESPACE))) {
                                                        address = trav2;
                                                        tmpbinding->bindingType = BINDING_HTTP;
-                                               } else if (!strncmp(trav2->ns->href, WSDL_HTTP12_NAMESPACE, sizeof(WSDL_HTTP12_NAMESPACE))) {
+                                               } else if (!strncmp((char*)trav2->ns->href, WSDL_HTTP12_NAMESPACE, sizeof(WSDL_HTTP12_NAMESPACE))) {
                                                        address = trav2;
                                                        tmpbinding->bindingType = BINDING_HTTP;
                                                }
@@ -724,11 +724,11 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                        soap_error0(E_ERROR, "Parsing WSDL: No location associated with <port>");
                                }
 
-                               tmpbinding->location = estrdup(location->children->content);
+                               tmpbinding->location = estrdup((char*)location->children->content);
 
-                               ctype = strrchr(bindingAttr->children->content,':');
+                               ctype = strrchr((char*)bindingAttr->children->content,':');
                                if (ctype == NULL) {
-                                       ctype = bindingAttr->children->content;
+                                       ctype = (char*)bindingAttr->children->content;
                                } else {
                                        ++ctype;
                                }
@@ -749,13 +749,13 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                        soapBindingNode = get_node_ex(binding->children, "binding", wsdl_soap_namespace);
                                        if (soapBindingNode) {
                                                tmp = get_attribute(soapBindingNode->properties, "style");
-                                               if (tmp && !strncmp(tmp->children->content, "rpc", sizeof("rpc"))) {
+                                               if (tmp && !strncmp((char*)tmp->children->content, "rpc", sizeof("rpc"))) {
                                                        soapBinding->style = SOAP_RPC;
                                                }
 
                                                tmp = get_attribute(soapBindingNode->properties, "transport");
                                                if (tmp) {
-                                                       if (strncmp(tmp->children->content, WSDL_HTTP_TRANSPORT, sizeof(WSDL_HTTP_TRANSPORT)) == 0) {
+                                                       if (strncmp((char*)tmp->children->content, WSDL_HTTP_TRANSPORT, sizeof(WSDL_HTTP_TRANSPORT)) == 0) {
                                                                soapBinding->transport = SOAP_TRANSPORT_HTTP;
                                                        } else {
                                                                soap_error1(E_ERROR, "Parsing WSDL: PHP-SOAP doesn't support transport '%s'", tmp->children->content);
@@ -769,16 +769,16 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                if (name == NULL) {
                                        soap_error0(E_ERROR, "Parsing WSDL: Missing 'name' attribute for <binding>");
                                }
-                               tmpbinding->name = estrdup(name->children->content);
+                               tmpbinding->name = estrdup((char*)name->children->content);
 
                                type = get_attribute(binding->properties, "type");
                                if (type == NULL) {
                                        soap_error0(E_ERROR, "Parsing WSDL: Missing 'type' attribute for <binding>");
                                }
 
-                               ctype = strrchr(type->children->content,':');
+                               ctype = strrchr((char*)type->children->content,':');
                                if (ctype == NULL) {
-                                       ctype = type->children->content;
+                                       ctype = (char*)type->children->content;
                                } else {
                                        ++ctype;
                                }
@@ -825,14 +825,14 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                                trav3 = trav3->next;
                                        }
 
-                                       portTypeOperation = get_node_with_attribute_ex(portType->children, "operation", WSDL_NAMESPACE, "name", op_name->children->content, NULL);
+                                       portTypeOperation = get_node_with_attribute_ex(portType->children, "operation", WSDL_NAMESPACE, "name", (char*)op_name->children->content, NULL);
                                        if (portTypeOperation == NULL) {
                                                soap_error1(E_ERROR, "Parsing WSDL: Missing <portType>/<operation> with name '%s'", op_name->children->content);
                                        }
 
                                        function = emalloc(sizeof(sdlFunction));
                                        memset(function, 0, sizeof(sdlFunction));
-                                       function->functionName = estrdup(op_name->children->content);
+                                       function->functionName = estrdup((char*)op_name->children->content);
 
                                        if (tmpbinding->bindingType == BINDING_SOAP) {
                                                sdlSoapBindingFunctionPtr soapFunctionBinding;
@@ -849,12 +849,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                                if (soapOperation) {
                                                        tmp = get_attribute(soapOperation->properties, "soapAction");
                                                        if (tmp) {
-                                                               soapFunctionBinding->soapAction = estrdup(tmp->children->content);
+                                                               soapFunctionBinding->soapAction = estrdup((char*)tmp->children->content);
                                                        }
 
                                                        tmp = get_attribute(soapOperation->properties, "style");
                                                        if (tmp) {
-                                                               if (!strncmp(tmp->children->content, "rpc", sizeof("rpc"))) {
+                                                               if (!strncmp((char*)tmp->children->content, "rpc", sizeof("rpc"))) {
                                                                        soapFunctionBinding->style = SOAP_RPC;
                                                                } else {
                                                                        soapFunctionBinding->style = SOAP_DOCUMENT;
@@ -953,7 +953,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                                        f = emalloc(sizeof(sdlFault));
                                                        memset(f, 0, sizeof(sdlFault));
 
-                                                       f->name = estrdup(name->children->content);
+                                                       f->name = estrdup((char*)name->children->content);
                                                        f->details = wsdl_message(&ctx, message->children->content);
                                                        if (f->details == NULL || zend_hash_num_elements(f->details) > 1) {
                                                                soap_error1(E_ERROR, "Parsing WSDL: The fault message '%s' must have a single part", message->children->content);
@@ -972,7 +972,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
                                                                                        memset(f->bindingAttributes, 0, sizeof(sdlSoapBindingFunctionFault));
 
                                                                                        tmp = get_attribute(trav->properties, "use");
-                                                                                       if (tmp && !strncmp(tmp->children->content, "encoded", sizeof("encoded"))) {
+                                                                                       if (tmp && !strncmp((char*)tmp->children->content, "encoded", sizeof("encoded"))) {
                                                                                                binding->use = SOAP_ENCODED;
                                                                                        } else {
                                                                                                binding->use = SOAP_LITERAL;
@@ -980,15 +980,15 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
 
                                                                                        tmp = get_attribute(trav->properties, "namespace");
                                                                                        if (tmp) {
-                                                                                               binding->ns = estrdup(tmp->children->content);
+                                                                                               binding->ns = estrdup((char*)tmp->children->content);
                                                                                        }
 
                                                                                        if (binding->use == SOAP_ENCODED) {
                                                                                                tmp = get_attribute(trav->properties, "encodingStyle");
                                                                                                if (tmp) {
-                                                                                                       if (strncmp(tmp->children->content,SOAP_1_1_ENC_NAMESPACE,sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
+                                                                                                       if (strncmp((char*)tmp->children->content, SOAP_1_1_ENC_NAMESPACE, sizeof(SOAP_1_1_ENC_NAMESPACE)) == 0) {
                                                                                                                binding->encodingStyle = SOAP_ENCODING_1_1;
-                                                                                                       } else if (strncmp(tmp->children->content,SOAP_1_2_ENC_NAMESPACE,sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
+                                                                                                       } else if (strncmp((char*)tmp->children->content, SOAP_1_2_ENC_NAMESPACE, sizeof(SOAP_1_2_ENC_NAMESPACE)) == 0) {
                                                                                                                binding->encodingStyle = SOAP_ENCODING_1_2;
                                                                                                        } else {
                                                                                                                soap_error1(E_ERROR, "Parsing WSDL: Unknown encodingStyle '%s'", tmp->children->content);
@@ -3116,7 +3116,7 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC)
 
                md5str[0] = '\0';
                PHP_MD5Init(&context);
-               PHP_MD5Update(&context, uri, uri_len);
+               PHP_MD5Update(&context, (unsigned char*)uri, uri_len);
                PHP_MD5Final(digest, &context);
                make_digest(md5str, digest);
                key = emalloc(len+sizeof("/wsdl-")-1+sizeof(md5str));
index 7ac46e86f301001d543ce8440b37ffbd6dd3fce3..57b1126d6c5d2f542a4db3fec341d1637ba71e6d 100644 (file)
@@ -254,7 +254,7 @@ struct _sdlAttribute {
 
 sdlPtr get_sdl(zval *this_ptr, char *uri, long cache_wsdl TSRMLS_DC);
 
-encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr data, const char *type);
+encodePtr get_encoder_from_prefix(sdlPtr sdl, xmlNodePtr data, const xmlChar *type);
 encodePtr get_encoder(sdlPtr sdl, const char *ns, const char *type);
 encodePtr get_encoder_ex(sdlPtr sdl, const char *nscat, int len);
 
index 760d02abcd4b26a1533552355316a15bfa8f7b8b..67dd13046736ccfd6545503ba5056059fc606f3c 100644 (file)
@@ -26,7 +26,7 @@
 /* Channel libxml file io layer through the PHP streams subsystem.
  * This allows use of ftps:// and https:// urls */
 
-static int is_blank(const char* str)
+static int is_blank(const xmlChar* str)
 {
        while (*str != '\0') {
                if (*str != ' '  && *str != 0x9 && *str != 0xa && *str != 0xd) {
@@ -101,7 +101,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
                if (ctxt->wellFormed) {
                        ret = ctxt->myDoc;
                        if (ret->URL == NULL && ctxt->directory != NULL) {
-                               ret->URL = xmlStrdup(ctxt->directory);
+                               ret->URL = xmlCharStrdup(ctxt->directory);
                        }
                } else {
                        ret = NULL;
@@ -142,7 +142,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
                if (ctxt->wellFormed) {
                        ret = ctxt->myDoc;
                        if (ret->URL == NULL && ctxt->directory != NULL) {
-                               ret->URL = xmlStrdup(ctxt->directory);
+                               ret->URL = xmlCharStrdup(ctxt->directory);
                        }
                } else {
                        ret = NULL;
@@ -214,11 +214,11 @@ xmlNsPtr node_find_ns(xmlNodePtr node)
 
 int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
 {
-       if (name == NULL || strcmp(node->name, name) == 0) {
+       if (name == NULL || strcmp((char*)node->name, name) == 0) {
                if (ns) {
                        xmlNsPtr nsPtr = attr_find_ns(node);
                        if (nsPtr) {
-                               return (strcmp(nsPtr->href, ns) == 0);
+                               return (strcmp((char*)nsPtr->href, ns) == 0);
                        } else {
                                return FALSE;
                        }
@@ -230,11 +230,11 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
 
 int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
 {
-       if (name == NULL || strcmp(node->name, name) == 0) {
+       if (name == NULL || strcmp((char*)node->name, name) == 0) {
                if (ns) {
                        xmlNsPtr nsPtr = node_find_ns(node);
                        if (nsPtr) {
-                               return (strcmp(nsPtr->href, ns) == 0);
+                               return (strcmp((char*)nsPtr->href, ns) == 0);
                        } else {
                                return FALSE;
                        }
@@ -296,7 +296,7 @@ xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns
                }
 
                attr = get_attribute_ex(node->properties, attribute, attr_ns);
-               if (attr != NULL && strcmp(attr->children->content, value) == 0) {
+               if (attr != NULL && strcmp((char*)attr->children->content, value) == 0) {
                        return node;
                }
                node = node->next;
@@ -309,7 +309,7 @@ xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, cha
        while (node != NULL) {
                if (node_is_equal_ex(node, name, name_ns)) {
                        xmlAttrPtr attr = get_attribute_ex(node->properties, attribute, attr_ns);
-                       if (attr != NULL && strcmp(attr->children->content, value) == 0) {
+                       if (attr != NULL && strcmp((char*)attr->children->content, value) == 0) {
                                return node;
                        }
                }
@@ -324,15 +324,15 @@ xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, cha
        return NULL;
 }
 
-int parse_namespace(const char *inval, char **value, char **namespace)
+int parse_namespace(const xmlChar *inval, char **value, char **namespace)
 {
-       char *found = strrchr(inval, ':');
+       char *found = strrchr((char*)inval, ':');
 
-       if (found != NULL && found != inval) {
-               (*namespace) = estrndup(inval, found - inval);
+       if (found != NULL && found != (char*)inval) {
+               (*namespace) = estrndup((char*)inval, found - (char*)inval);
                (*value) = estrdup(++found);
        } else {
-               (*value) = estrdup(inval);
+               (*value) = estrdup((char*)inval);
                (*namespace) = NULL;
        }
 
index b7ebae4ece51e1c6ba05669922a423f1255cd479..5653cd68dc049d5926866d1c81c4b536e267af48 100644 (file)
@@ -42,7 +42,7 @@ xmlNodePtr get_node_ex(xmlNodePtr node,char *name, char *ns);
 xmlNodePtr get_node_recursive_ex(xmlNodePtr node,char *name, char *ns);
 xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
 xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
-int parse_namespace(const char *inval,char **value,char **namespace);
+int parse_namespace(const xmlChar *inval,char **value,char **namespace);
 
 #ifndef ZEND_ENGINE_2
 int php_stream_xmlIO_match_wrapper(const char *filename);
index dcf1cd00c76ea7d5170a6b9968a1fb707b8cb96d..70f61985715541e34692753e5cf62a784414bae1 100644 (file)
@@ -1545,9 +1545,9 @@ PHP_METHOD(SoapServer, handle)
        if (xmlGetIntSubset(doc_request) != NULL) {
                xmlNodePtr env = get_node(doc_request->children,"Envelope");
                if (env && env->ns) {
-                       if (strcmp(env->ns->href,SOAP_1_1_ENV_NAMESPACE) == 0) {
+                       if (strcmp((char*)env->ns->href, SOAP_1_1_ENV_NAMESPACE) == 0) {
                                SOAP_GLOBAL(soap_version) = SOAP_1_1;
-                       } else if (strcmp(env->ns->href,SOAP_1_2_ENV_NAMESPACE) == 0) {
+                       } else if (strcmp((char*)env->ns->href,SOAP_1_2_ENV_NAMESPACE) == 0) {
                                SOAP_GLOBAL(soap_version) = SOAP_1_2;
                        }
                }
@@ -1937,7 +1937,8 @@ PHP_METHOD(SoapServer, addSoapHeader)
 static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr TSRMLS_DC)
 {
        int soap_version;
-       xmlChar *buf, cont_len[30];
+       xmlChar *buf;
+       char cont_len[30];
        int size;
        xmlDocPtr doc_return;
 
@@ -3186,7 +3187,7 @@ static sdlFunctionPtr find_function(sdlPtr sdl, xmlNodePtr func, zval* function_
 {
        sdlFunctionPtr function;
 
-       function = get_function(sdl, func->name);
+       function = get_function(sdl, (char*)func->name);
        if (function && function->binding && function->binding->bindingType == BINDING_SOAP) {
                sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)function->bindingAttributes;
                if (fnb->style == SOAP_DOCUMENT) {
@@ -3246,7 +3247,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
                } else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
                        if (*version == SOAP_1_2) {
                                soap_server_fault("Client", "encodingStyle cannot be specified on the Envelope", NULL, NULL, NULL TSRMLS_CC);
-                       } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                       } else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
                                soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
                        }
                }
@@ -3288,7 +3289,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
                } else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
                        if (*version == SOAP_1_2) {
                                soap_server_fault("Client", "encodingStyle cannot be specified on the Body", NULL, NULL, NULL TSRMLS_CC);
-                       } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                       } else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
                                soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
                        }
                }
@@ -3324,12 +3325,12 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
        } else {
                if (*version == SOAP_1_1) {
                        attr = get_attribute_ex(func->properties,"encodingStyle",SOAP_1_1_ENV_NAMESPACE);
-                       if (attr && strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                       if (attr && strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
                                soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
                        }
                } else {
                        attr = get_attribute_ex(func->properties,"encodingStyle",SOAP_1_2_ENV_NAMESPACE);
-                       if (attr && strcmp(attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
+                       if (attr && strcmp((char*)attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
                                soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
                        }
                }
@@ -3354,7 +3355,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
                        } else if (attr_is_equal_ex(attr,"encodingStyle",SOAP_1_2_ENV_NAMESPACE)) {
                                if (*version == SOAP_1_2) {
                                        soap_server_fault("Client", "encodingStyle cannot be specified on the Header", NULL, NULL, NULL TSRMLS_CC);
-                               } else if (strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                               } else if (strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
                                        soap_server_fault("Client", "Unknown data encoding style", NULL, NULL, NULL TSRMLS_CC);
                                }
                        }
@@ -3369,37 +3370,37 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
 
                                if (*version == SOAP_1_1) {
                                        attr = get_attribute_ex(hdr_func->properties,"encodingStyle",SOAP_1_1_ENV_NAMESPACE);
-                                       if (attr && strcmp(attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
+                                       if (attr && strcmp((char*)attr->children->content,SOAP_1_1_ENC_NAMESPACE) != 0) {
                                                soap_server_fault("Client","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
                                        }
                                        attr = get_attribute_ex(hdr_func->properties,"actor",envelope_ns);
                                        if (attr != NULL) {
-                                               if (strcmp(attr->children->content,SOAP_1_1_ACTOR_NEXT) != 0 &&
-                                                   (actor == NULL || strcmp(attr->children->content,actor) != 0)) {
+                                               if (strcmp((char*)attr->children->content,SOAP_1_1_ACTOR_NEXT) != 0 &&
+                                                   (actor == NULL || strcmp((char*)attr->children->content,actor) != 0)) {
                                                  goto ignore_header;
                                                }
                                        }
                                } else if (*version == SOAP_1_2) {
                                        attr = get_attribute_ex(hdr_func->properties,"encodingStyle",SOAP_1_2_ENV_NAMESPACE);
-                                       if (attr && strcmp(attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
+                                       if (attr && strcmp((char*)attr->children->content,SOAP_1_2_ENC_NAMESPACE) != 0) {
                                                soap_server_fault("DataEncodingUnknown","Unknown Data Encoding Style", NULL, NULL, NULL TSRMLS_CC);
                                        }
                                        attr = get_attribute_ex(hdr_func->properties,"role",envelope_ns);
                                        if (attr != NULL) {
-                                               if (strcmp(attr->children->content,SOAP_1_2_ACTOR_UNLIMATERECEIVER) != 0 &&
-                                                   strcmp(attr->children->content,SOAP_1_2_ACTOR_NEXT) != 0 &&
-                                                   (actor == NULL || strcmp(attr->children->content,actor) != 0)) {
+                                               if (strcmp((char*)attr->children->content,SOAP_1_2_ACTOR_UNLIMATERECEIVER) != 0 &&
+                                                   strcmp((char*)attr->children->content,SOAP_1_2_ACTOR_NEXT) != 0 &&
+                                                   (actor == NULL || strcmp((char*)attr->children->content,actor) != 0)) {
                                                  goto ignore_header;
                                                }
                                        }
                                }
                                attr = get_attribute_ex(hdr_func->properties,"mustUnderstand",envelope_ns);
                                if (attr) {
-                                       if (strcmp(attr->children->content,"1") == 0 ||
-                                           strcmp(attr->children->content,"true") == 0) {
+                                       if (strcmp((char*)attr->children->content,"1") == 0 ||
+                                           strcmp((char*)attr->children->content,"true") == 0) {
                                                mustUnderstand = 1;
-                                       } else if (strcmp(attr->children->content,"0") == 0 ||
-                                                  strcmp(attr->children->content,"false") == 0) {
+                                       } else if (strcmp((char*)attr->children->content,"0") == 0 ||
+                                                  strcmp((char*)attr->children->content,"false") == 0) {
                                                mustUnderstand = 0;
                                        } else {
                                                soap_server_fault("Client","mustUnderstand value is not boolean", NULL, NULL, NULL TSRMLS_CC);
@@ -3416,7 +3417,7 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c
                                                smart_str key = {0};
 
                                                if (hdr_func->ns) {
-                                                       smart_str_appends(&key, hdr_func->ns->href);
+                                                       smart_str_appends(&key, (char*)hdr_func->ns->href);
                                                        smart_str_appendc(&key, ':');
                                                }
                                                smart_str_appendl(&key, Z_STRVAL(h->function_name), Z_STRLEN(h->function_name));
@@ -3481,9 +3482,9 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                if (style == SOAP_RPC) {
                        ns = encode_add_ns(body, fnb->output.ns);
                        if (function->responseName) {
-                               method = xmlNewChild(body, ns, function->responseName, NULL);
+                               method = xmlNewChild(body, ns, BAD_CAST(function->responseName), NULL);
                        } else if (function->responseParameters) {
-                               method = xmlNewChild(body, ns, function->functionName, NULL);
+                               method = xmlNewChild(body, ns, BAD_CAST(function->functionName), NULL);
                        }
                }
        } else {
@@ -3491,7 +3492,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                use = main?SOAP_ENCODED:SOAP_LITERAL;
                if (style == SOAP_RPC) {
                        ns = encode_add_ns(body, uri);
-                       method = xmlNewChild(body, ns, function_name, NULL);
+                       method = xmlNewChild(body, ns, BAD_CAST(function_name), NULL);
                }
        }
 
@@ -3511,8 +3512,8 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                if (style == SOAP_RPC) {
                  xmlNode *rpc_result;
                        if (main && version == SOAP_1_2) {
-                               xmlNs *rpc_ns = xmlNewNs(body, RPC_SOAP12_NAMESPACE, RPC_SOAP12_NS_PREFIX);
-                               rpc_result = xmlNewChild(method, rpc_ns, "result", NULL);
+                               xmlNs *rpc_ns = xmlNewNs(body, BAD_CAST(RPC_SOAP12_NAMESPACE), BAD_CAST(RPC_SOAP12_NS_PREFIX));
+                               rpc_result = xmlNewChild(method, rpc_ns, BAD_CAST("result"), NULL);
                                param = serialize_parameter(parameter, ret, 0, "return", use, method TSRMLS_CC);
                                xmlNodeSetContent(rpc_result,param->name);
                        } else {
@@ -3523,12 +3524,12 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                        if (function && function->binding->bindingType == BINDING_SOAP) {
                                if (parameter && parameter->element) {
                                        ns = encode_add_ns(param, parameter->element->namens);
-                                       xmlNodeSetName(param, parameter->element->name);
+                                       xmlNodeSetName(param, BAD_CAST(parameter->element->name));
                                        xmlSetNs(param, ns);
                                }
-                       } else if (strcmp(param->name,"return") == 0) {
+                       } else if (strcmp((char*)param->name,"return") == 0) {
                                ns = encode_add_ns(param, uri);
-                               xmlNodeSetName(param, function_name);
+                               xmlNodeSetName(param, BAD_CAST(function_name));
                                xmlSetNs(param, ns);
                        }
                }
@@ -3552,7 +3553,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                                if (function && function->binding->bindingType == BINDING_SOAP) {
                                        if (parameter && parameter->element) {
                                                ns = encode_add_ns(param, parameter->element->namens);
-                                               xmlNodeSetName(param, parameter->element->name);
+                                               xmlNodeSetName(param, BAD_CAST(parameter->element->name));
                                                xmlSetNs(param, ns);
                                        }
                                }
@@ -3563,7 +3564,7 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
                }
        }
        if (use == SOAP_ENCODED && version == SOAP_1_2 && method != NULL) {
-               xmlSetNsProp(method, body->ns, "encodingStyle", SOAP_1_2_ENC_NAMESPACE);
+               xmlSetNsProp(method, body->ns, BAD_CAST("encodingStyle"), BAD_CAST(SOAP_1_2_ENC_NAMESPACE));
        }
        return use;
 }
@@ -3578,17 +3579,17 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
 
        encode_reset_ns();
 
-       doc = xmlNewDoc("1.0");
+       doc = xmlNewDoc(BAD_CAST("1.0"));
        doc->charset = XML_CHAR_ENCODING_UTF8;
-       doc->encoding = xmlStrdup((xmlChar*)"UTF-8");
+       doc->encoding = xmlCharStrdup("UTF-8");
 
        if (version == SOAP_1_1) {
-               envelope = xmlNewDocNode(doc, NULL, "Envelope", NULL);
-               ns = xmlNewNs(envelope, SOAP_1_1_ENV_NAMESPACE, SOAP_1_1_ENV_NS_PREFIX);
+               envelope = xmlNewDocNode(doc, NULL, BAD_CAST("Envelope"), NULL);
+               ns = xmlNewNs(envelope, BAD_CAST(SOAP_1_1_ENV_NAMESPACE), BAD_CAST(SOAP_1_1_ENV_NS_PREFIX));
                xmlSetNs(envelope,ns);
        } else if (version == SOAP_1_2) {
-               envelope = xmlNewDocNode(doc, NULL, "Envelope", NULL);
-               ns = xmlNewNs(envelope, SOAP_1_2_ENV_NAMESPACE, SOAP_1_2_ENV_NS_PREFIX);
+               envelope = xmlNewDocNode(doc, NULL, BAD_CAST("Envelope"), NULL);
+               ns = xmlNewNs(envelope, BAD_CAST(SOAP_1_2_ENV_NAMESPACE), BAD_CAST(SOAP_1_2_ENV_NS_PREFIX));
                xmlSetNs(envelope,ns);
        } else {
                soap_server_fault("Server", "Unknown SOAP version", NULL, NULL, NULL TSRMLS_CC);
@@ -3614,7 +3615,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                        char *hdr_ns   = headers->hdr?headers->hdr->ns:NULL;
                        char *hdr_name = Z_STRVAL(headers->function_name);
 
-                       head = xmlNewChild(envelope, ns, "Header", NULL);
+                       head = xmlNewChild(envelope, ns, BAD_CAST("Header"), NULL);
                        if (Z_TYPE_P(hdr_ret) == IS_OBJECT &&
                            instanceof_function(Z_OBJCE_P(hdr_ret), soap_header_class_entry TSRMLS_CC)) {
                                HashTable* ht = Z_OBJPROP_P(hdr_ret);
@@ -3654,17 +3655,17 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                        } else {
                                xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head);
                                if (hdr_name) {
-                                       xmlNodeSetName(xmlHdr,hdr_name);
+                                       xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
                                }
                                if (hdr_ns) {
-                                       xmlNsPtr nsptr = encode_add_ns(xmlHdr,hdr_ns);
+                                       xmlNsPtr nsptr = encode_add_ns(xmlHdr, hdr_ns);
                                        xmlSetNs(xmlHdr, nsptr);
                                }
                        }
                }
 
-               body = xmlNewChild(envelope, ns, "Body", NULL);
-               param = xmlNewChild(body, ns, "Fault", NULL);
+               body = xmlNewChild(envelope, ns, BAD_CAST("Body"), NULL);
+               param = xmlNewChild(body, ns, BAD_CAST("Fault"), NULL);
 
                if (zend_hash_find(prop, "faultcodens", sizeof("faultcodens"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) {
                        fault_ns = Z_STRVAL_PP(tmp);
@@ -3719,44 +3720,44 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                if (version == SOAP_1_1) {
                        if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) {
                                int new_len;
-                               xmlNodePtr node = xmlNewNode(NULL, "faultcode");
+                               xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode"));
                                char *str = php_escape_html_entities(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC);
                                xmlAddChild(param, node);
                                if (fault_ns) {
                                        xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
-                                       xmlNodeSetContent(node, xmlBuildQName(str, nsptr->prefix, NULL, 0));
+                                       xmlNodeSetContent(node, xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0));
                                } else {        
-                                       xmlNodeSetContentLen(node, str, new_len);
+                                       xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
                                }
                                efree(str);
                        }
                        if (zend_hash_find(prop, "faultstring", sizeof("faultstring"), (void**)&tmp) == SUCCESS) {
                                xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), *tmp, SOAP_LITERAL, param);
-                               xmlNodeSetName(node, "faultstring");
+                               xmlNodeSetName(node, BAD_CAST("faultstring"));
                        }
                        if (zend_hash_find(prop, "faultactor", sizeof("faultactor"), (void**)&tmp) == SUCCESS) {
                                xmlNodePtr node = master_to_xml(get_conversion(IS_STRING), *tmp, SOAP_LITERAL, param);
-                               xmlNodeSetName(node, "faultactor");
+                               xmlNodeSetName(node, BAD_CAST("faultactor"));
                        }
                        detail_name = "detail";
                } else {
                        if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) {
                                int new_len;
-                               xmlNodePtr node = xmlNewChild(param, ns, "Code", NULL);
+                               xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL);
                                char *str = php_escape_html_entities(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC);
-                               node = xmlNewChild(node, ns, "Value", NULL);
+                               node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL);
                                if (fault_ns) {
                                        xmlNsPtr nsptr = encode_add_ns(node, fault_ns);
-                                       xmlNodeSetContent(node, xmlBuildQName(str, nsptr->prefix, NULL, 0));
+                                       xmlNodeSetContent(node, xmlBuildQName(BAD_CAST(str), nsptr->prefix, NULL, 0));
                                } else {        
-                                       xmlNodeSetContentLen(node, str, new_len);
+                                       xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
                                }
                                efree(str);
                        }
                        if (zend_hash_find(prop, "faultstring", sizeof("faultstring"), (void**)&tmp) == SUCCESS) {
-                               xmlNodePtr node = xmlNewChild(param, ns, "Reason", NULL);
+                               xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Reason"), NULL);
                                node = master_to_xml(get_conversion(IS_STRING), *tmp, SOAP_LITERAL, node);
-                               xmlNodeSetName(node, "Text");
+                               xmlNodeSetName(node, BAD_CAST("Text"));
                                xmlSetNs(node, ns);
                        }
                        detail_name = SOAP_1_2_ENV_NS_PREFIX":Detail";
@@ -3771,7 +3772,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                            Z_TYPE_PP(tmp) != IS_NULL) {
                                detail = *tmp;
                        }
-                       node = xmlNewNode(NULL, detail_name);
+                       node = xmlNewNode(NULL, BAD_CAST(detail_name));
                        xmlAddChild(param, node);
 
                        zend_hash_internal_pointer_reset(fault->details);
@@ -3804,13 +3805,13 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                                } else {
                                        if (sparam->element) {
                                                xmlNsPtr ns = encode_add_ns(x, sparam->element->namens);
-                                               xmlNodeSetName(x, sparam->element->name);
+                                               xmlNodeSetName(x, BAD_CAST(sparam->element->name));
                                                xmlSetNs(x, ns);
                                        }
                                }
                        }
                        if (use == SOAP_ENCODED && version == SOAP_1_2) {
-                               xmlSetNsProp(x, envelope->ns, "encodingStyle", SOAP_1_2_ENC_NAMESPACE);
+                               xmlSetNsProp(x, envelope->ns, BAD_CAST("encodingStyle"), BAD_CAST(SOAP_1_2_ENC_NAMESPACE));
                        }
                } else if (zend_hash_find(prop, "detail", sizeof("detail"), (void**)&tmp) == SUCCESS &&
                    Z_TYPE_PP(tmp) != IS_NULL) {
@@ -3821,7 +3822,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                if (headers) {
                        soapHeader *h;
 
-                       head = xmlNewChild(envelope, ns, "Header", NULL);
+                       head = xmlNewChild(envelope, ns, BAD_CAST("Header"), NULL);
                        h = headers;
                        while (h != NULL) {
                                if (Z_TYPE(h->retval) != IS_NULL) {
@@ -3875,7 +3876,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                                        } else {
                                                xmlNodePtr xmlHdr = master_to_xml(hdr_enc, hdr_ret, hdr_use, head);
                                                if (hdr_name) {
-                                                       xmlNodeSetName(xmlHdr,hdr_name);
+                                                       xmlNodeSetName(xmlHdr, BAD_CAST(hdr_name));
                                                }
                                                if (hdr_ns) {
                                                        xmlNsPtr nsptr = encode_add_ns(xmlHdr,hdr_ns);
@@ -3892,7 +3893,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
                        }
                }
 
-               body = xmlNewChild(envelope, ns, "Body", NULL);
+               body = xmlNewChild(envelope, ns, BAD_CAST("Body"), NULL);
 
                if (serialize_response_call2(body, function, function_name, uri, ret, version, 1 TSRMLS_CC) == SOAP_ENCODED) {
                        use = SOAP_ENCODED;
@@ -3901,12 +3902,12 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
        }
 
        if (use == SOAP_ENCODED) {
-               xmlNewNs(envelope, XSD_NAMESPACE, XSD_NS_PREFIX);
+               xmlNewNs(envelope, BAD_CAST(XSD_NAMESPACE), BAD_CAST(XSD_NS_PREFIX));
                if (version == SOAP_1_1) {
-                       xmlNewNs(envelope, SOAP_1_1_ENC_NAMESPACE, SOAP_1_1_ENC_NS_PREFIX);
-                       xmlSetNsProp(envelope, envelope->ns, "encodingStyle", SOAP_1_1_ENC_NAMESPACE);
+                       xmlNewNs(envelope, BAD_CAST(SOAP_1_1_ENC_NAMESPACE), BAD_CAST(SOAP_1_1_ENC_NS_PREFIX));
+                       xmlSetNsProp(envelope, envelope->ns, BAD_CAST("encodingStyle"), BAD_CAST(SOAP_1_1_ENC_NAMESPACE));
                } else if (version == SOAP_1_2) {
-                       xmlNewNs(envelope, SOAP_1_2_ENC_NAMESPACE, SOAP_1_2_ENC_NS_PREFIX);
+                       xmlNewNs(envelope, BAD_CAST(SOAP_1_2_ENC_NAMESPACE), BAD_CAST(SOAP_1_2_ENC_NS_PREFIX));
                }
        }
 
@@ -3929,27 +3930,27 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
 
        encode_reset_ns();
 
-       doc = xmlNewDoc("1.0");
-       doc->encoding = xmlStrdup((xmlChar*)"UTF-8");
+       doc = xmlNewDoc(BAD_CAST("1.0"));
+       doc->encoding = xmlCharStrdup("UTF-8");
        doc->charset = XML_CHAR_ENCODING_UTF8;
        if (version == SOAP_1_1) {
-               envelope = xmlNewDocNode(doc, NULL, "Envelope", NULL);
-               ns = xmlNewNs(envelope, SOAP_1_1_ENV_NAMESPACE, SOAP_1_1_ENV_NS_PREFIX);
-               xmlSetNs(envelope,ns);
+               envelope = xmlNewDocNode(doc, NULL, BAD_CAST("Envelope"), NULL);
+               ns = xmlNewNs(envelope, BAD_CAST(SOAP_1_1_ENV_NAMESPACE), BAD_CAST(SOAP_1_1_ENV_NS_PREFIX));
+               xmlSetNs(envelope, ns);
        } else if (version == SOAP_1_2) {
-               envelope = xmlNewDocNode(doc, NULL, "Envelope", NULL);
-               ns = xmlNewNs(envelope, SOAP_1_2_ENV_NAMESPACE, SOAP_1_2_ENV_NS_PREFIX);
-               xmlSetNs(envelope,ns);
+               envelope = xmlNewDocNode(doc, NULL, BAD_CAST("Envelope"), NULL);
+               ns = xmlNewNs(envelope, BAD_CAST(SOAP_1_2_ENV_NAMESPACE), BAD_CAST(SOAP_1_2_ENV_NS_PREFIX));
+               xmlSetNs(envelope, ns);
        } else {
                soap_error0(E_ERROR, "Unknown SOAP version");
        }
        xmlDocSetRootElement(doc, envelope);
 
        if (soap_headers) {
-               head = xmlNewChild(envelope, ns, "Header", NULL);
+               head = xmlNewChild(envelope, ns, BAD_CAST("Header"), NULL);
        }
 
-       body = xmlNewChild(envelope, ns, "Body", NULL);
+       body = xmlNewChild(envelope, ns, BAD_CAST("Body"), NULL);
 
        if (function && function->binding->bindingType == BINDING_SOAP) {
                sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)function->bindingAttributes;
@@ -3962,9 +3963,9 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
                if (style == SOAP_RPC) {
                        ns = encode_add_ns(body, fnb->input.ns);
                        if (function->requestName) {
-                               method = xmlNewChild(body, ns, function->requestName, NULL);
+                               method = xmlNewChild(body, ns, BAD_CAST(function->requestName), NULL);
                        } else {
-                               method = xmlNewChild(body, ns, function->functionName, NULL);
+                               method = xmlNewChild(body, ns, BAD_CAST(function->functionName), NULL);
                        }
                }
        } else {
@@ -3977,7 +3978,7 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
                /*style = SOAP_RPC;*/
                if (style == SOAP_RPC) {
                        ns = encode_add_ns(body, uri);
-                       method = xmlNewChild(body, ns, function_name, NULL);
+                       method = xmlNewChild(body, ns, BAD_CAST(function_name), NULL);
                }
 
                if (zend_hash_find(Z_OBJPROP_P(this_ptr), "use", sizeof("use"), (void **)&zuse) == SUCCESS &&
@@ -3999,7 +4000,7 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
                        if (function && function->binding->bindingType == BINDING_SOAP) {
                                if (parameter && parameter->element) {
                                        ns = encode_add_ns(param, parameter->element->namens);
-                                       xmlNodeSetName(param, parameter->element->name);
+                                       xmlNodeSetName(param, BAD_CAST(parameter->element->name));
                                        xmlSetNs(param, ns);
                                }
                        }
@@ -4021,7 +4022,7 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
                                        if (function && function->binding->bindingType == BINDING_SOAP) {
                                                if (parameter && parameter->element) {
                                                        ns = encode_add_ns(param, parameter->element->namens);
-                                                       xmlNodeSetName(param, parameter->element->name);
+                                                       xmlNodeSetName(param, BAD_CAST(parameter->element->name));
                                                        xmlSetNs(param, ns);
                                                }
                                        }
@@ -4067,41 +4068,41 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
 
                                if (zend_hash_find(ht, "data", sizeof("data"), (void**)&tmp) == SUCCESS) {
                                        h = master_to_xml(enc, *tmp, hdr_use, head);
-                                       xmlNodeSetName(h, Z_STRVAL_PP(name));
+                                       xmlNodeSetName(h, BAD_CAST(Z_STRVAL_PP(name)));
                                } else {
-                                       h = xmlNewNode(NULL, Z_STRVAL_PP(name));
-                                       xmlAddChild(head,h);
+                                       h = xmlNewNode(NULL, BAD_CAST(Z_STRVAL_PP(name)));
+                                       xmlAddChild(head, h);
                                }
-                               nsptr = encode_add_ns(h,Z_STRVAL_PP(ns));
+                               nsptr = encode_add_ns(h, Z_STRVAL_PP(ns));
                                xmlSetNs(h, nsptr);
 
                                if (zend_hash_find(ht, "mustUnderstand", sizeof("mustUnderstand"), (void**)&tmp) == SUCCESS &&
                                    Z_TYPE_PP(tmp) == IS_BOOL && Z_LVAL_PP(tmp)) {
                                        if (version == SOAP_1_1) {
-                                               xmlSetProp(h, SOAP_1_1_ENV_NS_PREFIX":mustUnderstand","1");
+                                               xmlSetProp(h, BAD_CAST(SOAP_1_1_ENV_NS_PREFIX":mustUnderstand"), BAD_CAST("1"));
                                        } else {
-                                               xmlSetProp(h, SOAP_1_2_ENV_NS_PREFIX":mustUnderstand","true");
+                                               xmlSetProp(h, BAD_CAST(SOAP_1_2_ENV_NS_PREFIX":mustUnderstand"), BAD_CAST("true"));
                                        }
                                }
                                if (zend_hash_find(ht, "actor", sizeof("actor"), (void**)&tmp) == SUCCESS) {
                                        if (Z_TYPE_PP(tmp) == IS_STRING) {
                                                if (version == SOAP_1_1) {
-                                                       xmlSetProp(h, SOAP_1_1_ENV_NS_PREFIX":actor",Z_STRVAL_PP(tmp));
+                                                       xmlSetProp(h, BAD_CAST(SOAP_1_1_ENV_NS_PREFIX":actor"), BAD_CAST(Z_STRVAL_PP(tmp)));
                                                } else {
-                                                       xmlSetProp(h, SOAP_1_2_ENV_NS_PREFIX":role",Z_STRVAL_PP(tmp));
+                                                       xmlSetProp(h, BAD_CAST(SOAP_1_2_ENV_NS_PREFIX":role"), BAD_CAST(Z_STRVAL_PP(tmp)));
                                                }
                                        } else if (Z_TYPE_PP(tmp) == IS_LONG) {
                                                if (version == SOAP_1_1) {
                                                        if (Z_LVAL_PP(tmp) == SOAP_ACTOR_NEXT) {
-                                                               xmlSetProp(h, SOAP_1_1_ENV_NS_PREFIX":actor",SOAP_1_1_ACTOR_NEXT);
+                                                               xmlSetProp(h, BAD_CAST(SOAP_1_1_ENV_NS_PREFIX":actor"), BAD_CAST(SOAP_1_1_ACTOR_NEXT));
                                                        }
                                                } else {
                                                        if (Z_LVAL_PP(tmp) == SOAP_ACTOR_NEXT) {
-                                                               xmlSetProp(h, SOAP_1_2_ENV_NS_PREFIX":role",SOAP_1_2_ACTOR_NEXT);
+                                                               xmlSetProp(h, BAD_CAST(SOAP_1_2_ENV_NS_PREFIX":role"), BAD_CAST(SOAP_1_2_ACTOR_NEXT));
                                                        } else if (Z_LVAL_PP(tmp) == SOAP_ACTOR_NONE) {
-                                                               xmlSetProp(h, SOAP_1_2_ENV_NS_PREFIX":role",SOAP_1_2_ACTOR_NONE);
+                                                               xmlSetProp(h, BAD_CAST(SOAP_1_2_ENV_NS_PREFIX":role"), BAD_CAST(SOAP_1_2_ACTOR_NONE));
                                                        } else if (Z_LVAL_PP(tmp) == SOAP_ACTOR_UNLIMATERECEIVER) {
-                                                               xmlSetProp(h, SOAP_1_2_ENV_NS_PREFIX":role",SOAP_1_2_ACTOR_UNLIMATERECEIVER);
+                                                               xmlSetProp(h, BAD_CAST(SOAP_1_2_ENV_NS_PREFIX":role"), BAD_CAST(SOAP_1_2_ACTOR_UNLIMATERECEIVER));
                                                        }
                                                }
                                        }
@@ -4112,14 +4113,14 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
        }
 
        if (use == SOAP_ENCODED) {
-               xmlNewNs(envelope, XSD_NAMESPACE, XSD_NS_PREFIX);
+               xmlNewNs(envelope, BAD_CAST(XSD_NAMESPACE), BAD_CAST(XSD_NS_PREFIX));
                if (version == SOAP_1_1) {
-                       xmlNewNs(envelope, SOAP_1_1_ENC_NAMESPACE, SOAP_1_1_ENC_NS_PREFIX);
-                       xmlSetNsProp(envelope, envelope->ns, "encodingStyle", SOAP_1_1_ENC_NAMESPACE);
+                       xmlNewNs(envelope, BAD_CAST(SOAP_1_1_ENC_NAMESPACE), BAD_CAST(SOAP_1_1_ENC_NS_PREFIX));
+                       xmlSetNsProp(envelope, envelope->ns, BAD_CAST("encodingStyle"), BAD_CAST(SOAP_1_1_ENC_NAMESPACE));
                } else if (version == SOAP_1_2) {
-                       xmlNewNs(envelope, SOAP_1_2_ENC_NAMESPACE, SOAP_1_2_ENC_NS_PREFIX);
+                       xmlNewNs(envelope, BAD_CAST(SOAP_1_2_ENC_NAMESPACE), BAD_CAST(SOAP_1_2_ENC_NS_PREFIX));
                        if (method) {
-                               xmlSetNsProp(method, envelope->ns, "encodingStyle", SOAP_1_2_ENC_NAMESPACE);
+                               xmlSetNsProp(method, envelope->ns, BAD_CAST("encodingStyle"), BAD_CAST(SOAP_1_2_ENC_NAMESPACE));
                        }
                }
        }
@@ -4185,8 +4186,8 @@ static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName,
                enc = NULL;
        }
        xmlParam = master_to_xml(enc, val, style, parent);
-       if (!strcmp(xmlParam->name, "BOGUS")) {
-               xmlNodeSetName(xmlParam, paramName);
+       if (!strcmp((char*)xmlParam->name, "BOGUS")) {
+               xmlNodeSetName(xmlParam, BAD_CAST(paramName));
        }
        return xmlParam;
 }
@@ -4276,12 +4277,12 @@ static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params)
                                                zend_hash_internal_pointer_reset((*tmp)->requestParameters);
                                                while (zend_hash_get_current_data((*tmp)->requestParameters, (void**)&param) == SUCCESS) {
                                                        if ((*param)->element) {
-                                                               if (strcmp((*param)->element->name,node->name) != 0) {
+                                                               if (strcmp((*param)->element->name, (char*)node->name) != 0) {
                                                                        ok = 0;
                                                                        break;
                                                                }
                                                                if ((*param)->element->namens != NULL && node->ns != NULL) {
-                                                                       if (strcmp((*param)->element->namens,node->ns->href) != 0) {
+                                                                       if (strcmp((*param)->element->namens, (char*)node->ns->href) != 0) {
                                                                                ok = 0;
                                                                                break;
                                                                        }
@@ -4289,7 +4290,7 @@ static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params)
                                                                        ok = 0;
                                                                        break;
                                                                }
-                                                       } else if (strcmp((*param)->paramName,node->name) != 0) {
+                                                       } else if (strcmp((*param)->paramName, (char*)node->name) != 0) {
                                                                ok = 0;
                                                                break;
                                                        }