NetTalk Central

Author Topic: WebService NT 8.23 change in behavior from 8.21  (Read 4205 times)

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
WebService NT 8.23 change in behavior from 8.21
« on: August 04, 2014, 07:24:53 PM »
Hi Bruce

In had an issue a while back connecting a NTWS webservice method to a WinDev Mobile client http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=5749.0

 When I turned off the compression the issue went away, but when I upgraded to 8.23 I have an issue again

I have the following requests coming into the server
Code: [Select]
POST /GetDriverAuthCode HTTP/1.1
User-Agent: PC SOFT Framework
Content-Type: application/x-www-form-urlencoded
Host: 192.168.1.105:86
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 25
Code: [Select]
POST /GetDriverAuthCode HTTP/1.1
User-Agent: PC SOFT Framework
Content-Type: application/x-www-form-urlencoded
Host: 192.168.1.105:86
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 25

Login=driver&Password=ggg

From this I should get an error response saying that the credentials are bad.

But instead I am getting nothing, not even a header.

attached is a screenshot from the device with the attempt to show the results.  First line is just the true\false for if the request was successfully made.  The 2nd and 3rd are the header and response... but they are blank
My requests coming into the server from 8.21 and 8.23 look the same, but the outcome is different.

Any ideas on what I  need to do differently either in my server or in my request headers?

Thanks
Debra


[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: WebService NT 8.23 change in behavior from 8.21
« Reply #1 on: August 04, 2014, 10:10:04 PM »
Hi Debra,

first, it should be noted, that you're only getting 1 request. POST's appear twice in the log, once after the header arrives, and once again after the data arrives. (this is because large Posts can take time to arrive, and if a Post causes the system to crash, then at least the header part is in the log so you have some clues.)

The first debugging step I'd take here is to turn on the Project option
NetShowSend=>1
This will send all _output_ from the server to Debugview.

the problem is either
a) the data is going out compressed as before
b) nothing is going out
c) something is going out, but the remote device does not like it.

The NetShowSend will at least identify which of these is in play, and from there we can look at how best to fix the problem.

cheers
Bruce

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: WebService NT 8.23 change in behavior from 8.21
« Reply #2 on: August 05, 2014, 08:35:17 AM »
The output from NT 8.23 is
Code: [Select]
[4676] [st] [netTalk][thread=3] parsed header, BrowserTabId=
[4676] driver
[4676] [st] [netTalk][thread=3] [LEN 432] <?xml version="1.0"?>
[4676] <GetDriverAuthCode_response>
[4676]   <ServiceErrors>
[4676]     <Error>
[4676]       <ErrorNumber>801</ErrorNumber>
[4676]       <ErrorPosition>0</ErrorPosition>
[4676]       <ErrorRecordId>0</ErrorRecordId>
[4676]       <ErrorDescription>Invalid Driver Authentication</ErrorDescription>
[4676]       <ErrorRecomendation>Confirm uou are using a Drivers credentials</ErrorRecomendation>
[4676]     </Error>
[4676]   </ServiceErrors>
[4676] </GetDriverAuthCode_response>


This is the results from 8.21, no code changes on my part, just re-installed NT 8.21, looks like the header is not being sent on 8.23

Code: [Select]
[5044] [st] [netTalk][thread=3] [LEN 690] HTTP/1.1 200 OK
[5044] Date: Tue, 05 Aug 2014 16:27:11 GMT
[5044] Server: NetTalk-WebServer/8.21
[5044] Content-Length: 432
[5044] Content-Type: text/xml
[5044] Set-Cookie: SESSIONID=4CpVTAa3plCKEPyly9lEm4mkHADwmj; path=/; HttpOnly
[5044] Connection: keep-alive
[5044] X-Frame-Options: sameorigin
[5044] 
[5044] <?xml version="1.0"?>
[5044] <GetDriverAuthCode_response>
[5044]   <ServiceErrors>
[5044]     <Error>
[5044]       <ErrorNumber>801</ErrorNumber>
[5044]       <ErrorPosition>0</ErrorPosition>
[5044]       <ErrorRecordId>0</ErrorRecordId>
[5044]       <ErrorDescription>Invalid Driver Authentication</ErrorDescription>
[5044]       <ErrorRecomendation>Confirm you are using a Drivers credentials</ErrorRecomendation>
[5044]     </Error>
[5044]   </ServiceErrors>
[5044] </GetDriverAuthCode_response>



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: WebService NT 8.23 change in behavior from 8.21
« Reply #3 on: August 05, 2014, 11:11:50 PM »
Hi Debra,

I've tried to duplicate by putting a call to AddServiceError into the PrimeParameters routine, and also the BuildResult routine.

unfortunately I'm still getting the HTTP header in all cases. Could you maybe tweak example 77 to show the effect you are getting?

cheers
Bruce

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: WebService NT 8.23 change in behavior from 8.21
« Reply #4 on: August 06, 2014, 11:11:42 AM »
Found the issue, if you set Compress Dynamic Content to false it does not send the header as outlined in my last post.
Web77 with this setting is attached.

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: WebService NT 8.23 change in behavior from 8.21
« Reply #5 on: August 06, 2014, 10:07:28 PM »
excellent - thanks.
I've fixed in 8.24