Consume REST API request body (xml) into SAP BO - sap

How can i Consume REST API request body (xml) into SAP BO (IDT) or Crystal report for enterprise 2016.(not Designer)
NOTE - we don't want to introduce any WEB SERVICE here as a solution .
Brief: The requirement is to parse a XML received as part of request body in API and use that XML as a source to IDT and
generate PDF from that using Crystal Reports.
Thanks

I've never done it in the real world, but IDT does support raw XML files as a data source. When creating a new connection, select Generic -> XML Files -> XML File Connector.

Related

WSO2-Call an API to got file from SFTP

The story is that there is a SFTP server for .csv file, and client wants to call an API to get the .csv data in json format. How do I implement this business scenario with a wso2 esb(4.8.1)? Thanks a lot for any idea.
You can create an ESB API,
Use file connector to search and read the file
Use smooks mediator to convert the content in to XML
Use messageType and ContentType properties to convert the XML payload to JSON

Is the "SAP Netweaver Gateway adapter" capable of transforming odata Edm.DateTime into json

I'm just wondering if the SAP NGW adapter is capable of transforming odata Edm.DateTime into a json/javascript DateTime.
For example...
When retrieving formation from SAP, the following format is available in the odata document - "name_of_attribute": "/Date(1377561600000)/"
What we expect in json: "name_of_attribute" : "2012-04-23T18:25:43.511Z"
Although I can't find it in the documentation, does anyone know if this feature is implemented in the latest release of IBM MobileFirst foundation platform?
Many thanks!
Br.
Wim
The conversation from EDM to JSON format is not implemented in the NWG adapter. It returns the data it receives from the server directly.

How to handle files in an SOA architecture

I have an enterprise service bus with a collection of services. There is an HTML5 user interface that allows customers to perform all sorts of selfcare actions. The UI uses JavaScripts that communicate with the ESB in JSON format through an API server.
Now I want to offer the customer the possibility to upload documents. I can base64 the document and send it as a JSON field, but that doesn't seem right. What is a good pattern I could use?
It does not sound right because it is not right.
In this cases you should a write the file to a write only public FTP given it a GUID name and then send a message to the service giving details about the files. On the service side once a message with the file details is received, store the metadata in your persistence layer and copy the files to a private FTP.
Something like this:
Claim Check Pattern

WCF Data Services version 5.0 and Json

I want my OData service to support Json serialization, I read about a WCF Data Service toolkit which add this behaviour to the V2 version. After I read WCF Data Service released a new version of WCF Data Service 5.0, I need to know how to do it.
I add the $Format=json and I get all the time this attribute isn't supported.
Any suggestion .
Thanks in advance ...
The usual way to request JSON is to use Accept header (basically following HTTP, if the client wants a certain representation of the response, it should ask for it in the Accept header).
So if you send Accept: application/json;odata=verbose, you will get the Verbose JSON response.
WCF Data Services currently doesn't implement the $format query option. But you can add it "on top". There are several ways to do this (just search the web). One of them is for example here: http://archive.msdn.microsoft.com/DataServicesJSONP

Transfer XML between systems with Biztalk and WCF

I have system A which produces an xml-file and system B which takes the file. How can I implement this exchange using Biztalk with WCF?
You have two possible different solutions as I see it and it basically comes down to how typed you WCF service needs to be.
Do you need to transform you message into a new format? Or are you planning to use other features in BizTalk as content based routing etc? Are you at all interested in the content of the message while in BizTalk are you OK with just passing it thru?
If you are looking for a solution with the capabilities as described above you'll need to get the schema for the XML message you want to receive into WCF service and publish that service. Once the message is in BizTalk it's then typed and you can do what ever with it using BizTalk.
If you however just want to pass it thru you could just publish a service that received as message of type XML document and pass that thru. Here's a good post describing the a few different techniques to create a generic service accepting any XML as input.