RE: [SOAP] Removing ns1 namespace qualifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:  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!

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux