post xml to soap server and parse returned xml to db

cwt

Active Member
Licensed User
Longtime User
I am new here so please bear with me. I need to create an xml post string and send via https to a known soap server. The post string will contain login credentials. The soap server will then send back xml that needs to be parsed and added as records to a SQLLite data base.

I wrote the soap server myself so have complete control over how it works and what it sends back. I have already created the database on the Android end. So I just need a push in the right direction to do the https post and then get the returned xml and parse to a data table.

Thanks
 

cwt

Active Member
Licensed User
Longtime User
Using the examples I have added HttpUtils and HttpUtilsService. I am trying to post a soap envelope with xml inside. I am using HttpUtils.PostString() to send the post to the soap server.

The soap server is not receiving the posts.

In the HttpUtilsService I am incrementing a global byte so I know that the code is running to the end of Sub ProcessNextTask routine and the .CallbackJobDoneSub is being called.

I have verified the soap server is working and the url and ports are all fine - checked the obvious things.

Where should I look next to see why the post is not being sent?

Thanks
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
One further note - I added the UrlDone sub and it is not being called. JobDone sub is being called but not UrlDone

Thanks
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
I don't have the logging turned on - I suppose that would be a good idea.

Thanks
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Actually I checked the log - did not know how it worked.

I get an error message:

"connection to http://127.0.0.1:80 refused"

Obviously the soap server is on my development computer and I know the server is responding to a standalone test client I created. So the IP address and port number are good.

I guess my next question is who is refusing the connection - my soap server to my Android app?

Thanks
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Okay - thanks - the console address (127.0.0.1) always works in my Win32 development but not here. Using the local address of the server works now - but - I want to use ssl.

This server is entirely in-house and the Android app will be in-house also. The Android app will not allow a connection because of "Not Trusted Certificate".

I will be creating my own certificates here so the server can run ssl - but I do not want to distribute or install the certificates on all of the Android devices. How can I tell Android to ignore "Not Trusted Certificate"?

Thanks
 
Upvote 0

minimatrix

New Member
Okay - thanks - the console address (127.0.0.1) always works in my Win32 development but not here. Using the local address of the server works now - but - I want to use ssl.

This server is entirely in-house and the Android app will be in-house also. The Android app will not allow a connection because of "Not Trusted Certificate".

I will be creating my own certificates here so the server can run ssl - but I do not want to distribute or install the certificates on all of the Android devices. How can I tell Android to ignore "Not Trusted Certificate"?

Thanks

If your connecting to your machine for webserver usage, you can't use the 127.0.0.1 address, instead you should use 10.0.2.2 or if you know the machines local IP address (192.x.x.x) then you can also use that.

I hope this helps someone, this is my first post here.
 
Upvote 0

Tjunas

Member
Licensed User
Longtime User
Hi Minimatrix, could you possibly share your code? I am trying to do the same thing but am running into nonstop problems.
 
Upvote 0
Top