cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error java.lang.IllegalArgumentException while making an HTTP outbound Call

Raj_Sajin
Discoverer
0 Likes
1,144

Getting the below error while making an HTTP outbound connection from CPI.

The same request for the HTTP call is working fine with Postman without any issues.

Error Details

java.lang.IllegalArgumentException: only ' ' and '\t' are allowed after '\n': <?xml version="1.0" encoding="UTF-8"?>

Also, I did check 3234004 - Encrypted message sent from Cloud Integration via HTTP adapter fails with Error, but it didn't helped either.

Accepted Solutions (0)

Answers (2)

Answers (2)

Raj_Sajin
Discoverer
0 Likes

Hi Vijay,

I did check that and there was no blank line as such. Even I tried manually creating the payload request to cross-check if additional spaces/blanks are coming via mapping, which also failed with the same error.

The same request works from the postman (manually created one and the one from iFlow).

VijayKonam
Active Contributor
0 Likes

You have newline character in your test XML before XML declaration. Remove that/blank line from XML and you should be good.