24 char* envelope_ns =
NULL;
26 xmlNodePtr trav, env,
head,
body, resp, cur, fault;
35 if (buffer_size == 0) {
46 if (xmlGetIntSubset(response) !=
NULL) {
54 trav = response->children;
55 while (trav !=
NULL) {
79 attr = env->properties;
82 add_soap_fault(this_ptr,
"Client",
"A SOAP Envelope element cannot have non Namespace qualified attributes",
NULL,
NULL);
101 trav = env->children;
124 xmlFreeDoc(response);
131 add_soap_fault(this_ptr,
"Client",
"A SOAP Body element cannot have non Namespace qualified attributes",
NULL,
NULL);
132 xmlFreeDoc(response);
138 xmlFreeDoc(response);
142 xmlFreeDoc(response);
150 xmlFreeDoc(response);
158 add_soap_fault(this_ptr,
"Client",
"A SOAP Header element cannot have non Namespace qualified attributes",
NULL,
NULL);
159 xmlFreeDoc(response);
164 xmlFreeDoc(response);
168 xmlFreeDoc(response);
179 char *faultcode =
NULL;
186 tmp =
get_node(fault->children,
"faultcode");
187 if (tmp !=
NULL && tmp->children !=
NULL) {
188 faultcode = (
char*)tmp->children->content;
191 tmp =
get_node(fault->children,
"faultstring");
192 if (tmp !=
NULL && tmp->children !=
NULL) {
199 tmp =
get_node(fault->children,
"faultactor");
200 if (tmp !=
NULL && tmp->children !=
NULL) {
207 tmp =
get_node(fault->children,
"detail");
212 tmp =
get_node(fault->children,
"Code");
213 if (tmp !=
NULL && tmp->children !=
NULL) {
214 tmp =
get_node(tmp->children,
"Value");
215 if (tmp !=
NULL && tmp->children !=
NULL) {
216 faultcode = (
char*)tmp->children->content;
220 tmp =
get_node(fault->children,
"Reason");
221 if (tmp !=
NULL && tmp->children !=
NULL) {
223 tmp =
get_node(tmp->children,
"Text");
224 if (tmp !=
NULL && tmp->children !=
NULL) {
232 tmp =
get_node(fault->children,
"Detail");
247 xmlFreeDoc(response);
253 resp =
body->children;
302 if (res_count == 1) {
309 if (
val ==
NULL && cur->children && cur->children->next ==
NULL) {
340 val = resp->children;
353 add_next_index_zval(arr, &tmp);
358 add_next_index_zval(&arr, &tmp);
375 if (param_count == 0) {
378 }
else if (param_count == 1) {
393 if (soap_headers &&
head) {
394 trav =
head->children;
395 while (trav !=
NULL) {
405 smart_str_appends(&
key, (
char*)trav->ns->href);
406 smart_str_appendc(&
key,
':');
408 smart_str_appends(&
key, (
char*)trav->name);
410 if ((hdr = zend_hash_find_ptr(hdrs,
key.s)) !=
NULL) {
413 smart_str_free(&
key);
416 add_assoc_zval(soap_headers, (
char*)trav->name, &
val);
422 xmlFreeDoc(response);
encodePtr get_conversion(int encode)
zval * master_to_zval(zval *ret, encodePtr encode, xmlNodePtr data)
#define RPC_SOAP12_NAMESPACE
#define SOAP_1_1_ENC_NAMESPACE
#define SOAP_1_1_ENV_NAMESPACE
#define SOAP_1_2_ENV_NAMESPACE
bool parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunctionPtr fn, char *fn_name, zval *return_value, zval *soap_headers)
struct php_pcntl_pending_signal * head
unsigned char key[REFLECTION_KEY_LEN]
struct _sdlSoapBindingFunctionHeader * sdlSoapBindingFunctionHeaderPtr
struct _encode * encodePtr
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
struct _sdlFunction * sdlFunctionPtr
struct _sdlSoapBindingFunction * sdlSoapBindingFunctionPtr
struct _sdlParam * sdlParamPtr
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns)
#define get_node(node, name)
sdlBindingType bindingType
HashTable * responseParameters
struct _sdlBinding * binding
sdlSoapBindingFunctionBody output
strcmp(string $string1, string $string2)
zend_string_release_ex(func->internal_function.function_name, 0)
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *str, size_t len)
ZEND_API void ZEND_FASTCALL zend_array_destroy(HashTable *ht)
#define ZEND_HASH_FOREACH_PTR(ht, _ptr)
#define ZEND_HASH_FOREACH_END()
struct _zend_string zend_string
#define convert_to_string(op)
#define Z_ARRVAL_P(zval_p)
#define Z_REFCOUNTED_P(zval_p)
struct _zend_array HashTable
#define Z_COUNTED_P(zval_p)
#define Z_REFCOUNTED(zval)
struct _zend_refcounted zend_refcounted
ZEND_API void ZEND_FASTCALL rc_dtor_func(zend_refcounted *p)
zend_refcounted * garbage