RE: [SOAP] Removing ns1 namespace qualifier
| From: | Vandegrift, Ken | Date: | Mon, 03 Jul 2006 17:58:50 +0000 |
| Subject: | RE: [SOAP] Removing ns1 namespace qualifier | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2350@lists.php.net to get a copy of this message | ||
Thank you for your response!
Yes, I have spoken with the Engineer at the company I am trying to work
with and he said their system does not recognize the "ns1" qualifier :(
Thanks for the link!
Ken Vandegrift
kvandegrift@sharis.com
Web Administrator
Sharis Mgmt. Corp
-----Original Message-----
From: Adam Maccabee Trachtenberg [mailto:adam@trachtenberg.com]
Sent: Monday, July 03, 2006 10:56 AM
To: Vandegrift, Ken
Cc: soap@lists.php.net
Subject: Re: [SOAP] Removing ns1 namespace qualifier
On Mon, 3 Jul 2006, Vandegrift, Ken wrote:
> Is there an easy way to remove the "ns1" namespace qualifier from a
> SOAP BODY request using PHP's SOAP Extension?
Yes, but it's a hack... :)
> <activate-add-request>
> ...
> ...
> </activate-add-request>
>
> The SOAP server keeps throwing a JAVA error because it is not
> expecting the namespace qualifier.
> java.lang.IllegalArgumentException
Are you sure this is the right fix? I am pretty sure it's illegal to
have non-namespaced elements in SOAP (or at least here). Maybe it's
expecting them in a default namespace? It shouldn't matter, but who
knows?
Anyway, the answer to your question is to subclass SOAPClient and define
a __doRequest() method. Inside that method, you can hack up your XML
(using search and replace, regex, or DOM, etc.) to manipulate it to your
liking.
For example, see:
http://www.schlossnagle.org/~george/blog/index.php?/archives/235-Salesfo
rce.com-and-PHP.html
-adam
--
adam@trachtenberg.com | http://www.trachtenberg.com author
of o'reilly's
"upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!