SYSMGR

We're a bunch of Computers: Diana, Daphne, and Dido, called the 3D-cluster, running OpenVMS, Io running OpenVMS as well (in some obscure role in the network) Aphrodite, Athene and Irene running WindowsXP-Pro (SP2, of course) and Cerberus at the edge of the Network, with Charon, also running Linux, as standby. SYSMGR takes care of us.

Friday, October 28

28-Oct-2005

Our recurring SOAP event
(what happened before)
Test the method used for testing - which did not give the right results:

<soapenv:body>
<soapenv:fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>
com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not % (position: START_DOCUMENT seen %... @1:1)
</faultstring>
<detail></detail>
</soapenv:Fault>
</soapenv:Body>

% - as first character ?? Looks like some VMS error!

(today's episode)
How to debug this? Well, since the type was temporary changed to "string" in stead of "boolean", why not dump a text into it, to see where is ended, in stead passing SYS$OUTPUT to xstream to translate. And read out all of SYS$OUTPUT and add it to the result, line break in between:

if (line == null) {
// Object result = xml.fromXML(br);
// toegang = (String) result ;
toegang = "OUT: " ;
while ((line = br.readLine()) != null) {
toegang = toegang + "\n" + line ;
;}
br.close();
}

so SYS$OUTPUT lines go into toegang (which is of type java.lang.String).
Now involking the method gives: ( I edited the outcome for clearence; line breaks did not occur)

<hasMedewerkerreadpermissionresponse xmlns="">
<ns1:Hasmedewerkerreadpermissionresult
xmlns:ns1="http://xxxx.xx/webservices/organisatie">
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling \BPS2002B%DCL-W-ACTIMAGE, error activating image BUIG$EXE:BUIG_CGI_BOB
-CLI-E-IMGNAME, image file BUIG$EXE:[SYSEXE]BUIG_CGI_BOB.EXE;
-RMS-F-DEV, error in device name or inappropriate device type for operation

</ns1:HasMedewerkerReadPermissionResult>
</hasmedewerkerreadpermissionresponse>

The DCL code has been invoked! Otherwise this result wouldn't have shown up!
BPS2002b is a foreign command to set the user's environment - actually, it's one of the first commands given - but it should have been defined first! In fact: the full user login sequence is to be executed - which implies execution of a number of other commandprocedures as well.
This was anticipated - but not thought of....
Not just that, because errors kept up appearing after the commandprocedure had been adapted, since the user that runs the service (APACHE$WWW, since it runs under Apache) needs Read and Execute access to each of the procedures and executables.
Another thing NOT to forget in the future, is that all output needs to be suppressed until output is exepceted to turn up. So the procedure starts with

$ DEFINE SYS$OUTPUT NL:

and has

$ DEASSSIGN SYS$OUTPUT

immediately before starting the actual working program that produces the XML, and after it,

$ DEFINE SYS$OUTPUT NL:

suppresses output again.

(The java code checks the contents of SYS$ERROR before reading SYS$OUTPUT, assuming errors go there. But as seen above, that is NOT always the case....)

After this has been done, I got the expected output!

<hasmedewerkerreadpermissionresponse xmlns="">
<ns1:hasmedewerkerreadpermissionresult
xmlns:ns1="http://xxx.xx/webservices/organisatie">OUT:
<hasmedewerkerreadpermissionresult>
<1111111111111111>
</hasmedewerkerreadpermissionresult>
</ns1:HasMedewerkerReadPermissionResult>
</hasmedewerkerreadpermissionresponse>

XML-in-XML but that was to be expected.
Next step is to restore the code to have xstream translate the outcome and return it as a string.
But first have the report module changed to return the EXACT name in the tag, matching the class; even case must be equal: "hasMede..." is different from "HasMede...". It might even be that the namespace addition matters. But that is "outside" the service code.

(Second episode)
I made a backup of the whole lot, zipped the backup files and and dropped it on Diana.
The restoration failed since I made a mistake on creating the zip but after I corrected the file format, backup gave the wrong version number for some files. No problem but for one: the service implementation code. Invoking the "version" method, I got the wrong, old data. Nor did the WSDL show up. But that had another reason: it had to do with weird behaviour of java: I decided to bypass the weird adaption I had to do in OTVMS1's server-config.wsdd file (use a short named logical for Tomcat's home directory) and use "catalina_home" as I have that one defined already. But ?wsdl did return a 404 (page not found) errror, so I reversed the idea and after that, the wsdl showed up (have to tell Brad).
After a full rebuild, placing the .jar in the right place and restarting Tomcat, the right values were returned from the "version" and "isAlive" methods, but the testfunction gave an unexpected result since only that one will actually start DCL:

<hasmedewerkerreadpermissionresponse xmlns="">
<ns1:hasmedewerkerreadpermissionresult>
xmlns:ns1="http://xxxx.xx/webservices/organisatie">
IOException:Child creation error: no such device or address
</ns1:HasMedewerkerReadPermissionResult>
</hasmedewerkerreadpermissionresponse>

It puzzled me a bit, until I realized that I hadn't setup the required system logical....And since I don't have the required code and files, I need to emulate them somehow.
But that was all expected to be done.

Ok, just a minor issue! Most important: IT ACTUALLY WORKS!

(Preview)
Let XStream do the translation - perhaps, it's better to use a file in stead of SYS$OUTPUT?
Waiting for the collegues to finish their test application, and find out why they get a 404 - page not found error som often.
(will be continued)

Other issues
Added one of the new 36Gb disk on Diana, fired up the second shelf (that is in the DSSI chain) and copied all data stored there onto the 36GB disk. Now that shelf can be taken off - and added to teh HSZ50.
Tried to start Advanced Server but it had too few Global Sections (requires 75 at least but none were free. Due to Java? Stopping Tomcat made no difference... So added another 100 to modparams.dat, to be used in the next autogen, install patches (are already on Diana) and reboot...
Or would I try 8.2 on Diana? Might be a good idea also (after backing up the current system disk once again)

0 Comments:

Post a Comment

<< Home