php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77481 SoapClient not pulling in all namespaces to soapEnvelope
Submitted: 2019-01-17 17:37 UTC Modified: -
Votes:9
Avg. Score:4.6 ± 0.7
Reproduced:7 of 8 (87.5%)
Same Version:2 (28.6%)
Same OS:3 (42.9%)
From: kevin at icscomp dot com Assigned:
Status: Open Package: SOAP related
PHP Version: 7.3.1 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
32 + 23 = ?
Subscribe to this entry?

 
 [2019-01-17 17:37 UTC] kevin at icscomp dot com
Description:
------------
When making a connection to a Soap Web Service (WSDL-mode), in which the WSDL is using two .XSD schema imports, both with different namespaces, the PHP soapClient doesn't add the second namespace into the Soap Request, specifically it does not add them to the <SoapEnvelope> section of that request.

Pulling up the same endpoint in SoapUI it works properly, but PHP receives an error as it's missing the additional namespaces.


SoapUI generates this:

<soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:epis="http://www.testsite.com/testService" 
xmlns:com="http://www.testsite.com/common/dto/common">

Where PHP generates this:

<SOAP-ENV:Envelope 
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="http://www.testsite.com/testService"


As you see the above PHP generated header leaves out the second namespace entirely.


Expected result:
----------------
PHP's request should contain both namespaces based off of the WSDL as below within the SoapEnvelope:

<SOAP-ENV:Envelope 
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="http://www.testsite.com/testService"
  xmlns:ns2="http://www.testsite.com/common/dto/common">


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC