diff options
author | Dmitry Stogov <dmitry@php.net> | 2010-05-05 07:43:45 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2010-05-05 07:43:45 +0000 |
commit | 6597e855622f5466935ac71c0cffc233ddc842b5 (patch) | |
tree | 5686a6115d08709b4fd23cde912c3170403bed07 | |
parent | 617e8a4f8c735bac0315fc0e6e2ba160e40f3fe6 (diff) | |
download | php-git-6597e855622f5466935ac71c0cffc233ddc842b5.tar.gz |
Fixed bug #50698 (SoapClient should handle wsdls with some incompatiable endpoints). (Justin Dearing)
-rw-r--r-- | ext/soap/php_sdl.c | 11 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_1.phpt | 11 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_1.wsdl | 228 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_2.phpt | 20 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_2.wsdl | 422 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_3.phpt | 20 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_3.wsdl | 312 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_4.phpt | 11 | ||||
-rw-r--r-- | ext/soap/tests/bugs/bug50698_4.wsdl | 228 |
9 files changed, 1262 insertions, 1 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 35c5e1af58..6bdb9e1294 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -832,7 +832,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) 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); + /* try the next binding */ + efree(soapBinding); + efree(tmpbinding->location); + efree(tmpbinding); + trav = trav->next; + continue; } } } @@ -1128,6 +1133,10 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) soap_error0(E_ERROR, "Parsing WSDL: Couldn't bind to service"); } + if (ctx.sdl->bindings == NULL || ctx.sdl->bindings->nNumOfElements == 0) { + soap_error0(E_ERROR, "Parsing WSDL: Could not find any usable binding services in WSDL."); + } + zend_hash_destroy(&ctx.messages); zend_hash_destroy(&ctx.bindings); zend_hash_destroy(&ctx.portTypes); diff --git a/ext/soap/tests/bugs/bug50698_1.phpt b/ext/soap/tests/bugs/bug50698_1.phpt new file mode 100644 index 0000000000..c5d634a977 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.phpt @@ -0,0 +1,11 @@ +--TEST-- +Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoints) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_1.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_1.wsdl b/ext/soap/tests/bugs/bug50698_1.wsdl new file mode 100644 index 0000000000..9c6a9ad142 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt new file mode 100644 index 0000000000..86ddf4806a --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.phpt @@ -0,0 +1,20 @@ +--TEST-- +Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatiable and incompatiable endpoints.) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_2.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_2.wsdl b/ext/soap/tests/bugs/bug50698_2.wsdl new file mode 100644 index 0000000000..e4dab6ce0f --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.wsdl @@ -0,0 +1,422 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-NetTcp-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_3.phpt b/ext/soap/tests/bugs/bug50698_3.phpt new file mode 100644 index 0000000000..16a24dbe55 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Request #50698_3 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large set of endpoints all incompatiable.) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_3.wsdl b/ext/soap/tests/bugs/bug50698_3.wsdl new file mode 100644 index 0000000000..bed21dfa4a --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.wsdl @@ -0,0 +1,312 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_4.phpt b/ext/soap/tests/bugs/bug50698_4.phpt new file mode 100644 index 0000000000..ca444d7774 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.phpt @@ -0,0 +1,11 @@ +--TEST-- +Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoints) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_4.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_4.wsdl b/ext/soap/tests/bugs/bug50698_4.wsdl new file mode 100644 index 0000000000..dc9c3297e4 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> |