if (zend_hash_find(ht, "enc_ns", sizeof("enc_ns"), (void **)&zns) == SUCCESS) {
enc = get_encoder(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zns), Z_STRVAL_PP(zstype));
} else {
- enc = get_encoder(SOAP_GLOBAL(sdl), NULL, Z_STRVAL_PP(zstype));
+ enc = get_encoder_ex(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zstype), Z_STRLEN_PP(zstype));
}
}
}
location = get_attribute(trav->properties, "schemaLocation");
if (ns != NULL && tns != NULL && strcmp(ns->children->content,tns->children->content) == 0) {
- soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
+ 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 {
+ soap_error0(E_ERROR, "Parsing Schema: can't import schema. Namespace must not match the enclosing schema 'targetNamespace'");
+ }
}
if (location) {
xmlChar *base = xmlNodeGetBase(trav->doc, trav);
#endif
-/* {{{ proto object SoapServer::SoapServer ( mixed wsdl [, array options])
+/* {{{ proto object SoapServer::setPersistence ( int mode )
Sets persistence mode of SoapServer */
PHP_METHOD(SoapServer, setPersistence)
{
/* }}} */
-/* {{{ proto SoapServer::fault
- SoapServer::fault */
+/* {{{ proto SoapServer::fault ( staring code, string string [, string actor [, mixed details [, string name]]] )
+ Issue SoapFault indicating an error */
PHP_METHOD(SoapServer, fault)
{
char *code, *string, *actor=NULL, *name=NULL;
RETURN_NULL();
}
- if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) {
+ if (headers == NULL || Z_TYPE_P(headers) == IS_NULL) {
zend_hash_del(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"));
- } else if (Z_TYPE_P(headers) == IS_ARRAY || Z_TYPE_P(headers) == IS_OBJECT) {
+ } else if (Z_TYPE_P(headers) == IS_ARRAY) {
zval *default_headers;
verify_soap_headers_array(Z_ARRVAL_P(headers) TSRMLS_CC);
if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__default_headers", sizeof("__default_headers"), (void **) &default_headers)==FAILURE) {
add_property_zval(this_ptr, "__default_headers", headers);
}
- } else if (Z_TYPE_P(headers) == IS_OBJECT &&
- Z_OBJCE_P(headers) == soap_header_class_entry) {
+ } else if (Z_TYPE_P(headers) == IS_OBJECT &&
+ Z_OBJCE_P(headers) == soap_header_class_entry) {
zval *default_headers;
ALLOC_INIT_ZVAL(default_headers);
array_init(default_headers);
add_next_index_zval(default_headers, headers);
add_property_zval(this_ptr, "__default_headers", default_headers);
- } else{
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid SOAP header");
- }
+ } else{
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Invalid SOAP header");
+ }
RETURN_TRUE;
}
/* }}} */