Quotes

Thursday, March 30, 2017

TRIM Low values X'00

DECLARE StaticValueBlob BLOB CAST('StaticValue' AS BLOB CCSID InputRoot.Properties.CodedCharSetId);

  DECLARE parseOptions INTEGER BITOR(ValidateContentAndValue, ValidateException, ValidateComplete);
        DECLARE vAcctNum CHARACTER;
       
        CREATE LASTCHILD OF Environment.Variables
        DOMAIN 'DFDL';
               
        SET Environment.Variables.DFDL.SUBTREE = InputRoot.DFDL.ROOTRECORD.SUBTREE;
        SET vAcctNum = CAST(ASBITSTREAM(Environment.Variables.DFDL.SUBTREE OPTIONS parseOptions ENCODING InputRoot.MQMD.Encoding  CCSID InputRoot.MQMD.CodedCharSetId TYPE '{}:SUBTREE') AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId);


copy /Y "C:\Users\govi.reddy\IBM\IIBT10\workspace_dev\BARfiles\MadMoney.bar" "C:\Users\govi.reddy\IBM\IIB\IIB Services\MoneyMovement\Properties\Dev_MoneyMovement.bar"

SELECT ITEM segment.No
        FROM ControlRef.Segments.Segment[] AS segment
        WHERE segment.No = currentSegment;

Working solution:
DECLARE whiteSpace CONSTANT CHARACTER CAST( X'00' AS CHAR CCSID 1208);
TRIM(whiteSpace FROM InRef_RetCode.BE13501_RETURN_CODE)

Thursday, March 9, 2017

SOAP based webservice

1) Create new application.
2)New soap based message model with existing wsdl
3)new message flow
4)drag the wsdl onto the message flow edit on the new flow
5)this gives a skeleton etc. then write business transformation, routing logic's etc.

REST API and JSON sample message



1) New -->start by creating a REST API
2)give name, check radio button import resources and operations  ->next button
3)check radio button select from a file system to get the .json file.

Generating JSON sample message from xml/soap request..

1)copy soap request/JSON message in the the link to generate JSON from xml message http://www.freeformatter.com/xml-to-json-converter.html#ad-output

2)Remove Body{ and at the end closing bracket } from the message and update the first letter of the each field with small letter.

Validating JSON at the below link..

WSDL to Swagger Generator

Generate JSON/YAML swaggers from a WSDL

Installation

  1. Install Node.js >= v6.0.0 (https://nodejs.org/en/)
  2. Clone the repo from SAMI-GIT
    git clone https://git.xyz.com/NAWM_Tools/wsdl-to-swagger.git
    cd wsdl-to-swagger
    
  3. Install dependencies
    npm install
    

Usage

This script takes two inputs: 1) input WSDL file, and 2) output file. The output file needs to end with .json or .yml.
Example:
node wsdl-to-swagger.js example.wsdl example.json
Swagger validation: http://editor.swagger.io/