Usecase: Here we have a requirement that Source will send xml payload using our exposed or triggered SOAP API and then we will convert it to JSON format and store it in a variable to insert the json data into a database table.
Logic steps:
- Create a WSDL file and create a SOAP trigger connection.
- Create a App driven orcehstration and configure with the created soap connection
- Take a stage and write file with json sample and map the xml data to json data.
- Take stage again and read the json file using opaque schema
- Take a assign and create a variable and store the read file reference with decodebase64().
- Add tracking, save, activate , copy the wsdl and open a project in soap ui tool and add basic authentication and test
Opaque xsd:
https://soalicious.blogspot.com/2022/02/xsd-opaque-schema.html
Users.json:
{
"Users":{
"User":[
{
"id": 1,
"firstName":"string",
"lastName":"string",
"email":"string",
"country":"string"
},
{
"id": 2,
"firstName":"string",
"lastName":"string",
"email":"string",
"country":"string"
},
{
"id": 3,
"firstName":"string",
"lastName":"string",
"email":"string",
"country":"string"
}
]
}
}
Used oneway wsdl:
https://soalicious.blogspot.com/2023/08/wsdl-oneway-users-wsdl-file.html
Detailed with screenshots:
Soap connection:
No comments:
Post a Comment