1. Bjarne Anker
  2. PowerBuilder
  3. Tuesday, 11 August 2020 14:00 PM UTC

Hi.

 

Is there any known limitations in HttpClient.sendrequest() when it comes to the size of the "payload"?

I have successfully managed to invoke a SOAP WS service using HTTPClient now.

There are to methods available - GetVersion (no args) and Convert(xml arg).

GetVersion works just fine, but Convert returns -1.

The body in the sendrequest contains the SOAP envelope as described in the WSDL, and the XML which should be converted is a part of the body. Right now its approx. 20 KB in size, so not that big at all.

 

The same operation works just fine in both SOAP UI and PostMan.

Both methods are invoked with POST, text/xml and so on.

 

br,

 

Bjarne Anker

Maritech Systems - Norway

Accepted Answer
Marco Meoni Accepted Answer Pending Moderation
  1. Tuesday, 11 August 2020 14:17 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi there,

Appeon suggests to use PostData/Start/End in place of SendRequest when payload is some MBs, which doesn't seem to be your case.

Rather, did you remember to set up the proper content type before sending the request?

httpclient.SetRequestHeader("Content-Type", "text/xml;charset=UTF-8")

 

Best,

.m

Comment
  1. Bjarne Anker
  2. Tuesday, 11 August 2020 18:33 PM UTC
It works now.

I was setting the correct content-type, but also content-length for some reason.

When I removed the setrequestheader for "content-length" the statuscode is 200 and my converted XML is returned.



Thanks :)



Bjarne
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.