You need to log in before you can comment on or make changes to this bug.
If no context file is defined you get the following error: Warning: [MapServer Error]: msLoadMapContext(): Unable to read / in D:\ms4w\apps\chameleon\cwc2\htdocs\cwc2.php on line 604 Warning: [MapServer Error]: msGetMapContextFileText(): (/) in D:\ms4w\apps\chameleon\cwc2\htdocs\cwc2.php on line 604 Warning: Failed loading map context from / in D:\ms4w\apps\chameleon\cwc2\htdocs\cwc2.php on line 604 This could be cleaned up a little bit, by directly stating the problem. When a template is not defined you get the following message: Warning: file_get_contents(/): failed to open stream: No such file or directory in D:\ms4w\apps\chameleon\htdocs\chameleon.php on line 535 I had no idea what this error was from the message.
need to trap these errors and emit a service exception.
fixed, the error message is now correctly produced when no default context is provided in the configuration file AND no valid CONTEXTS parameter is suppplied. also fixed same problem with default template. also adding handling of CONTEXTS= to generate a more appropriate message.
No default Context Error Result: request URI was http://localhost/chameleon/cwc2/cwc2.php query string was service=VCG&version=0.1.0&request=GetApplication Invalid request. No CONTEXTS parameter was provided and the Service Instance has no default context This is good. But when no default Template defined the Result is. No error is presented, infact nothing at all. We should see a similar error found in the browser.
Changed target to 1.99 Beta 3.
added detection of the 'no default template' case with the following message: request URI was http://localhost/chameleon/cwc2/cwc2.php query string was service=VCG&version=0.1.0&request=GetApplication Invalid request. No TEMPLATES parameter was provided and the Service Instance has no default template. Also added the same handler for languages.
Verified on windows. When calling service instance: http://localhost/chameleon/cwc2/cwc2.php? service=VCG&request=GetApplication&version=0.1.0 I was allowed to change the cwc2.xml config options "default_context", "default_language" and "default_template" to blank. Each of these changes resulted in a clear message to the user. For example: request URI was http://localhost/chameleon/cwc2/cwc2.php query string was service=VCG&request=GetApplication&version=0.1.0 Invalid request. No TEMPLATES parameter was provided and the Service Instance has no default template Seting this to verified
Verified on Fedora Core 2.