Re: [SOAP] Removing ns1 namespace qualifier

From: Date: Mon, 03 Jul 2006 17:55:33 +0000
Subject: Re: [SOAP] Removing ns1 namespace qualifier
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-2349@lists.php.net to get a copy of this message
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-Salesforce.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!

« previous php.soap (#2349) next »