0
1
Daryl Foster Wednesday, 27 April 2022 12:32 AM UTC #2

Hi Kenneth,

1. Can you share a screen shot or details of the Postman call which works. I find that if I have a working Postman example it is usually pretty straightforward to convert that to Powerbuilder.

2. Is the API one that you have written?  The route attribute seems to show that you pass all the arguments in the url path, including an xml document which seems pretty strange.  You would normally post any data in the body of a request, not part of the url path.

3. In your Powerbuilder code you are sending ls_json in your Http request, but it isn't set to a value. The ls_parameter variable isn't used at all in that code either. What data exactly are you trying to send to the api?

0
Andreas Mykonios Wednesday, 27 April 2022 05:53 AM UTC #3

As Daryl Foster mentioned you want to pass xml file, but content-type is set to "application/json;charset=UTF-8". If you want to pass xml, content-type should be set to "application/soap+xml" or "xml" or text "text/xml"... Actually the correct value for content-type should be provided by web service documentation..

Andreas.

2
Marcin Jurkowski Wednesday, 27 April 2022 09:26 AM UTC #4

This it the code I'm using to upload XML file to the API server for processing. Maybe you can re-use it for your project with some adjustments.

 

 

Attachments (1)