Bug 480 - [Chameleon -Core] Service Instance unclear error messages
: [Chameleon -Core] Service Instance unclear error messages
Status: CLOSED FIXED
: Chameleon
Service Instance
: 1.99
: PC Windows 2000
: P1 normal
: 1.99 beta 3
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-06-29 14:18 by
Modified: 2004-10-27 15:48 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-06-29 14:18:39
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.
------- Comment #1 From 2004-07-07 10:47:28 -------
need to trap these errors and emit a service exception.
------- Comment #2 From 2004-07-08 11:08:38 -------
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.
------- Comment #3 From 2004-07-14 13:57:18 -------
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.

------- Comment #4 From 2004-07-22 15:26:51 -------
Changed target to 1.99 Beta 3.
------- Comment #5 From 2004-10-04 09:29:04 -------
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.
------- Comment #6 From 2004-10-25 16:15:18 -------
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
------- Comment #7 From 2004-10-27 15:48:56 -------
Verified on Fedora Core 2.