|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 17:00:02 2025 UTC |
Description: ------------ For our customers, we provide a common api including customer-specific endpoints. These endpoints are created with JAX-WS from manually defined XSDs and WSDLs. The structure of each end point is as follows: * <CustomerName>_<CountryCode>.wsdl * <CustomerName>_<CountryCode>.xsd * <CustomerName>_<CountryCode>_Types.xsd * Base_Types.xsd The WSDL only defines the SOAP methods whereas the <CustomerName>_<CountryCode>.xsd references the data structure for the specific customer interface. BaseTypes.xsd is a common data definition file, that is partly redefined within the <CustomerName>_<CountryCode>_Types.xsd file using the xs:redefine mechanism. Unfortunately, we are facing an issue with this structure since data types that are redefined within the <CustomerName>_<CountryCode>_Types.xsd file are ignored during request generation. Given the structure <typ:AuthenticateRequest> <typ1:ConsumerIdentification> <typ1:ConsumerAuthentication> <typ1:Principal>...</typ1:Principal> <typ1:Credential>...</typ1:Credential> </typ1:ConsumerAuthentication> </typ1:ConsumerIdentification> <typ:Authentication> <typ1:Identification> <typ1:Alias>...</typ1:Alias> </typ1:Identification> <typ1:Security> <typ1:SecretType>...</typ1:SecretType> <typ1:Secret>...</typ1:Secret> </typ1:Security> </typ:Authentication> </typ:AuthenticateRequest> the ConsumerIdentification and Authentication elements are defined within the BaseTypes.xsd and are redefined (in this case defined more precisely) within the <CustomerName>_<CountryCode>_Types.xsd. Setting up a request with $requestParams = array( 'ConsumerIdentification' => array( 'ConsumerAuthentication' => array( 'Principal' => $this->authentication->getPrincipal(), 'Credential' => $this->authentication->getCredential() ) ), 'Authentication' => array( 'Identification' => array( 'Alias' => $alias ), 'Security' => array( 'SecretType' => 2, 'Secret' => $secret ) ) ); results in an XML structure that lacks the details of the redefined data structure. The request XML is as follows: <typ:AuthenticateRequest> <typ1:ConsumerIdentification /> <typ:Authentication /> </typ:AuthenticateRequest> Obviously, this is not a sufficent input for the web service and it complains about missing consumer credentials. From my point of view, this is a none-feature of the PHP/SOAP implementation since merging the content within the xs:redefine block of the <CustomerName>_<CountryCode>_Types.xsd into the BaseTypes.xsd solves this issue. Test script: --------------- In case more information in the XSDs or WSDLs are needed, please contact me. At present, I am not allowed to publish them for security reasons. Regarding the SoapClient: it is created as described within the PHP docs. Nothing special there. Expected result: ---------------- <typ:AuthenticateRequest> <typ1:ConsumerIdentification> <typ1:ConsumerAuthentication> <typ1:Principal>...</typ1:Principal> <typ1:Credential>...</typ1:Credential> </typ1:ConsumerAuthentication> </typ1:ConsumerIdentification> <typ:Authentication> <typ1:Identification> <typ1:Alias>...</typ1:Alias> </typ1:Identification> <typ1:Security> <typ1:SecretType>...</typ1:SecretType> <typ1:Secret>...</typ1:Secret> </typ1:Security> </typ:Authentication> </typ:AuthenticateRequest> Actual result: -------------- <typ:AuthenticateRequest> <typ1:ConsumerIdentification /> <typ:Authentication /> </typ:AuthenticateRequest>