0

I have a user receiving the following error in response to an ItemQueryRq with the QuickBooks Web Connector and IIS 7.

Version: 1.6

Message: ReceiveResponseXML failed

Description: QBWC1042: ReceiveResponseXML failed Error message: There was an exception running the extensions specified in the config file. --> Maximum request length exceeded. See QWCLog for more details. Remember to turn logging on.

The log shows the prior request to be

QBWebConnector.SOAPWebService.ProcessRequestXML() : Response received from QuickBooks: size (bytes) = 3048763

In IIS 7, the max allowed content length is set to 30000000, so I'm not sure what I need to change to allow this response through. Can someone point me in the right direction?

Community
  • 1
  • 1

2 Answers2

0

Chances are, your web server is rejecting the Web Connector's HTTP request because you're trying to POST too much data to it. It's tough to tell for sure though, because it doesn't look like you have the Web Connector in VERBOSE mode, and you didn't really post enough of the log to be able to see the rest of what happened, and you didn't post the ItemQuery request you sent or an idea of how many items you're getting back in the response.

If I had to guess, you're sending a very generic ItemQueryRq to try to fetch ALL items, which has a high likelihood of returning A LOT of data, and thus having IIS reject the HTTP request.

Whenever you're fetching a large amount of data using the Web Connector, you should be using iterators. Iterators allow you to break up the result set into smaller chunks.

Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
  • It is a generic ItemQuery for all items, because I need to determine if an item needs to be added, and I need to avoid trying to add a duplicate. His item list is 24,428 items, so it is certainly large. I apologize for not posting that in the original question, as I though the size of the response in bytes was more useful regarding the IIS configuation. I thought there may be an IIS setting that I was missing. I will take a look at implementing iterators to avoid this problem in the future. Thank you for your help. – Timothy Freitag Dec 06 '13 at 15:02
  • NP, glad to help. You could also query by item name, rather than pulling the entire item list, to determine if the item already exists. – Keith Palmer Jr. Dec 06 '13 at 15:19
  • Or, consider caching the item list on your end, and querying the cache, and updating the cache periodically. Will probably help performance that way. – Keith Palmer Jr. Dec 06 '13 at 15:20
0

If you just need to determine if an item exists in QB you can simply add IncludeRetElement to your ItemQuery

So you should post something like

<ItemQueryRq requestID="55">        
<FullName>Prepay Discount</FullName>        
<IncludeRetElement>ListID</IncludeRetElement>      
</ItemQueryRq>

And in Item query response just check the status code. If it is equal to 500 then it means that you should push your item into QB, if it is equal to 0 then it means that item exists

That workaround will save plenty of bytes in your response

Alexey Gurevski
  • 481
  • 5
  • 12