Maximum message size quota for incoming messages (65536) has been exceeded

I think it could not be this one, cause UiPath does not use robot anymore… but i dont know if you are executing from studio or unattended robot, so far i couldnt tell you which is the right config file you should be editing…

@bcorrea - I am executing from Studio - thanks!

Hi @sumitd

Could you provide more details about your implementation of the API call? Seeing the project would help us investigate the issue better.

Then i believe the file should be:
C:\Users\***\AppData\Local\UiPath\app-20.4.1\UiPath.Studio.exe.config

1 Like

@bcorrea - tried - same error!

@loginerror - implementation is here (you have helped with this earlier): Error while using "SOAP Request" activity - #7 by sumitd

1 Like

I’m back @sumitd

I found some more information:

The maxMessageSizeInMegabytes that can be found in UiPath.config is the right place to set it. Please try to increase that and give it another try after restarting the robot.

@loginerror - I did try that earlier - didn’t work. Got the same error - with the old size (65536).

I did a test for response size limits by going back to basics. Using the UiPath.Web.Activities.HttpClient I successfully downloaded a 14 meg file and saved it to my system by providing a value for the ResourcePath property. I did not adjust any configuration settings in the files mentioned above.
Image file downloaded is here: https://upload.wikimedia.org/wikipedia/commons/3/3d/LARGE_elevation.jpg
I think this shows UiPath can download a large response successfully so why is the above call constrained by the very small a size limit?

1 Like

Your test makes use of different activity tho…

This may be an issue with the UiPath code generated from the WSDL. This limit, 65536, is also set by default in the .NET Api Browser BasicHttpBinding.MaxReceivedMessageSize which appears to be part of the code base that gets called by UiPath. More info on this default setting is here: servicemodel.basichttpbinding.maxreceivedmessagesize.
I am working with Sumit and have reproduced this issue by calling a Soap UI MockService from UiPath. If someone at UiPath wants to look into this I can supply the UiPath project and the SoapUI project.

We solved this issue by using the underlying Service objects created by UiPath from our clients WSDL. The problem appears to be with the UiPath.Web.Activities.SoapClient which is setting the maximum acceptable return message size to 65536 bytes. By creating the client object without the activity we were able to set the maximum limit to a much higher value and successfully run our request. We used the Invoke Code Activity (but you wouldn’t have to) to set this up as follows:

Dim binding As BasicHttpBinding = New BasicHttpBinding()
binding.MaxReceivedMessageSize = Int32.MaxValue
Dim client As WSElectronicOrder.WSElectronicOrderSoapClient =
  New WSElectronicOrder. WSElectronicOrderSoapClient(
    binding, New EndpointAddress(“http://localhost:8088/mockWSElectronicOrderSoap”))

Dim request As GetOrderHistoryRequest = NewGetOrderHistoryRequest(“jlk”,“jlkj”,“20200614”,“jkjl”, “”)
response = client.GetOrderHistory(request)

4 Likes

So the activity is forcing that limit i suppose? Still this is not really a bug, but only a limit that should not be crossed as best practice no call should be that big, using code is a good workaround…

65536 bytes is a tiny response - many web services would return much larger values. This value by default is very high in the HTTP Client which is why I could get a 14 meg image without modifying any UiPath configurations. I would say this is a very serious limitation and providing an easier way to modify the MaxREceivedMessageSize for the Soap Client would be a real benefit.

65k of raw data is very tiny? ok…

Yes absolutely. We are working with Amazon web services and other companies ordering platforms and web service responses greater that 65k are everyday things.

@bcorrea - yes, 65k is tiny. In addition to what Eric mentioned and as an example, a call I am making to get 1 day’s order details returns 300KB of XML data.

The bug is that the size limit cannot be extended using the MaxReceivedMessageSize option, if and when required. I believe this is what @loginerror also refers to in one of his posts above.

@ericmurphy - thank you for your support on this - its always wonderful to work with you!

The maxReceivedMessageSize was no longer used since 2019.4.