Can't fetch records from database (web service)

Hello , I am trying to fetch records from MySql by using web service. When testing webService methods, those, which do not have to run query (hello()) - return result. Otherwise - null. Though, I can see, Unity knows the data type, which has to be returned (in this case - string array). All said - the whole thing runs well on local machine. When i connect web service to remote Glassfish server - no records.

using UnityEngine;
using System.Collections;

public class Main : MonoBehaviour {

    // Use this for initialization
    void Start () {
        webService w = new webService ();
        Debug.Log (w.allQuizes ());
        Debug.Log (w.hello ("me"));

   
    }
}

Output:

System.String[]
UnityEngine.Debug:Log(Object)
Main:Start() (at Assets/Main.cs:9)

Hello me !
UnityEngine.Debug:Log(Object)
Main:Start() (at Assets/Main.cs:10)

Any suggestions are welcome. Thank you.
P.S tested on local server with remotely located MySql - works ok on localhost.

I found the solution. When new wsdl,cs files created in Mono you type:
…dmcs /target:library:webService.cs -r:System.Web.Service
That last bit writes data about your wsdl file into System.Web.Service on your machine. So I had to go to c:/qaas1

I found the solution. When new wsdl,cs files created in Mono you type:
…dmcs /target:library:webService.cs -r:System.Web.Service
That last bit writes data about your wsdl file into System.Web.Service on your machine. So I had to go to c:/Programs/Unity/… to re-copy/paste it. in Unity

Have you considered something like Gamesparks? Makes it very easy to work with and manage data.

Hi NatashaZ,

Although it is of course useful and rewarding when building your own backend infrastructure. It is also quite time consuming.

GameSparks is a BaaS (backend as a service) platform providing a wide range of features, including NoSQL databases along with an intuitive interface to manipulate and view data within. You can see our wide range of documents and tutorials here: https://www.gamesparks.com/learn/

We are also featured on the Unity asset store: https://www.assetstore.unity3d.com/en/#!/content/78351
Feel free to check us out on our site too at https://www.gamesparks.com/product/ where you can get a broad overview of the features we provide.

If you have any questions about GameSparks please do not hestitate to get in touch with our Support Team via: https://support.gamesparks.net/support/home we’d be more than happy to help in any way we can!

Hope to see you on the platform,
Clare

PS: Thanks Meltdown for the mention :slight_smile:

LOL I should be a part of your sales team, with the amount of times I mention you guys on various forums and Reddit
But that’s only because I love the product so much :slight_smile:

Always awesome to hear! :smile: