Thanks again Duane!
Can you point me to documentation explaining "a user condition handler?"
I am not familiar with the term. I am familiar with the use of *PSSR
and Monitor within the RPGLE program.
Does "a user condition handler" serve the same purpose as wrapping a
MONMSG after a CALL in CL to a program?
I am trying to get a feel of how much defensive code and error handling
needs to be part of a program which is to be exposed as a web service.
Best regards and thanks,
Bill Blalock
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Christen, Duane J.
Sent: Friday, May 30, 2008 2:39 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Web Services -- need suggestions on how to
handledatastructuresfor programs to be used as Web Services
Bill,
I use a user condition handler, which caught the un-handled exception
and reported back to the web service through the noteResponse structure.
Monitor and *PSSR are also viable, depending on what you need to return
to the caller and what works best for you. The joblog message wasn't
helpful and when I would try to catch the program in WDSC-Debug (Service
Entry Points) the debug would fail unexpectedly.
I had the tester send me the XML he was using to test and noticed that
he had 3 characters set for a 1 character field. After I fixed the XML
it worked fine. I then set the prefrences on the WSDL and sent it back
to the tester.
If I wern't confortable with user condition handlers, I would use the
Monitor, something like:
Monitor;
// validate input structure
// web service logic
On-Error;
// set return structure values for an unexpected error
// include the job (number/user/name)
End-Mon;
Some othere tools you might find helpful:
The WDSC Service Entry Points are great for debuging web services.
WDSC Job Filter pools work great for finding the jobs that are running
your web service. Use QUSER for the Job User and the profile you
supplied to the web service wizard when you created it.
Use the NETSTAT menu option 3 "Work with TCP/IP Connection Status"
F13-local port and F14 to look for the webservice port number to find
the listener
Duane Christen
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Blalock, Bill
Sent: Friday, May 30, 2008 1:10 PM
To: Midrange Systems Technical Discussion
Subject: RE: Web Services -- need suggestions on how to handle
datastructuresfor programs to be used as Web Services
Thank you Daune!
Part way there...
What happened when the program blew up? Did the error bubble up and
generate some response to the web service requestor? Did the program
hang up in an obscure job and subsystem waiting for a response?
I ask because I was wondering how to handle exceptions in RPG programs /
service programs exposed as web services. Some of our programs assume
the best case and leave it to the operator to sort out errors -- or to
automatic responses and MONMSG is the calling CL.
Again, thanks
Bill Blalock
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Christen, Duane J.
Sent: Friday, May 30, 2008 11:29 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Web Services -- need suggestions on how to handle
datastructuresfor programs to be used as Web Services
Bill,
I don't know if you have gotten an answer on this or not but here goes.
It's not that clever, it does expose the structure(s) as you would
expect but it does not put limits on the length of the character/string
fields. I discovered this the hard way.
The tester didn't know any better (sometimes a good thing) so they were
putting values larger than were defined and the service was not working
correctly.
To fix it you have to edit the WSDL and change the properties
appropriately for each sub-field in the template structures. (The
properties of the actual structures where inherited from the template
structures)
This is the PCML for my NoteServices web service:
http://code.midrange.com/e53516a5ab.html
The web service wizard built the following WSDL:
http://code.midrange.com/be8f37197a.html
Duane Christen
NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named. Any use,
copying, or disclosure by any other person is strictly prohibited. If
you have received this transmission in error, please notify the sender
via e-mail.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
______________
The information contained in this message is proprietary and/or
confidential. If you are not the
intended recipient, please: (i) delete the message and all copies; (ii)
do not disclose,
distribute or use the message in any manner; and (iii) notify the sender
immediately. In addition,
please be aware that any message addressed to our domain is subject to
archiving and review by
persons other than the intended recipient. Thank you.
_____________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________
NOTICE: This electronic mail transmission may contain confidential
information and is intended only for the person(s) named. Any use,
copying, or disclosure by any other person is strictly prohibited. If
you have received this transmission in error, please notify the sender
via e-mail.
As an Amazon Associate we earn from qualifying purchases.