WSO2 Data Mapper Mediator - wso2

Is it possible to use the mapping technique with the dynamic input/output?. Because WSO2 documentation shows only the input/output from the file system.
Basically I would like to map output of one webserive as input of the other webservice

As long as you know the schema of the output and the expected schema for the input, this can be done. [1] provides a sample where an output from a web service is written to a csv file using the data mapper. In a similar manner if the schema is known of the input and the output your requirement can be achieved.
[1] http://chathurikaerandi.blogspot.com/2016/07/mapping-to-csv-and-writing-output-to.html
Thanks
Erandi

This can be solved by writing the custom sequence and use as a mediator in the WSO2 ESB service creation. No straight forward way yet

Related

wso2 esb poll files, read data, transform data publish record message

My tech req is the following :
Poll CSV Files
Read Data line by line
Transform data to desired format
convert to JSON/XML
Publish data thru REST/JMS
Deploy in WSO2 EI6.1.1
How is this possible in DS Tooling 3.8.0 of WSO2 ?
I know inbound endpoints,mediators,sequences proxy services etc can be used, but cant find a single document/article that helps in doing this.
Where do I start? How do I sequentially execute these steps? Artifacts are independently created, but dont how to automate them to an integration flow.
Appreciate if someone can shed some light.
Solution :
Create empty ESB solution project.
Create Proxy-Service.
Use Smooks-config for tranformation of CSV flat data to XML format
Create endpoint, for producing JMS messages to JMS queue of ActiveMQ.
Use datamapper mediator, if transformation is required
Use log mediator , for logging.
Use property mediator for setting endpoint related properties.
Config - axis2.xml,axis2Client.xml for enabling transport settings on E1611.
Export to CAR file, deploy on EI611 management console.
Happy Testing!!

WSO2 Data services server Input and Output mapping for Integer type

I am using WSO2 DSS 3.2.2 connecting to a SQL Server 2008 database. I have a sql query that takes in an int input. The input mapping allows for "Integer" type mapping. In the output mapping to the SQL resultset, we are mapping this same field (the column is returned in the resultset) also to type "Integer". Once the Data Service is saved/compiled, the wsdl maps the input paramater to xs:int and the output parameter to xs:integer. Is it possible to map the field to xs:int in DSS? Why does DSS map integer to xs:integer?
thanks!
Eric
You can change integer to int as given below.
Go to service dashboard of your service. Then click on "Edit Data Service (XML Edit)" hyperlink as shown below.
When your data service's XML configuration is loaded, please change integer to int as shown below.
Next, save your changes and allow service deploy again. Once, it is redeployed, go to WSDL file and you will able to see that integer has been changed to int

WSO2 integration approach

We are planning to use WSO2 in the scenario where we are receiving a file from people soft application with customer/user details (file size: approx 2GB) and that need to be inserted in SAP success factor. We want to use the WSO2 product for integration between People soft and SAP. We were looking into some of the WSO2 product to achieve this, like DSS for streaming file or batch processing and ESB to use for our scenario.
Can DSS/ESB help in our scenario for streaming the data from file and call SAP webservice to create user?
Is there any approach in WSo2 Product to read row by row from source (here txt /csv file) and then do transformation and then call webservice to create data in target system. Please advise.
You can read a file in streaming mode with WSO2 ESB (with a "VFS" proxy) and use smooks mediator with a smooks config file describing your csv structure.
You will find different samples over the net, one of them : http://vvratha.blogspot.fr/2014/05/processing-large-text-file-using-smooks.html
In most of the samples, when smooks split the content of your huge file in small parts, routing fragments in JMS or in other files, you will find a "highWaterMark" in the config with an attribute named "mark" with a huge value : you absolutly need to replace this value with -1 to avoid poor performance

REST-WebService that takes csv which itself gets modified with SpringBatch

My task is to write a REST WebService that can take a csv. This csv should then be modified via SpringBatch. I either worked with WebServices nor did i work with SpringBatch.
Can you give me a short intro of how to achieve my task?
Short example on rest webservice you can find here
You can get spring batch exampe here. You can use merge example 2 and example 4 of itemreader and itemwriter and itemprocessor.
Refer here to call spring batch from rest service layer

JItterBit HTTP Endpoint

I am working to set up a HTTP Endpoint in JitterBit, for this end point we have a system that will call this Endpoint and pass parameters through the URL to it.
example...
http://[server]:[server port]/EndPoint?Id={SalesForecID}&Status={updated status in SF}
Would i need to use the Text File, JSON or XML Method for this? Follow up question would be if it is JSON or XML what would the file look like that is uploaded during creating the endpoint. I have tired with no success with the text file version.
any help would be great.
I'm just seeing your question now. You may have found a solution, but this took me a while to figure out, so I'll respond anyway.
To get the passed values, go ahead and create your HTTP Endpoint and add a new operation triggered by it. Then, in your new operation create a script with something like the following:
$SalesForceID = $jitterbit.networking.http.query.Id
$UpdatedStatus = $jitterbit.networking.http.query.Status
You can then use these variables elsewhere in your operation chain.
If you want to use these values to feed into another RESTful web service (i.e. an HTTP Source), you'll have to create a separate transformation operation with the HTTP Source. You'd set that source URL to be: http://mysfapp.com/call?Id=[SalesForceID]&Status=[UpdatedStatus]. I'm not sure why, but you can't have the script that extracts the parameters from the Endpoint and the HTTP Source that uses those in the same operation.
Cheers