|
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"> <TRANSACTION ITEM_GROUP="/%CLICD%/" ITEM_IDENTIFIER="/%CASNO%/" RECIPIENT_ID="/%RECID%/" SENDER_ID="PIERCE" STATE="**" SUB_TYPE="MORTGAGE" TRANSACTION_DATE="/%CURDT%/" TRANSACTION_TYPE="STD_EVENT"> <PAYLOAD> <SOURCE_REF>/%SOURCEREF%/</SOURCE_REF> /$STD_EVENT.TH <TRACKING_EVENTS> /$STD_EVENT.TB <TRACKING_EVENT> <EVENT_ACTION>/%T.EVENT_ACTION%/</EVENT_ACTION> <REF_NUMBER>/%T.REF_NUMBER%/</REF_NUMBER> <EVENT_TYPE>/%T.EVENT_TYPE%/</EVENT_TYPE> <VENDOR_TO>/%T.VENDOR_TO%/</VENDOR_TO> <VENDOR_FROM>/%T.VENDOR_FROM%/</VENDOR_FROM> <COMPLETED_DATE>/%T.COMPLETED_DATE%/</COMPLETED_DATE> <ORIGINAL_DATE>/%T.ORIGINAL_DATE%/</ORIGINAL_DATE> <REFORECAST_DATE>/%T.REFORECAST_DATE%/</REFORECAST_DATE> <REASON>/%T.REASON%/</REASON> <NOTES>/%T.NOTES%/</NOTES> <REPROJECT_ALL>/%T.REPROJECT_ALL%/</REPROJECT_ALL> <CHL_UNIT>/%T.CHL_UNIT%/</CHL_UNIT> <CHL_ADDRESS>/%T.CHL_ADDRESS%/</CHL_ADDRESS> <CHL_AMOUNT>/%T.CHL_AMOUNT%/</CHL_AMOUNT> <CHL_PROPERTY_REVERTED>/%T.CHL_PROPERTY_REVERTED%/</CHL_PROPERTY_REVERTED> <CHL_THIRD_PARTY_NAME>/%T.CHL_THIRD_PARTY_NAME%/</CHL_THIRD_PARTY_NAME> <CHL_TYPE>/%T.CHL_TYPE%/</CHL_TYPE> <CHL_DESCRIPTION>/%T.CHL_DESCRIPTION%/</CHL_DESCRIPTION> <CHL_OVERNIGHT_TRACKING_NUMBER>/%T.CHL_OVERNIGHT_TRACKING_NUMBER%/</CHL_OVERNIGHT_TRACKING_NUMBER> <CHL_COMMENTS>/%T.CHL_COMMENTS%/</CHL_COMMENTS> <CHL_VALUEORDERED_DATE>/%T.CHL_VALUEORDERED_DATE%/</CHL_VALUEORDERED_DATE> <CHL_VALUERECEIVED_DATE>/%T.CHL_VALUERECEIVED_DATE%/</CHL_VALUERECEIVED_DATE> <CHL_START_DATE>/%T.CHL_START_DATE%/</CHL_START_DATE> <CHL_END_DATE>/%T.CHL_END_DATE%/</CHL_END_DATE> <NT_VENDORSTEPIDENTIFIER>/%T.NT_VENDORSTEPIDENTIFIER%/</NT_VENDORSTEPIDENTIFIER> <NT_USERNAME>/%T.NT_USERNAME%/</NT_USERNAME> </TRACKING_EVENT> /$STD_EVENT.F <FORM> <VENDOR_FORM_IDENTIFIER>/%F.VENDOR_FORM_IDENTIFIER%/</VENDOR_FORM_IDENTIFIER> <NTRID>/%F.NTRID%/</NTRID> <NTSID>/%F.NTSID%/</NTSID> <FORM_NAME>/%F.FORM_NAME%/</FORM_NAME> <FORM_ITEM_NAME1>/%F.FORM_ITEM_NAME1%/</FORM_ITEM_NAME1> <FORM_VALUE1>/%F.FORM_VALUE1%/</FORM_VALUE1> <ACTION>/%F.ACTION%/</ACTION> </FORM> /$STD_EVENT.C <COMMENTS> <VENDOR_COMMENT_IDENTIFIER>/%C.VENDOR_COMMENT_IDENTIFIER%/</VENDOR_COMMENT_IDENTIFIER> <NTRID>/%C.NTRID%/</NTRID> <COMMENT_DATE>/%C.COMMENT_DATE%/</COMMENT_DATE> <USER_NAME>/%C.USER_NAME%/</USER_NAME> <COMMENT>/%C.COMMENT%/</COMMENT> <ACTION>/%C.ACTION%/</ACTION> </COMMENTS> /$STD_EVENT.TF </TRACKING_EVENTS> /$FOOTER </PAYLOAD> </TRANSACTION> </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 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.