-
I'm using PREW 'https://enotices2.preview.ted.europa.eu/esenders/api/v2/notice/notices/submit' to test the submission of the xml already validated by PREW CVS. I converted the CURL used in the SWAGGER UI
in JAVA
The response is "500 - Internal error" instead of the same response in the SWAGGER UI. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hello, If I understand correctly, the submit is successful when done in the SWAGGER UI, correct ? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hello, So the API call with java code gives error 500, whereas the API call via swagger or RESTer (Chrome plugin) gives error 400 when using the same parameters. Thank you. Stefan |
Beta Was this translation helpful? Give feedback.
-
Hello, We found an error in the logs Could you try to remove the semicolon Have a nice day, |
Beta Was this translation helpful? Give feedback.
Hello,
We found an error in the logs
2023-03-13T15:19:06.984Z [E] [13-03-2023 16:19:06.984 CET] [http-nio-8080-exec-41] [05e624ca-ea2b-463c-bc99-1f1d703fc54b] [eu.europa.ted.enotices2.notice.exception.RestExceptionHandler] [Unexpected error]
2023-03-13T15:19:06.984Z java.lang.RuntimeException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
Could you try to remove the semicolon
so instead of RequestBody.create(new File("path/to/file.xml;"), mediaType)
use RequestBody.create(new File("path/to/file.xml"), mediaType)
Have a nice day,
Stefan