PHP 5 PEAR SOAP and QName Questions
| From: | Adam Maccabee Trachtenberg | Date: | Tue, 24 Aug 2004 20:55:21 +0000 |
| Subject: | PHP 5 PEAR SOAP and QName Questions | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1601@lists.php.net to get a copy of this message | ||
I am beginning to play around with the SOAP packages and extensions,
and that's generated a few questions:
What is the status of the PHP 5 version of the PEAR SOAP extension? I
know it's orphaned, and that ext/soap is the way to go in PHP 5, but
does it have feature equivalence to 0.8RC3?
I would be willing to contribute patches to get it working again on
PHP 5 if this is considered useful. Does it makes sense that we'd ever
release this, or is it a evolutionary dead end? In other words, what
should I be looking at to direct my patches? 0.8RC3 only? Or both?
Second, can someone help me with this bit of QName parsing code that
lives around line 1040 in Base.php of 0.8RC3?
function QName($name, $namespace = '') {
if ($name && $name[0] == '{') {
/* snipped out for clarity */
} else if (strpos($name, ':') != FALSE) {
$s = split(':',$name);
$s = array_reverse($s);
$this->name = $s[0];
$this->ns = $s[1];
$this->namespace = $namespace;
} else {
/* snipped out for clarity */
}
The middle bit of code seems to assumes that if a QName has a colon
then it's of the form "prefix:localname". This is causing me problems
because eBay has a namespace of "urn:ebay:api:eBayAPI".
There's no prefix here, and I don't want any special magic to
happen. AFAIK, this is a perfectly legal namespace, so I don't see why
PEAR SOAP can make the assumption it does.
I made a quick and dirty hack to make PEAR SOAP not to do this if
$name begins with "urn:", but I don't think that's the cleanest
solution. Quite frankly, I don't know why regular URL namespaces don't
also get tripped up here. Ideas?
-adam
--
adam@trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!