diff options
| author | Dmitry Stogov <dmitry@php.net> | 2004-01-13 15:58:01 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2004-01-13 15:58:01 +0000 |
| commit | 3961fec217f9f1d1395abdb1afd73612429198b2 (patch) | |
| tree | a62e455a836027441c94c610870c65bc06e680dd /ext/soap/php_packet_soap.c | |
| parent | 38f8ed0e0abc5580e8efe967ff4f8dea2e00f680 (diff) | |
| download | php-git-3961fec217f9f1d1395abdb1afd73612429198b2.tar.gz | |
Source ceanup
Diffstat (limited to 'ext/soap/php_packet_soap.c')
| -rw-r--r-- | ext/soap/php_packet_soap.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index 76d1ccdf93..0179ff1828 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -116,19 +116,21 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction } /* Parse content of <Body> element */ + array_init(return_value); resp = body->children; - if (fn != NULL) { - /* Function has WSDL description */ - sdlParamPtr *h_param, param = NULL; - xmlNodePtr val = NULL; - char *name, *ns = NULL; - zval* tmp; - - if (fn->binding->bindingType == BINDING_SOAP) { + while (resp != NULL && resp->type != XML_ELEMENT_NODE) { + resp = resp->next; + } + if (resp != NULL) { + if (fn != NULL && fn->binding && fn->binding->bindingType == BINDING_SOAP) { + /* Function has WSDL description */ + sdlParamPtr *h_param, param = NULL; + xmlNodePtr val = NULL; + char *name, *ns = NULL; + zval* tmp; sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes; int res_count = zend_hash_num_elements(fn->responseParameters); - array_init(return_value); zend_hash_internal_pointer_reset(fn->responseParameters); while (zend_hash_get_current_data(fn->responseParameters, (void **)&h_param) == SUCCESS) { param = (*h_param); @@ -184,17 +186,10 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction zend_hash_move_forward(fn->responseParameters); } - } - } else { - /* Function hasn't WSDL description */ - cur = resp; - array_init(return_value); - while (cur && cur->type != XML_ELEMENT_NODE) { - cur = cur->next; - } - if (cur != NULL) { + } else { + /* Function hasn't WSDL description */ xmlNodePtr val; - val = cur->children; + val = resp->children; while (val != NULL) { while (val && val->type != XML_ELEMENT_NODE) { val = val->next; |
