Page 1 of 1

Namespace Error

Posted: Sun Mar 26, 2006 5:14 pm
by argyle
Hi, all, my first post, please be kind...

I'm currently taking a class in Webservices and XML Programming and I've decided to do my latest project in PHP. The project basically has us communicating with the GoogleSearch Webservice. I know how to use the built in PHP SOAP functions, that's not the problem. The problem is when I'm trying to generate a raw XML SOAP message to print out I get a "Namespace Error" when I try the following line:

Code: Select all

$soapGoogle = new DOMElement('ns1:doGoogleSearch');
I understand that 'ns1' is not in the default namespace, so my question is, how do I include 'ns1' in the default namespace for PHP DOM?

A side note: I know I could generate the XML using strings or by editing an existing XML file, my question is specifically on this namespace issue, so if anyone has the answer to this it would be greatly appreciated.

- jake