× 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 have been creating many xml & soap documents from the iSeries and 
placing on the IFS for WebServices reasons and I use CGIDEV2 and it works 
great! I love it.. Scott has created some great Club Tech iSeries 
Programming Tips Newsletters on the subject that I would take a look @ if 
you have a chance....


Example Template

/$HEADER
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <env:Body 
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
                <m:SubmitTransaction xmlns:m="com.netdirector.webservice">
                        <userid xsi:type="xsd:string">210</userid >
                        <password xsi:type="xsd:string">*autome@</password 
>
                        <xmlstring xsi:type="xsd:string">
                        &lt;TRANSACTION ITEM_GROUP="/%CLICD%/" 
ITEM_IDENTIFIER="/%CASNO%/" RECIPIENT_ID="/%RECID%/" SENDER_ID="PIERCE" 
STATE="**" SUB_TYPE="MORTGAGE" TRANSACTION_DATE="/%CURDT%/" 
TRANSACTION_TYPE="STD_EVENT"&gt;
        &lt;PAYLOAD&gt;
                &lt;SOURCE_REF&gt;/%SOURCEREF%/&lt;/SOURCE_REF&gt;
/$STD_EVENT.TH
                &lt;TRACKING_EVENTS&gt;
/$STD_EVENT.TB
                        &lt;TRACKING_EVENT&gt;
 &lt;EVENT_ACTION&gt;/%T.EVENT_ACTION%/&lt;/EVENT_ACTION&gt;
 &lt;REF_NUMBER&gt;/%T.REF_NUMBER%/&lt;/REF_NUMBER&gt;
 &lt;EVENT_TYPE&gt;/%T.EVENT_TYPE%/&lt;/EVENT_TYPE&gt;
 &lt;VENDOR_TO&gt;/%T.VENDOR_TO%/&lt;/VENDOR_TO&gt;
 &lt;VENDOR_FROM&gt;/%T.VENDOR_FROM%/&lt;/VENDOR_FROM&gt;
 &lt;COMPLETED_DATE&gt;/%T.COMPLETED_DATE%/&lt;/COMPLETED_DATE&gt;
 &lt;ORIGINAL_DATE&gt;/%T.ORIGINAL_DATE%/&lt;/ORIGINAL_DATE&gt;
 &lt;REFORECAST_DATE&gt;/%T.REFORECAST_DATE%/&lt;/REFORECAST_DATE&gt;
                                &lt;REASON&gt;/%T.REASON%/&lt;/REASON&gt;
                                &lt;NOTES&gt;/%T.NOTES%/&lt;/NOTES&gt;
 &lt;REPROJECT_ALL&gt;/%T.REPROJECT_ALL%/&lt;/REPROJECT_ALL&gt;
 &lt;CHL_UNIT&gt;/%T.CHL_UNIT%/&lt;/CHL_UNIT&gt;
 &lt;CHL_ADDRESS&gt;/%T.CHL_ADDRESS%/&lt;/CHL_ADDRESS&gt;
 &lt;CHL_AMOUNT&gt;/%T.CHL_AMOUNT%/&lt;/CHL_AMOUNT&gt;
 
&lt;CHL_PROPERTY_REVERTED&gt;/%T.CHL_PROPERTY_REVERTED%/&lt;/CHL_PROPERTY_REVERTED&gt;
 
&lt;CHL_THIRD_PARTY_NAME&gt;/%T.CHL_THIRD_PARTY_NAME%/&lt;/CHL_THIRD_PARTY_NAME&gt;
 &lt;CHL_TYPE&gt;/%T.CHL_TYPE%/&lt;/CHL_TYPE&gt;
 &lt;CHL_DESCRIPTION&gt;/%T.CHL_DESCRIPTION%/&lt;/CHL_DESCRIPTION&gt;
 
&lt;CHL_OVERNIGHT_TRACKING_NUMBER&gt;/%T.CHL_OVERNIGHT_TRACKING_NUMBER%/&lt;/CHL_OVERNIGHT_TRACKING_NUMBER&gt;
 &lt;CHL_COMMENTS&gt;/%T.CHL_COMMENTS%/&lt;/CHL_COMMENTS&gt;
 
&lt;CHL_VALUEORDERED_DATE&gt;/%T.CHL_VALUEORDERED_DATE%/&lt;/CHL_VALUEORDERED_DATE&gt;
 
&lt;CHL_VALUERECEIVED_DATE&gt;/%T.CHL_VALUERECEIVED_DATE%/&lt;/CHL_VALUERECEIVED_DATE&gt;
 &lt;CHL_START_DATE&gt;/%T.CHL_START_DATE%/&lt;/CHL_START_DATE&gt;
 &lt;CHL_END_DATE&gt;/%T.CHL_END_DATE%/&lt;/CHL_END_DATE&gt;
 
