- SOAP message MUST NOT contain Processing Instructions <?xml-stylesheet ... ?> (XML_PI_NODE)
+ SOAP 1.1 fault codes ("client","server"), SOAP 1.1 fault codes ("Sender","Receiver")
+ SOAP 1.1 Content-Type - "text/xml", SOAP 1.2 - "application/soap+xml"
-- support for SOAP 1.2 <rpc:result> (ignore it???)
++ support for SOAP 1.2 <rpc:result> (ignore it)
+- SOAP 1.2 uses the element names env:Code and env:Reason, respectively, for what used to be called faultcode and faultstring in SOAP 1.1.
- support for SOAP headers
- actor attribute
- mustUnderstend attribute
#define WSDL_NS_PREFIX "wsdl"
#define WSDL_SOAP11_NAMESPACE "http://schemas.xmlsoap.org/wsdl/soap/"
-#define WSDL_SOAP12_NAMESPACE "http://www.w3.org/2003/05/soap-rpc"
-#define WSDL_SOAP12OLD_NAMESPACE "http://schemas.xmlsoap.org/wsdl/soap12/"
-#define WSDL_SOAP_NS_PREFIX "wsdlSoap"
+#define WSDL_SOAP12_NAMESPACE "http://schemas.xmlsoap.org/wsdl/soap12/"
+#define RPC_SOAP12_NAMESPACE "http://www.w3.org/2003/05/soap-rpc"
#define WSDL_HTTP11_NAMESPACE "http://schemas.xmlsoap.org/wsdl/http/"
#define WSDL_HTTP12_NAMESPACE "http://www.w3.org/2003/05/soap/bindings/HTTP/"
val = val->next;
}
if (val != NULL) {
- zval *tmp;
- tmp = master_to_zval(NULL, val);
- if (val->name) {
- add_assoc_zval(return_value, (char*)val->name, tmp);
- } else {
- add_next_index_zval(return_value, tmp);
+ if (!node_is_equal_ex(val,"result",RPC_SOAP12_NAMESPACE)) {
+ zval *tmp;
+
+ tmp = master_to_zval(NULL, val);
+ if (val->name) {
+ add_assoc_zval(return_value, (char*)val->name, tmp);
+ } else {
+ add_next_index_zval(return_value, tmp);
+ }
+ ++param_count;
}
- ++param_count;
val = val->next;
}
}
if (address->ns && !strcmp(address->ns->href, WSDL_SOAP11_NAMESPACE)) {
wsdl_soap_namespace = WSDL_SOAP11_NAMESPACE;
tmpbinding->bindingType = BINDING_SOAP;
- } else if (address->ns && !strcmp(address->ns->href, WSDL_SOAP12OLD_NAMESPACE)) {
- wsdl_soap_namespace = WSDL_SOAP12OLD_NAMESPACE;
- tmpbinding->bindingType = BINDING_SOAP;
} else if (address->ns && !strcmp(address->ns->href, WSDL_SOAP12_NAMESPACE)) {
wsdl_soap_namespace = WSDL_SOAP12_NAMESPACE;
tmpbinding->bindingType = BINDING_SOAP;
+ } else if (address->ns && !strcmp(address->ns->href, RPC_SOAP12_NAMESPACE)) {
+ wsdl_soap_namespace = RPC_SOAP12_NAMESPACE;
+ tmpbinding->bindingType = BINDING_SOAP;
} else if (address->ns && !strcmp(address->ns->href, WSDL_HTTP11_NAMESPACE)) {
tmpbinding->bindingType = BINDING_HTTP;
} else if (address->ns && !strcmp(address->ns->href, WSDL_HTTP12_NAMESPACE)) {
if (strcmp(fault_code,"Client") == 0) {
smart_str_appendl(&code, SOAP_1_2_ENV_NS_PREFIX, sizeof(SOAP_1_2_ENV_NS_PREFIX)-1);
smart_str_appendc(&code, ':');
- smart_str_appendl(&code,"Sencer",sizeof("Sender")-1);
+ smart_str_appendl(&code,"Sender",sizeof("Sender")-1);
} else if (strcmp(fault_code,"Server") == 0) {
smart_str_appendl(&code, SOAP_1_2_ENV_NS_PREFIX, sizeof(SOAP_1_2_ENV_NS_PREFIX)-1);
smart_str_appendc(&code, ':');
param = seralize_parameter(parameter, ret, 0, "return", use TSRMLS_CC);
if (style == SOAP_RPC) {
+ if (version == SOAP_1_2) {
+ xmlNs *rpc_ns = xmlNewNs(body, "http://www.w3.org/2003/05/soap-rpc", "rpc");
+ xmlNode *rpc_result = xmlNewChild(method, rpc_ns, "result", NULL);
+ xmlNodeSetContent(rpc_result,param->name);
+ }
xmlAddChild(method,param);
} else {
if (function && function->binding->bindingType == BINDING_SOAP) {
}
}
-/* FIXME: if use="literal" SOAP-ENV:encodingStyle is not need.
- What about arrayType?
-*/
if (use == SOAP_ENCODED) {
xmlSetProp(envelope, "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
xmlSetProp(envelope, "xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
}
}
-/* FIXME: if use="literal" SOAP-ENV:encodingStyle is not need.
- What about arrayType?
-*/
if (use == SOAP_ENCODED) {
xmlSetProp(envelope, "xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
xmlSetProp(envelope, "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");