3

The solution doesn't work for me from other links. I am consuming web services from android using Ksoap2.

Here is my problem I am getting this error.

Here are my server details

HTTP/1.1 500 Internal Server Error
Server: nginx
Content-Type: text/html
Content-Length: 3
Accept-Ranges: bytes
Date: Wed, 25 Nov 2015 16:01:16 GMT
X-Varnish: 1781493534
Age: 0
Via: 1.1 varnish
Connection: keep-alive
  1. From PHP client

    [message:protected] => looks like we got no XML document
    
  2. From android application using Ksoap2

    org.xmlpull.v1.XmlPullParserException: expected: '>' actual: '' (position:END_TAG </SOAP-ENV:Envelop>@8:19 in java.io.InputStreamReader@41f06f28)
    

My code and web service work fine for all the server. Except the one from Iran. Is there is any encoding issue?

Shubham AgaRwal
  • 4,355
  • 8
  • 41
  • 62

2 Answers2

3

Looks like your webservice is busted and the server (nginx) is throwing an error. All the other errors are just a consequence. You need to fix the webservice by figuring out what is going wrong there. Check the nginx logs and details about whatever is implementing the webservice.

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
  • i generated request response object using wire-shark and found that session id string is "no". I don't find any difference . please see edit. I have compared two responses one is generating response and other is not. But request object seems to be same. – Shubham AgaRwal Nov 30 '15 at 17:33
  • It still seems to be a server issue and has nothing to do with ksoap2-android. I can not debug it for you.... – Manfred Moser Nov 30 '15 at 18:44
0

The problem is not with the web service. It's working on other servers. I installed a new version of the framework (Magento for my case) on Nginx, and now my web service works fine. It may be due to some module interfacing.

Edited: I have got the same error when I was using different store id to access the data. I was getting the same error looks like we got no XML document.

So I think there is no proper answer to the question. The answer must be how to trace the source of this error.

EDITED [26 June 2016]

This might be the possible answer if you are using Magento. This happens to me once where API throwing a warning before outputting the XML response which was causing the error. https://stackoverflow.com/a/10679915/5028508

Shubham AgaRwal
  • 4,355
  • 8
  • 41
  • 62