&lt;NT_VENDORSTEPIDENTIFIER&gt;/%T.NT_VENDORSTEPIDENTIFIER%/&lt;/NT_VENDORSTEPIDENTIFIER&gt;
 &lt;NT_USERNAME&gt;/%T.NT_USERNAME%/&lt;/NT_USERNAME&gt;
                        &lt;/TRACKING_EVENT&gt;
/$STD_EVENT.F
                        &lt;FORM&gt;
 
&lt;VENDOR_FORM_IDENTIFIER&gt;/%F.VENDOR_FORM_IDENTIFIER%/&lt;/VENDOR_FORM_IDENTIFIER&gt;
                                &lt;NTRID&gt;/%F.NTRID%/&lt;/NTRID&gt;
                                &lt;NTSID&gt;/%F.NTSID%/&lt;/NTSID&gt;
 &lt;FORM_NAME&gt;/%F.FORM_NAME%/&lt;/FORM_NAME&gt;
 &lt;FORM_ITEM_NAME1&gt;/%F.FORM_ITEM_NAME1%/&lt;/FORM_ITEM_NAME1&gt;
 &lt;FORM_VALUE1&gt;/%F.FORM_VALUE1%/&lt;/FORM_VALUE1&gt;
                                &lt;ACTION&gt;/%F.ACTION%/&lt;/ACTION&gt;
                        &lt;/FORM&gt;
/$STD_EVENT.C
                        &lt;COMMENTS&gt;
 
&lt;VENDOR_COMMENT_IDENTIFIER&gt;/%C.VENDOR_COMMENT_IDENTIFIER%/&lt;/VENDOR_COMMENT_IDENTIFIER&gt;
                                &lt;NTRID&gt;/%C.NTRID%/&lt;/NTRID&gt;
 &lt;COMMENT_DATE&gt;/%C.COMMENT_DATE%/&lt;/COMMENT_DATE&gt;
 &lt;USER_NAME&gt;/%C.USER_NAME%/&lt;/USER_NAME&gt;
 &lt;COMMENT&gt;/%C.COMMENT%/&lt;/COMMENT&gt;
                                &lt;ACTION&gt;/%C.ACTION%/&lt;/ACTION&gt;
                        &lt;/COMMENTS&gt;
/$STD_EVENT.TF
                &lt;/TRACKING_EVENTS&gt;
/$FOOTER
&lt;/PAYLOAD&gt;
&lt;/TRANSACTION&gt;
</xmlstring>
</m:SubmitTransaction>
</env:Body>
</env:Envelope>



Example Source that uses the template

// Update XML Header Fields
        updHtmlVar('CLICD' : %Trim(CliCod));
        updHtmlVar('CASNO' : %Trim(CaseNumBuk));
        updHtmlVar('RECID' : %Trim(SrvSr));
        updHtmlVar('CURDT' : %EditC(CurrentD:'Y'));
        updHtmlVar('SOURCEREF' : %Trim(CaseNumBuk));

       // Write the XML Header
        wrtsection('HEADER');

       Select;
         When SrvSr = 'VENDORSCAPE' or SrvSr = 'NEWTRAK';

           // Write Tracking Header
           wrtsection('STD_EVENT.TH');

           // Populate Tracking Body Values

           // Event Action (Comleted || Reprojected)
           TEvtBodyV(1) = %Trim(Action);
           updHtmlVar(%Trim(TEvtBodyC(1)):%Trim(TEvtBodyV(1)));

           // Servicer Reference Number
           TEvtBodyV(2) = %Trim(CaseID);
           updHtmlVar(%Trim(TEvtBodyC(2)):%Trim(TEvtBodyV(2)));

           // Event Type (aka Tickle Stage)
           TEvtBodyV(3) = %Trim(EvtTyp);
           updHtmlVar(%Trim(TEvtBodyC(3)):%Trim(TEvtBodyV(3)));

           // Client Code
           TEvtBodyV(4) = %Trim(CliCod);
           updHtmlVar(%Trim(TEvtBodyC(4)):%Trim(TEvtBodyV(4)));

           // From Identifier
           TEvtBodyV(5) = 'PIERCE';
           updHtmlVar(%Trim(TEvtBodyC(5)):%Trim(TEvtBodyV(5)));

           // Completed Date
           If ProcessD <> *Zeros and Action = 'COMPLETED EVENT';
             TEvtBodyV(6) = %EditC(ProcessD:'Y');
             updHtmlVar(%Trim(TEvtBodyC(6)):%Trim(TEvtBodyV(6)));
           endIf;

           // Forecasted Date
           If ProcessD <> *Zeros and Action = 'REPROJECTED EVENT';
             TEvtBodyV(8) = %EditC(ProcessD:'Y');
             updHtmlVar(%Trim(TEvtBodyC(8)):%Trim(TEvtBodyV(8)));
           endIf;

           // Uncompleted Event
           if Action = 'UNCOMPLETED EVENT';
             TEvtBodyV(9) = '119';
             updHtmlVar(%Trim(TEvtBodyC(9)):%Trim(TEvtBodyV(9)));
             TEvtBodyV(10) = 'Completed Item in Error';
             updHtmlVar(%Trim(TEvtBodyC(10)):%Trim(TEvtBodyV(10)));
           Else;

             // If we need to process Reason Codes ....
             If %Trim(Action) = 'REPROJECTED EVENT' and ReCode = *Blanks;
        RS001R(TransType:FrmID:CasNum:Action:EvtTyp:PrDate:SrvSr:Forc:
               ReCode:ReDesc);
             endIf;

             If Recode <> *Blanks;
               TEvtBodyV(9) = %Trim(ReCode);
               updHtmlVar(%Trim(TEvtBodyC(9)):%Trim(TEvtBodyV(9)));
               TEvtBodyV(10) = %Trim(ReDesc);
               updHtmlVar(%Trim(TEvtBodyC(10)):%Trim(TEvtBodyV(10)));
             endIf;
           endIf;

           // Reproject All Dates.... True || False
           If %Trim(Action) = 'REPROJECTED EVENT';
             If Forc = 'Y';
               TEvtBodyV(11) = 'True';
             Else;
               TEvtBodyV(11) = 'False';
             endIf;
           Else;
             TEvtBodyV(11) = 'False';
           endIf;
           updHtmlVar(%Trim(TEvtBodyC(11)):%Trim(TEvtBodyV(11)));

           // If NewTrak
           formfilled = 'N';
           If SrvSr = 'NEWTRAK';
               TEvtBodyV(25) = %Trim(CaseID);
               updHtmlVar(%Trim(TEvtBodyC(25)):%Trim(TEvtBodyV(25)));
               TEvtBodyV(26) = 'ndirector';
               updHtmlVar(%Trim(TEvtBodyC(26)):%Trim(TEvtBodyV(26)));
               If %Trim(EvtTyp) = '14' and %Trim(Action) = 'COMPLETED 
