[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WSDL2RPG Logging Interpretation



Mike,

> I've also seen references to amending these option settings
> programmatically in the generated code. Which is the most
> appropriate method to use?

So far there is no way to directly enable Log4rpg in the generated stub
mdoule. I do not think that it is necessary to enable Log4rpg in the
generated stub module, because I do not know what to log there. Usually
the HTTP debug log is enough. However if you want to use Log4rpg in your
stub module, then first include PLOG4RPG (from the Log4rpg package) in
your stub module and then configure Log4rpg. The best way to configure
Log4rpg is to use a member or a stream file because then you can change
the configuration settings without recompiling your code. However it is
also possible to "hard code" the Log4rpg configuration in your stub module
as shown here:

Log4rpg configuration for Chainsaw:

// Create Chainsaw configuration
Configurator_clearConfiguration();

g_hLogger = Logger_getLogger(i_logger);
Logger_setLevel(g_hLogger: cLOG4RPG_LEVEL_DEBUG);

hLayout = Layout_new('*LIBL/LOG4RPG(XMLLayout)');

hFilter = Filter_new('filter'
                     : '*LIBL/LOG4PROFLT(PropertyFilter)'
                     : 'property.application=myApplication');

hAppender = Appender_new('appender'
                         : '*LIBL/LOG4SCKAPP(XMLSocketAppender)'
                         : 'remoteHost=' + getPcTcpIpAddr() + '; +
                            port=54322;');

Appender_setLayout(hAppender: hLayout);
Appender_setFilter(hAppender: hFilter);
Logger_addAppender(g_hLogger: hAppender)

(getPcTcpIpAddr() is a simple function that returns the TCP/IP address of
the 5250 client.)


> Have I done everything correctly so far? Is there more?

Perfectly. I greatly appreciate the energy you spend to get used to all
these new things.

> I've down-loaded all the xsd files (13 in all, so I won't be posting
> them) but when I run the WSDL2RPG command, I get two warning
> messages and then crash:
>
> Warning: Element 'harmony:propertyRef' does not have child elements.
>   Empty <sequence> tag encountered in WSDL file.
> Warning: Element 'harmony:HarmonyKeyRef' does not have child elements.
>   Empty <sequence> tag encountered in WSDL file.
> Application error.  MCH3601 unmonitored by WSDL2RPG at statement
>   0000212800, instruction X'0000'.

Usually a MCH3601 (Pointer not set) message is issued when there are
things in the WSDL file that WSDL2RPG does not yet understand. Most of the
time MCH3601 is sent when a required type definition could not be found.
For example a MCH3601 message was sent before I enhanced WSDL2RPG to
support XSD "restriction" and "extension" of types.

The "Element '...' does not have child elements." message is sent, when a
complex type is defined as a sequence but does not contain any child
elements. Sometimes this technique is used to send any XML elements:

 <xsd:element name="getAnyXml">
  <xsd:complexType>
   <xsd:sequence>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>

I do not believe that the MCH3601 message has something do to with that
warning message.

> I was wondering if WSDL2RPG has limits on how many levels of nesting
> there might be? Or whether it makes assumptions about the structure
> of the WSDLs?

There are no limits of how many levels there might be in the WSDL file,
but of course WSDL2RPG dows not yet support everything that is possible in
a WSDL file.

> I now have a (very large) log file.
> I discovered that I could put WSDL2RPG into debug mode and stepped
> into it, but all I discovered was that the warning messages above

Analysing the log file is a pain as well as debugging WSDL2RPG when you do
not know the structure of WSDL2RPG.

Last but not least please send the WSDL and the XSD files to my e-mail
address. Otherwise I have no chance to reproduce and locate the error.

Regards,

Thomas.




ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 30.03.2010 05:28:53:

> Von:
>
> Mike.Pantzopoulos@xxxxxxxxxx
>
> An:
>
> ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>
> Datum:
>
> 30.03.2010 05:36
>
> Betreff:
>
> WSDL2RPG Logging Interpretation
>
> Gesendet von:
>
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
>
>
_______________________________________________________________________________________
>
> Note: This e-mail is subject to the disclaimer contained at the
> bottom of this message.
>
_______________________________________________________________________________________
>
>
> Having gone through the pain of baby steps with my R & D WSDL2 work,
> I am now trying to build our first production web service.
> Unfortunately the WSDL2RPG program is failing. The service has 13
> separate xsd files so I won't post them here. I would like to learn
> some more about debugging the log information first. I found an
> earlier posting by Thomas:
>
> 1. Open the member LOG4RPG (type PROPERTIES)
> 2. Change log4rpg=off to log4rpg=on
> 3. Put a '#' sign in front each line that starts with
> 'log4rpg.logger.WSDL2RPG.client'
> 4. Do not touch 'log4rpg.logger.WSDL2RPG.eXpatAdapter' because you
> do not really want
>     to see the debug messages of this module.
> 5. Change 'log4rpg.rootLogger=ERROR, chainsaw' to
> 'log4rpg.rootLogger=DEBUG, file'.
>
> I now have a (very large) log file.
>
> I've also seen references to amending these option settings
> programmatically in the generated code. Which is the most
> appropriate method to use?
>
> I've also down-loaded the help file from your site (http://
> www.tools400.de/Downloads/Freeware/Service-Pgme/
> Log4rpg_Help_File_Win95__ENG_.zip) as per the same post and am
> trying to absorb that as well.
>
> Have I done everything correctly so far? Is there more?
>
> I've down-loaded all the xsd files (13 in all, so I won't be posting
> them) but when I run the WSDL2RPG command, I get two warning
> messages and then crash:
>
> Warning: Element 'harmony:propertyRef' does not have child elements.
>   Empty <sequence> tag encountered in WSDL file.
> Warning: Element 'harmony:HarmonyKeyRef' does not have child elements.
>   Empty <sequence> tag encountered in WSDL file.
> Application error.  MCH3601 unmonitored by WSDL2RPG at statement
>   0000212800, instruction X'0000'.
>
> The two elements do not exist in any of the xsd files. Remember this
> is a service that is already being used successfully by our front-
> end, so I preume it's well-formed. All I'm trying to do is use the
> same service in our back-end legacy code so that we can use the
> green screen application normally when the browser interface is
unavailable.
>
> I was wondering if WSDL2RPG has limits on how many levels of nesting
> there might be? Or whether it makes assumptions about the structure
> of the WSDLs?
>
>
> When I look at the log file in /tmp the first reference to
> harmony:propertyRef is:
>
> 2010-03-30-12.26.19.954000 ?DEBUG? WSDL2RPG/WSDL2RPG
> (WSDL2R50).WSDL2R50_TypeDef_newType (26100) Created (*TYPE):
> harmony:propertyRef
> 2010-03-30-12.26.19.955000 ?DEBUG? WSDL2RPG/WSDL2RPG
> (WSDL2R59).produceReferenceType (109000) ... added helper reference
> type harmony:propertyRef to global types list.
>
>
> This service has 3 operations:
>
> Option  Web Services -> Port -> Operations
>         tns:HarmonyCAIWebService (service)
>            tns:HarmonyCAIWebServiceSOAP (port)
>               tns:GenerateKeys()
>               tns:MatchCustomerData()
>               tns:ParseCustomerData()
>
> I discovered that I could put WSDL2RPG into debug mode and stepped
> into it, but all I discovered was that the warning messages above
> are generated prior to the Select Operation screen appearing
> indicating that there is something wrong with the XSDs. Here is the
> point at which the warning message is issued:
>
> 15543
> 15544     // Check, whether child elements are present or not
> 15545     if (not TypeDef_hasChildren(type));
> 15546        clear USR0025;
> 15547        USR00251 = TypeDef_toString(type);
> 15548        AppMsg_sendToCmdLine(AppMsg_new('USR0025': USR0025));
> 15549     endif;
>
> And here is most of the type structure:
>
> TYPE.ISCHOICE = '0'
> TYPE.ISUSED = '0'
> TYPE.ISSEQUENCE = '1'
> TYPE.ISQUALIFIED = '0'
> TYPE.ISEXTENSION = '0'
> TYPE.ISABSTRACT = '0'
> TYPE.ISSOAPENCODED = '0'
> TYPE.REFERENCESTYPE = '0'
> TYPE.ARRAYTYPE = '-           '
> TYPE.ARRAYID = 0
> TYPE.DIM = 0
> TYPE.LENGTH = -1
> TYPE.FRACTION = -1
> TYPE.DEFTYPE = '*TYPE'
> TYPE.RESERVED_1 = '               '
> TYPE.QNAME.LNAME =
>           ....5...10...15...20...25...3
>      1   'propertyRef
>     61   '
>    121   '
>    181   '
>    241   '
>    301   '
>    361   '
>    421   '
>    481   '
> TYPE.QNAME.NSPREFIX = 'harmony
> TYPE.QNAME.NSVALUE =
>           ....5...10...15...20...25...30...35...40...45...50...55...60
>      1   'urn:mastersoft.com.au:harmony:cai:ServiceEndpointInterface  '
>     61   '                                                            '
>    121   '                                                            '
>    181   '                                                            '
>    241   '                                                            '
>    301   '                                                            '
>    361   '                                                            '
>    421   '                                                            '
>    481   '                                '
> TYPE.QTYPE.LNAME =
>           ....5...10...15...20...25...30...35...40...45...50...55...60
>      1   '                                                            '
>     61   '                                                            '
>
>
> And I get the same messages as above when I select any of these
operations.
> It appears that WSDL2RPG is creating a new type???
>
> Thanks for your time Thomas.
>
>
>
>
>
>
>
>
_______________________________________________________________________________________
>
> The information transmitted in this message and its attachments (if
> any) is intended
> only for the person or entity to which it is addressed.
> The message may contain confidential and/or privileged material. Any
review,
> retransmission, dissemination or other use of, or taking of any
> action in reliance
> upon this information, by persons or entities other than the
> intended recipient is
> prohibited.
>
> If you have received this in error, please contact the sender and
> delete this e-mail
> and associated material from any computer.
>
> The intended recipient of this e-mail may only use, reproduce,
> disclose or distribute
> the information contained in this e-mail and any attached files,
> with the permission
> of the sender.
>
> This message has been scanned for viruses.
>
_______________________________________________________________________________________
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------


--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------