Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows][Enterprise Integrator Documentation JSON to XML and Upload to FTP]Curl command in the doc does not work with Windows #716

Open
isuruuy429 opened this issue Dec 12, 2019 · 2 comments

Comments

@isuruuy429
Copy link
Contributor

Description:
Doc: https://ei.docs.wso2.com/en/latest/ballerina-integrator/learn/tutorials/integration-patterns-and-soa/converting-json-to-xml-and-upload-to-ftp/1/

Steps to recreate

  1. Navigate to VS code and create a project in the VSCode dashboard through the template 'JSON to XML Transformation and upload to FTP' in Windows.
  2. Follow the steps in the doc and build the module
  3. Run the jar and provide the curl command in the doc which is as below.

curl -H "application/json" -d @employees.json http://localhost:8080/company/employees

Expected: The file should be uploaded to FTP and the success message should be displayed.
Actual: Getting the following error

At line:1 char:31
+ curl -H "application/json" -d @employees.json http://localhost:8080/c ...
+                               ~~~~~~~~~~
The splatting operator '@' cannot be used to reference variables in an expression. '@employees' can be used only as an argument to a command. To reference variables in an        
expression use '$employees'.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : SplattingNotPermitted

PS: When the service was started in Windows and used the same curl command from a Linux machine, it worked as expected. If the curl command is different in Windows, we need to update the document.

Affected Product Version:
Ballerina Integrator 7.0.1
Ballerina version: 1.0.2

OS, DB, other environment details and versions:
Windows 10

@dulanjalidilmi
Copy link
Contributor

Can you list down files from the location you execute the curl command and check whether a file named employees.json is located? You can use the dir command to list down all files?

@Sumathi243
Copy link

Sumathi243 commented Jan 14, 2020

I tried this sample, am getting following error as response in Postman

{
"Message": "Error occurred uploading file to FTP.",
"Resason": "org.wso2.ei.b7a.ftp.core.util.BallerinaFTPException"
}

Please help me to sort the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants