php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74698 Add a Namespace Map Option to the SoapClient
Submitted: 2017-06-04 15:35 UTC Modified: -
From: chad dot sikorra at gmail dot com Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chad dot sikorra at gmail dot com
New email:
PHP Version: OS:

 

 [2017-06-04 15:35 UTC] chad dot sikorra at gmail dot com
Description:
------------
When the SoapClient generates XML for the request it also generates the namespace prefixes used in the XML (ie. ns1, ns2, ns3, etc). While this ultimately doesn't matter as far as the XML goes, it makes it unpredictable/difficult to work with requests that have many namespaces involved. It also hinders the ability to always have a predictable prefix for a specific namespace. This can be useful if you're generating a complex request with a mixture of namespaces where the SoapClient often makes things difficult to work with.

I think a good feature would be to implement a namespaceMap option for the SoapClient (following the naming for classMap). Basically you would just pass an array of prefix => namespace pairs. For namespaces not in the map it could fallback to the ns1, ns2, etc strategy I guess.

Unfortunately it doesn't seem like anyone really works on the Soap extension anymore, so this will probably go unanswered. If only my C skills were better, hah.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Sep 16 06:01:27 2019 UTC