Jump to content
Sign in to follow this  
Beppe Magistro

SOAP Client Android

Recommended Posts

Hi All,

I have a D11 small fmx app consuming a Soap web service authorized by user/password , if i run on WIndows all is working good, if i try to run on Android i Have this error :

 

Project Client_Wms.apk raised exception class ESOAPHTTPException with message 'Unauthorized (401) - 'http:/masterdata/Artikel.asmx''.

 

this is the code :

 

indirizzo:= THTTPRIO.Create(nil);
indirizzo.HTTPWebNode.UserName := 'user';
indirizzo.HTTPWebNode.Password := 'password';
 indirizzo.HTTPWebNode.UseDefaultCredentials :=true;

 art := GetartikelSoap(false,'http:/masterdata/Artikel.asmx',indirizzo);
APP_ART:= art.getDBValue('ARTIKEL','ARTIKEL','EANCODE','8007057433524');
 
in the Android manifest i added :
android:usesCleartextTraffic="true"
 
Thanks in Advance
 
 

Share this post


Link to post

I don't know, first of all, what is this? "http:/masterdata/Artikel.asmx"

this is not an URL. Is it an example with typo?

I'd try to change http to https, hopefully your endpoint supports https. (which will raise further questions/problems but that will be the next step) 

Share this post


Link to post

the url is an internal one and is working if i run on windows , i tried to modify to https://masterdata/Artikel.asmx" but the connection is refused by the server under windows too.

 

 

Edited by Beppe Magistro

Share this post


Link to post

yes same result

 

'http://10.11.10.50/APplusTest7/masterdata/Artikel.asmx'

 

result :

 

Project Client_Wms.apk raised exception class ESOAPHTTPException with message 'Unauthorized (401) - 'http://10.11.10.50/APplusTest7/masterdata/Artikel.asmx''.

 

Share this post


Link to post

In good old days, my manifest  like this:

    <application android:persistent="%persistent%" 
        android:restoreAnyVersion="%restoreAnyVersion%" 
        android:label="%label%" 
        android:debuggable="%debuggable%" 
        android:largeHeap="%largeHeap%"
        android:icon="%icon%"
        android:theme="%theme%"
        android:hardwareAccelerated="%hardwareAccelerated%"
        android:resizeableActivity="false"
		android:usesCleartextTraffic="true">

 

And it can access web server through "HTTP" in Android.

 

but Android 11, I don't know.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×