× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I took the original code and compiled it - other than the missing variables (expected because I don't have the /COpy file) I saw none of the errors the OP reported.

I'm suspicious as to how it was compiled.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On May 19, 2017, at 11:25 AM, Hiebert, Chris <chris.hiebert@xxxxxxxxxxxxxx> wrote:

This message may be more appropriate in the rpg400-l group, as it appears to be a question on an RPG Compile.

Did you look at the compile listing?
The error messages will give you the Line number of where the error is.
I doubt everyone has time to determine what message id's mean, so you should probably include the message text:

RNF0256. Specification found between procedures
RNF0257. Form-Type entry for main procedure not valid or out of sequence
RNF7023. The Compiler cannot determine how the program can end.


Just in case the RNF0256 is generated for a rouge comment, you could convert all Comments to // instead of *, otherwise make sure the * is in column 7.

Are you on V7R1?

Are you using RDI?

You might need to show what is in JGVWSDL/QWSDL2RPG,WS000101.

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Jan Grove Vejlstrup
Sent: Friday, May 19, 2017 6:34 AM
To: web400 Midrange <web400@xxxxxxxxxxxx>
Subject: [WEB400] Using WSDL2RPG to generate testprogram

Hello,

I've just loaded and installed the program WSDL2RPG. Now I try to generate a little test-program for the web-service WriteBizMessage described in the wsdl:

http://igh2.exigo.ch/DataExpert2/DE_WebService.svc?singleWsdl

The generated program comes here:

* =====================================================================
* Generated by WSDL2RPG 1.16.5 / 08.03.2017
* Built on Mai 19, 2017 (13:59:27)
* Built for V7R2M0
* Based on WS_PGM 1.16.5 - 08.03.2017
*
=====================================================================
* Sample program to show how to call the
* BasicHttpBinding_IDE_WebService_WriteBizMessage()
* Web service.
*
=====================================================================
* Pre-Compiler tags used by STRPREPRC to retrieve creation
* commands from the source member.
*
---------------------------------------------------------------------
* >>PRE-COMPILER<<
* >>CRTCMD<< CRTRPGMOD MODULE(&LI/&OB) +
* SRCFILE(&SL/&SF) +
* SRCMBR(&SM);
* >>COMPILE<<
* >>PARM<< TRUNCNBR(*NO);
* >>PARM<< DBGVIEW(*LIST);
* >>PARM<< OPTION(*EVENTF);
* >>END-COMPILE<<
* >>EXECUTE<<
* >>CMD<< CRTPGM PGM(&LI/&OB) +
* MODULE(*PGM) +
* BNDSRVPGM(*LIBL/WS000 +
* *LIBL/WSDL2RPGRT +
* ) +
* DETAIL(*BASIC) +
* ACTGRP(*NEW);
* >>END-PRE-COMPILER<<
*
=====================================================================
H DEBUG
H OPTION(*SRCSTMT : *NODEBUGIO)
H EXTBININT(*YES)
*
FQSYSPRT O F 80 PRINTER OFLIND(*in70)
*
* Include generated web service stub module to
* define the prototype of the web service procedure
* and the required type definitions (aka reference fields).
/DEFINE PROTOTYPE_WS000101
CPY /COPY JGVWSDL/QWSDL2RPG,WS000101
/UNDEFINE PROTOTYPE_WS000101
*
* Program entry point
D WSKWC001...
D PR
*
* Prints a given message to QSYSPRT.
D printMsg...
D PR extproc('print')
D i_text 128A value varying options(*nopass)
*
* Sends a message to the command line.
D sndMsg...
D PR extproc('sndMsg')
D i_text 128A value varying
*
*
=====================================================================
* Program entry point
*
=====================================================================
D WSKWC001...
D PI
*
* Web service error message text
D errText S like(wsdl_errText_t ) inz
*
* Request SOAP headers and message
* These fields needs to be filled with reasonable values
* right before calling the web service.
D parameters DS likeds(tns_WriteBizMessage_t)
D inz
* Response SOAP headers and message
* This structure contains the result values returned by
* the web service.
D WriteBizMessageResponse...
D DS likeds(tns_WriteBizMessageResponse_t)
D inz
*
* Text of messages sent to the command line
D text S 128A varying inz
*
* Dynamic array index fields
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/free

// Enable/disable http api debug log
// (Enable the http api debug log in case of problems with the web service)
// BasicHttpBinding_IDE_WebService_Port_setHttpDebug(
// *ON: '/tmp/httpapi_debug.txt'); // Default path of
http api

// Specify a proxy server if your network requires it.
// BasicHttpBinding_IDE_WebService_Port_setHttpProxy(
// 'your.proxy.server': 8080);

// Set the parameter values of the request message
// of the web service.
// assign values here
parameters.username = 'string';
parameters.password = 'string';
parameters.bizMsg = 'string';
parameters.attachment.Content = 'base64';
parameters.attachment.FileExtension = 'string';

// Enable preemptive authetication
// 1. parameter: WSDL_AUTH_BASIC or WSDL_AUTH_MD5_DIGEST
// 2. parameter: (optional) cTrue for proxy authentication
// cFalse for server authentication
(default)
// BasicHttpBinding_IDE_WebService_Port_setPreemptiveAuthentica...
// tion(
// WSDL_AUTH_BASIC);

// Now let's call the web service.
WriteBizMessageResponse =
BasicHttpBinding_IDE_WebService_WriteBizMessage(
parameters:
errText);

// If the Web service finished successfully ...
B01 if (not BasicHttpBinding_IDE_WebService_Port_isError());
// ... get response data from response data structure

sndMsg('*** Success ***');
X01 else;
// ... else show error messages ordered by priority:
// 1. HTTP error information
text = %char(
BasicHttpBinding_IDE_WebService_HttpError_getCode()
) + ': ' +
BasicHttpBinding_IDE_WebService_HttpError_getText()
;
sndMsg(text);
// 2. SOAP error information
B02 if (BasicHttpBinding_IDE_WebService_SoapError_getCode()
<> '');
text = BasicHttpBinding_IDE_WebService_SoapError_getCode()
+ ': ' +
BasicHttpBinding_IDE_WebService_SoapError_getText()
;
sndMsg(text);
E02 endif;
// 3. XML parser error information
B02 if (BasicHttpBinding_IDE_WebService_XmlError_getCode()
<> 0);
text = %char(BasicHttpBinding_IDE_WebService_XmlError_get...
Code())
+ ': ' +
BasicHttpBinding_IDE_WebService_XmlError_getText()
;
sndMsg(text);
E02 endif;
E01 endif;

B01 if (%open(QSYSPRT));
close QSYSPRT;
E01 endif;

*inlr = *on;

/end-free
*
*
=====================================================================
* *** private ***
* Prints a given message to QSYSPRT.
*
=====================================================================
P printMsg...
P B
D PI
D i_text 128A value varying options(*nopass)
*
* Local fields
D lineOutput DS 80 inz
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/free
B01 if (not %open(QSYSPRT));
open QSYSPRT;
E01 endif;
B01 if (%parms() >= 1);
lineOutput = i_text;
E01 endif;
write QSYSPRT lineOutput;
/end-free
P E
*
*
=====================================================================
* *** private ***
* Sends a message to the command line.
*
=====================================================================
P sndMsg...
P B
D PI
D i_text 128A value varying
*
* Local fields
D msgKey S 4A inz
*
* Qualified message file name
D qMsgF DS qualified inz
D name 10A
D lib 10A
*
* API error code
D errCode DS qualified inz
D bytPrv 10I 0
D bytAvl 10I 0
D excID 7A
D reserved 1A
D excDta 256A
*
* Send Program Message (QMHSNDPM) API
D QMHSNDPM PR extpgm('QMHSNDPM')
D i_msgID 7A const
D i_qMsgF 20A const
D i_msgData 32767A const options(*varsize )
D i_length 10I 0 const
D i_msgType 10A const
D i_callStkE 32767A const options(*varsize )
D i_callStkC 10I 0 const
D o_msgKey 4A
D io_ErrCode 32767A options(*varsize )
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/free
clear qMsgF;
qMsgF.name = 'QCPFMSG';
qMsgF.lib = '*LIBL';
clear errCode;
errCode.bytPrv = %size(errCode);
QMHSNDPM('CPF9897': qMsgF: i_text: %len(i_text): '*INFO'
: '*CTLBDY': 1: msgKey: errCode);
return;
/end-free
P E
*
If I compile it I receive the messages RNF0256, RNF0257 and RNF7023. I can't find the reasons for these messages. What do I do wrong?

Best regards

Jan



--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.