Android Question consuming service fails when in production

leitor79

Active Member
Licensed User
Longtime User
Hi,

My B4A app consumes a service I've made.
Everything works fine when I consume the service hosted here, while debugging.
However, when I put the service in a server un production, my app fails.

Of course; first thing in mind: server configuration issue, port issue... but no.
I use soapUI for testing the service and it works, both against here and against the production server.

My code, when I get the exception:

B4X:
Dim j As HttpJob
j.Initialize("", Me)
j.PostString(Starter.sServidor, TemplateLogin)
j.GetRequest.SetHeader("SOAPAction", """http://xxxxx.com/s/ixxxxxx/MxxxxLxxxx""") 'I've obfuscated this line
j.GetRequest.SetContentType("text/xml;charset=utf-8")
j.GetRequest.Timeout = 120000


So; I've checking the RAW of the working soapUI call:

B4X:
POST http://xxx.xxx.xxx.xxx:xxxxx/svcxxxxx HTTP/1.1   <------ POST matches Starter.sServidor
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://xxxxx.com/s/ixxxxx/MxxxxLxxxx"  <------- this matches SetHeader line
Content-Length: 440
Host: xxx.xxx.xxx.xxx:xxxxx <---------- IP and port of the service
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Am I missing something?

Thank you!
 

leitor79

Active Member
Licensed User
Longtime User
Thank you for your answer!
I was so focused obfuscating private information that I forgot to paste the exception... well...

This is the error I get:

B4X:
*** Service (sws) Create ***
** Service (sws) Start **
*** Service (httputils2service) Create ***
No Network Security Config specified, using platform default
** Service (httputils2service) Start **
ResponseError. Reason: Not Found, Response:
Not Found

(edit: this is the unfiltered log)
 
Upvote 0
Top