Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7696043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:41:18+00:00 2026-05-31T21:41:18+00:00

I am trying to call a webservice hosted on the local network using https

  • 0

I am trying to call a webservice hosted on the local network using https secure connection, first it gave the exception that HostNameUnresolved, so I used the ip address instead of the name, now I am getting the following error:

Error in geting tags.=javax.net.ssl.SSLException: hostname in certificate didn't match: <10.100.248.99> !=

I have already added the intermediate and root certificates to the android trusted list.

Could anyone give me a solution to access a securely hosted webservice on local network using host name not ip address?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:41:19+00:00Added an answer on May 31, 2026 at 9:41 pm

    As mentioned by others, you need a couple of things to be able to connect your web-service:
    – the emulator to know what is the IP address of the server you need to connect to
    – the server name URL you connect through HTTPS must resolve to the domain of the SSL certificate

    To do that, you need to:

    • mount your emulator partitions writeable

    From your desktop shell (example for linux but would be similar on windows, and assume the Android sdk is intalled on /android-sdk):

    cd /android-sdk/tools/
    ./emulator -avd NexusS -partition-size 128
    

    where NexusS is the AVD name of your device. You MUST start the emulator from command line or you will get an error in later steps.

    Now open another shell terminal and get your emulator /system/etc/hosts file:

    cd /android-sdk/platform-tools
    ./adb remount
    ./adb pull /system/etc/hosts /tmp/
    

    The remount is to set the partitions writeable. The pull command above copies the hosts file to /tmp/hosts of your desktop.
    From the desktop edit the /tmp/hosts file to match your need, i.e. if the Web Service is https://www.example.com/foo and IP is 192.168.1.10:

    127.0.0.1      locahost
    192.168.1.10   www.example.com
    

    Then push it back to the emulator:

    cd /android-sdk/platform-tools
    ./adb push /tmp/hosts /system/etc/
    

    You should be able to connect to the web-service now.

    Note that you could still have error in case of a self-signed certificate.

    The image below is before editing the hosts file:
    IP doesn't match the certificate

    After editing:
    Server name match

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call a webservice using WCF that uses the following encoding:
I am getting this exception while trying to call SOAP webservice using axis. basically
Hi I am trying to call a webService in titanium using json. That webService
I am trying to call a webservice using ssl. How do i get the
I'm trying to call a php webservice using WCF. I googled some public php
I am trying to call a webservice that return too much data just to
I'm trying to call an AspNet WebService (C# 3.5) from PHP (5.3.5) using NuSoap.
I'm trying to call a webservice that has complexTypes described as input and output
I am using C# 2.0, I am trying to call webmethod of my webservice,
Help! I'm getting this error when trying to connect using JAX-WS webservice call: java.lang.NoClassDefFoundError:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.