Monday, September 7, 2020

Xml to Json conversion issue in REST

 I had a requirement to convert XML to JSON format using rest receiver channel.

I wanted to remove the root JSON tag in the receiver channel.


My DT was

DT_Company

 Record

   Field

     field1

     field2

   Field3

   Field4

   Field5   


Refer note - 

2743939 - XML Payload to JSON Conversion in REST receiver adapter


I used setIgnoreElements and provided value Records to remove JSON tag in Module configuration

 and checked Strip out element in the receiver channel 













This works fine for single record.

Note ->

But in case of multiple records, this doesn't work.

I also haven't explored on this part yet, but seems that this can be sorted out using XML JSON Conversion Rules.

Helpful link - 

https://blogs.sap.com/2016/01/13/rest-adapter-in-sap-pipo-enhanced-xmljson-conversion/



AMOR FATI - LOVE OF FATE


Unable to see response message for SOAP Synch. setup

 I was able to get the response in SOAP UI but was not able to see any response message in message monitoring.


Steps taken to resolve the issue - 

Enable logging and staging in ICO









If want the response before mapping, then  add BI=3 like this 

BI=3,MS=3,AM=3


https://help.sap.com/viewer/6dbe2ddcde6a4087858c533f8032445b/7.31.25/en-US/48cbb487cea80783e10000000a42189d.html




AMOR FATI - LOVE OF FATE



SFTP sender channel not picking up files

 Recently for one of the interfaces configured, my Sender sftp channel was not picking up the files. 

FCC was configured for this channel (via module)

Initially, was getting dangling meta character error in the channel.

Filename pattern configured was   *.*








After that, changed it to only    .*


faced the below issue then -> channel was not picking file yet








referred note 2763483 - SFTP Sender Channel Issue : File Not getting picked up

After including parameter ignoreIncompleteFields as YES in FCC, issue was Resolved.




AMOR FATI - LOVE OF FATE



Sunday, April 26, 2020

What is a Web Service?


Try to understand the below examples:

You are in a restaurant. How your orders are communicated with the Chef? The waiter is responsible for this right. So, here the waiter acts as a web service that makes sure that 2 systems communicate (here you and chef)

Another example, planning for a trip. Want to book tickets? Mostly, we will go to the MakeMyTrip app.
We get a list of all the airlines and we compare the prices. Ever wondered how MMT has all the data.

See, no airline will allow a third party to search in their website.
Another possibility might be that what if the airline is dumping data to MMT, but what if the status changed dynamically. This creates a risk.

All these airlines have exposed their web services through an API.

MMT uses those web services to communicate.


Web Service
- Service available over the web.
- Applications communicate over the web.
- Database independent like in the above example different companies may be using different databases.
- Follows a standard protocol.
- Platform Independent like one maybe Windows other Linux.


Who creates the web service?

A service provider creates them and makes it available on the internet.
The Provider provides & the Consumer consumes it.

Client (Consumer) and Server (Provider)

Client -> Request -> Server
Client -< Response -< Server

The medium of communication is HTTP / INTERNET

Format of communication is XML/JSON



AMOR FATI - LOVE OF FATE


Saturday, April 11, 2020

Using RemoveContext


The source structure is a FLAT structure and we want to map it to an Array as in Target.







                                                      AMOR FATI - LOVE OF FATE