Connection to the service by Android studio

Hi, Demis

You have already help me to start the service on Linux. It’s OK. thanks.

I had used next instruction https://github.com/ServiceStackApps/mono-server-config

Now I have another problem. I’m trying to connect the service to Android Studio 2, and get the error “java.io.FileNotFoundException - Failed to read response”, the service works and i can connect to it by VS, but Android doesn’t work.

When i start service on XPS, everything works. Could you help me. Service address is http://51.254.69.66/metadata

for connecting i’m using this instruction https://github.com/ServiceStack/ServiceStack/wiki/Java-Add-ServiceStack-Reference

on this service everything works http://51.254.69.66:8888/metadata

Thank’s.

Hi @Virab,

I had a quick debug of this issue, and it seems that the endpoint you’re having problems with is looking for a default index.aspx, eg http://51.254.69.66/types/java/ actually tries to resolve to http://51.254.69.66/types/java/index.aspx when it tries to get the generated DTOs from the server.

Where as the hosted service at http://51.254.69.66:8888/types/java/ works fine.

Could you check default document rules other IIS config for the one hosted on port 80?

Don’t bother with checking the web.config above, this was due to incorrectly adding a trailing slash in the types URL by the plugin. See posts below for details about the fix/new version. Thanks for reporting the issue :+1:

As you noted this is different behavior to what you have in Visual Studio.

I’ve updated the Android Studio extension in this commit and pushed a new version to the nightly channel. You can use this latest version by adding a new plugin repository.

  • Open Settings in Android Studio from the File menu

  • Go to Plugins

  • Click on Browse repositories

  • Then click Manage repositories
    image

  • Click the green add button and provide the url - https://plugins.jetbrains.com/plugins/nightly/7749
    image

  • Click OK

This should resolve this issue you’re having and make behavior between ServiceStackVS extension and Android Studio consistent.

Let me know if you’re still having problems. This change should be available early next week from the Stable channel, as it sometimes takes a few days to go through Jetbrain’s release/approval process.

Hi, Demis. Everything is working. Thanks a lot

@Virab I didn’t do anything, it was all @layoric :slight_smile:

1 Like

aaaa, thanks a lot @layoric :smile:

1 Like