NetTalk Central

Author Topic: WebService Content Length Error  (Read 3807 times)

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
WebService Content Length Error
« on: July 01, 2014, 11:30:21 AM »
Hi Bruce

In NT 8.17, I have a webservice that returns a view.  If I have more than 2 records that return my Content Length is wrong in my header.  Here is an example of what I mean, the below XML is 1769 characters long, the content length in the header says its 491.  

This does not seem to be data specific, it appears I can use any combination of records, so long as it is less than 3.  If I have 1 or 2 records the content length is correct.

I attached the CLW, let me know if you still need an example app.

Code: [Select]
Status
200 OK Show explanation Loading time: 1370
Request headers
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo
Content-Type: application/x-www-form-urlencoded
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: SESSIONID=Hx813QeEf4MuXbnHcKtNA4Yhz6yltR
Response headers
Date: Tue, 01 Jul 2014 19:19:59 GMT
Server: NetTalk-WebServer/8.17
Content-Length: 491
Content-Encoding: gzip
Content-Type: text/xml
Connection: keep-alive
X-Frame-Options: sameorigin

Code: [Select]
<?xml version="1.0"?>
<DriversTickets_response>
  <Tickets>
    <IMP_CALLNO>141</IMP_CALLNO>
    <IMP_CUSTID>CASH</IMP_CUSTID>
    <IMP_INVNO>A000-141</IMP_INVNO>
    <IMP_OWNERNAME>John Samuels</IMP_OWNERNAME>
    <IMP_CALLBACK>6057161298</IMP_CALLBACK>
    <IMP_LOCATION>605 E St Anne St.</IMP_LOCATION>
    <IMP_TOWED_TO>1107 Silver St.</IMP_TOWED_TO>
    <IMP_LOCATIONCITY>Rapid City</IMP_LOCATIONCITY>
    <IMP_TOWED_TOCITY>Rapid City</IMP_TOWED_TOCITY>
    <IMP_COMMENT/>
    <IMP_GUID>$$280KFlKgeMisnT</IMP_GUID>
    <VTAT_TOW_STATUS>On-Scene</VTAT_TOW_STATUS>
    <VTAT_RELATE_EMPLOYEE_GUID>A0000K9FDtj7Q5EH</VTAT_RELATE_EMPLOYEE_GUID>
  </Tickets>
  <Tickets>
    <IMP_CALLNO>148</IMP_CALLNO>
    <IMP_CUSTID/>
    <IMP_INVNO>A000-148</IMP_INVNO>
    <IMP_OWNERNAME/>
    <IMP_CALLBACK>4168799999</IMP_CALLBACK>
    <IMP_LOCATION>23 Creditstone rd</IMP_LOCATION>
    <IMP_TOWED_TO>140 doughton rd</IMP_TOWED_TO>
    <IMP_LOCATIONCITY>concord</IMP_LOCATIONCITY>
    <IMP_TOWED_TOCITY>concord</IMP_TOWED_TOCITY>
    <IMP_COMMENT/>
    <IMP_GUID>$$530KGDNCzoLX4A</IMP_GUID>
    <VTAT_TOW_STATUS>En-Route</VTAT_TOW_STATUS>
    <VTAT_RELATE_EMPLOYEE_GUID>A0000K9FDtj7Q5EH</VTAT_RELATE_EMPLOYEE_GUID>
  </Tickets>
  <Tickets>
    <IMP_CALLNO>150</IMP_CALLNO>
    <IMP_CUSTID/>
    <IMP_INVNO>A000-150</IMP_INVNO>
    <IMP_OWNERNAME/>
    <IMP_CALLBACK/>
    <IMP_LOCATION>33 peeler rd</IMP_LOCATION>
    <IMP_TOWED_TO/>
    <IMP_LOCATIONCITY>Concord</IMP_LOCATIONCITY>
    <IMP_TOWED_TOCITY/>
    <IMP_COMMENT/>
    <IMP_GUID>$$930KGEDs2085Nz</IMP_GUID>
    <VTAT_TOW_STATUS>En-Route</VTAT_TOW_STATUS>
    <VTAT_RELATE_EMPLOYEE_GUID>A0000K9FDtj7Q5EH</VTAT_RELATE_EMPLOYEE_GUID>
  </Tickets>
  </DriversTickets_response>

[attachment deleted by admin]
« Last Edit: July 01, 2014, 12:10:22 PM by debzidoodle »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: WebService Content Length Error
« Reply #1 on: July 01, 2014, 10:11:31 PM »
Hi Debra,

Bear in mind that the outgoing content is being compressed;

Content-Encoding: gzip

and so the content length

Content-Length: 491

is the length of the _compressed_ text, not the uncompressed text.

Are you seeing a problem in the webClient side of things?


cheers
Bruce

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: WebService Content Length Error
« Reply #2 on: July 02, 2014, 10:53:45 AM »
Thanks for the explanation, makes sense. :)  I was having an issue on my client side but it turned out to be unrelated

Thanks again

Debra


debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: WebService Content Length Error
« Reply #3 on: July 17, 2014, 06:34:51 AM »
I did end up having to turn off the compression for dynamic data.  I am using a WinDev Mobile client, and it could not process the compressed  result.

Just FYI for anyone using web services, if you are having issues getting the data returned in the client, but you know the data is being sent... try turning off the compression.


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: WebService Content Length Error
« Reply #4 on: July 17, 2014, 06:46:06 AM »
if you look in the server log, at the incoming request from the client, what does the header look like?