robrichards / wse-php

Libraries for adding WS-* support to ext/soap in PHP
129 stars 92 forks source link

Support different namespace #31

Closed timri closed 5 years ago

timri commented 7 years ago

Hi, I had to consume a webservice that required WS-A, so I tried your library. However, I was only successful after I changed the namespace:

diff -ruw wse-php_orig/src/WSASoap.php wse-php/src/WSASoap.php
--- wse-php_orig/src/WSASoap.php        2017-03-09 16:42:34.000000000 +0000
+++ wse-php/src/WSASoap.php     2017-07-19 10:46:54.672342000 +0000
@@ -48,7 +48,8 @@
  */
 class WSASoap
 {
-    const WSANS = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
+    const WSANS = 'http://www.w3.org/2005/08/addressing';
     const WSAPFX = 'wsa';
     private $soapNS, $soapPFX;
     private $soapDoc = null;

(To be of general use, this should probably be configurable, but the above change was enough to work for me) Regards

scoutkirkolson commented 6 years ago

We're having the exact same problem. Since WSANS is a constant and it is used with self:WSANS (instead of static) we can't just override the class. Please look into this issue and make it configurable like timri said.

rvdbogerd commented 5 years ago

Duplicate of #46 and #33

robrichards commented 5 years ago

Fixed with PR#46