EVENT'
                  and %Trim(CliCod) <> 'EMC' and %Trim(CliCod) <> 'TAL';
                 formfilled = 'Y';
               endIf;
           endIf;

           // Write Tracking Body Values
           wrtsection('STD_EVENT.TB');

           // Fill Form for just Judgment for NOW
           If formFilled = 'Y';
             Open(e) @FcCase;
             Chain (FrmId:CasNum) @FcCase;
             If %Found(@FcCase) and fm_jdjAm <> *Zeros;
               TFormV(1) = %Trim(CaseNumBuk);
               updHtmlVar(%Trim(TFormC(1)):%Trim(TFormV(1)));
               TFormV(2) = %Trim(CaseID);
               updHtmlVar(%Trim(TFormC(2)):%Trim(TFormV(2)));
               TFormV(3) = 'NTFC0110';
               updHtmlVar(%Trim(TFormC(3)):%Trim(TFormV(3)));
               TFormV(4) = 'Judgment Amount';
               updHtmlVar(%Trim(TFormC(4)):%Trim(TFormV(4)));
               TFormV(5) = 'Judgment Amount';
               updHtmlVar(%Trim(TFormC(5)):%Trim(TFormV(5)));
               TFormV(6) = %EditC(fm_jdjam:'1');
               updHtmlVar(%Trim(TFormC(6)):%Trim(TFormV(6)));
               TFormV(7) = 'Complete';
               updHtmlVar(%Trim(TFormC(7)):%Trim(TFormV(7)));

               // Write Form
               wrtsection('STD_EVENT.F');
             endIf;
             Close(e) @FcCase;
           endIf;

           // Write Tracking Footer
           wrtsection('STD_EVENT.TF');
       endSl;                                                   

John Major
Information Services
Pierce & Associates, P.C.
312-476-5360
Fax- 312-476-5361
www.atty-pierce.com 

Pierce & Associates is a Designated Counsel for Freddie Mac for the State 
of Illinois. 
Pierce & Associates.  Where People and Performance Count. Everyday.

To compliment a job well done, please email compliment@xxxxxxxxxxxxxxx 

To let us know you are not satisfied with our performance or had a problem 
with a staff person, please email complaint@xxxxxxxxxxxxxxx

The contents of this e-mail message and any attachments are intended 
solely for the addressee(s) named in this message. This communication is 
intended to be and to remain confidential and may be subject to applicable 
attorney/client and/or work product privileges. If you are not the 
intended recipient of this message, or if this message has been addressed 
to you in error, please immediately alert the sender by reply e-mail and 
then delete this message and its attachments. Do not deliver, distribute 
or copy this message and/or any attachments and if you are not the 
intended recipient, do not disclose the contents or take any action in 
reliance upon the information contained in this communication or any 
attachments



"Mohammad Tanveer" <mtanveer@xxxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/14/2005 12:00 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
XML Processing






Anyone using new XML toolkit for iSeries in RPGLE?  Is there any simple
example just to read a simple XML using this toolkit? 

 

Anyone using DB2 XML Exterders? Is there any simple example?

 

Thanks


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.