[WebService] General Media Access Webservice (1 Viewer)

DieBagger

Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    40
    Austria
    Home Country
    Austria Austria
    Hello,

    first i want to thank the creators of this software, amazing things can be done with it.

    Now time for the problems, getting the list of movies works ok, but music is not working, i go to:

    http://localhost:44321/GmaWebService/MediaAccessService/json/MP_GetAllAlbums

    and i get the following:

    {"ExceptionType":"System.Data.SQLite.SQLiteException","Message":"SQLite error\u000d\u000ano such table: tracks","StackTrace":" en System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)\u000d\u000a en System.Data.SQLite.SQLiteCommand.BuildNextCommand()\u000d\u000a en System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)\u000d\u000a en System.Data.SQLite.SQLiteDataReader.NextResult()\u000d\u000a en System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)\u000d\u000a en System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)\u000d\u000a en System.Data.SQLite.SQLiteCommand.ExecuteReader()\u000d\u000a en GmaWebService.Code.MPMusic.GetArtists(Int32 start, Int32 end)\u000d\u000a en GmaWebService.MediaAccessService.MP_GetAllArtists()\u000d\u000a en SyncInvokeMP_GetAllArtists(Object , Object[] , Object[] )\u000d\u000a en System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)\u000d\u000a en System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)\u000d\u000a en System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)"}




    I installed MP a couple days ago, the error says table 'tracks' not found. Can it be a problem with MP configuration??
    But I can listen to my music in MP...

    Have you made a database scan? If you only use the shares view in MediaPortal there won't be any tracks in the MediaPortal database, you have to do a scan first...
     

    cederron

    Portal Member
    December 27, 2010
    16
    4
    Home Country
    Spain Spain
    Have you made a database scan? If you only use the shares view in MediaPortal there won't be any tracks in the MediaPortal database, you have to do a scan first...

    Yes I have done a scan in MP configuration, also uninstalled/installed GMAWebServices. Still the same error.

    What tool can i use to take a look into the database? I think I'm going to see if table is there really ...

    Edit:

    Ok, I have two music databases, MusicDataBaseV11 and MusicDataBaseV12

    V11 has the 'tracks' table, V12 not.

    Maybe GMAWS is looking into V12 ?

    Why do i have two music databases? (sorry I'm new to MP, but i can code and understand databases)


    Edit2:
    wtf, i deleted both databases, but mediaportal config creates and updates V11 again. And someone is creating V12 also (V12 is 0 bytes always), GMAWS seems to be looking at V12 so it does not find anything...


    Edit3: Solved finally, just had to edit gmaws config and change database name.

    Thanks.
     

    Oxan

    Retired Team Member
  • Premium Supporter
  • August 29, 2009
    1,730
    1,124
    Home Country
    Netherlands Netherlands
    Running as a different user sounds good, but I'm afraid that would be quite hard to setup in a installer and maybe you get permissions problems when you try to open the database in MP? No experience though, so this is just a wild guess.
    Yeah that's right. Another option would be to check whether the requested path is a subpath of the PictureShare(saved in MediaPortal.xml)
    If it's is than accessing it would be secure, if not the user gets an error message.
    I think that would be easier to implement. As for NTLM, I guess you're right, I don't know that much about all the Windows stuff, so I'm going to believe you :)
     

    mardup

    Portal Pro
    October 24, 2007
    153
    8
    Toulouse
    Home Country
    France France
    Re : Re: [WebService] General Media Access Webservice

    Mardup,
    it aborts after this solooks a firewall issue

    ExecFirewallExceptions: Error 0x800706d9: failed to add/update port exception for name 'General MediaAccess WCF Service' on port 44321, protocol 6

    Make sure the firewall service is not disabled or has some other issue.

    Maybe the installer should be modified to ignore this error ?

    Thanks,
    Greg

    OK ... i think you are right ...
    I don't use Windows FireWall, i have another one installed (Comodo), so i think Windows FireWall is disabled ...


    I think me too that the installer should test the firewall ;) ....

    Thanks for your help ...


    ----------------------------------------------

    Edit : enabling windows FireWall resolved the problem ..
     

    mpolan

    Portal Member
    January 22, 2011
    10
    0
    Hi Mike, thanks for putting this together, it looks like just what I need.

    I'm trying to generate a web service client from your wsdl file, and I'm running into a bit of a problem. The main wsdl file makes reference to the XSD on "localhost", which doesn't work very well when parsing/generating the client from a different computer. While I can update the source wsdl, I run into the same issue when it loads the XSDs themselves - internally they're still using localhost.

    Would it be possible to use a relative address to find these XSDs? Or is there a better way for me to be trying to do this? I'm playing with editing them myself, but it's not an ideal solution for the long haul.

    Thanks!
     

    mpolan

    Portal Member
    January 22, 2011
    10
    0
    Eclipse, Java, the web service client generator. Though it's not the generator, the WSDL itself won't validate in place nor when I import it. I've got the service(s) running on a remote system, "localhost" to port 44321 is treated with suspicion by my development computer :).

    The eclipse/java client seems to work well for the TV4Home service (since starting here I realized TV4Home was closer to what I needed so I'm focusing on it for now).
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    40
    Austria
    Home Country
    Austria Austria
    Eclipse, Java, the web service client generator. Though it's not the generator, the WSDL itself won't validate in place nor when I import it. I've got the service(s) running on a remote system, "localhost" to port 44321 is treated with suspicion by my development computer :).

    The eclipse/java client seems to work well for the TV4Home service (since starting here I realized TV4Home was closer to what I needed so I'm focusing on it for now).

    Why not just use the json interface? You could even copy-paste all the data-classes/json parser stuff from the ampdroid project...
     

    mpolan

    Portal Member
    January 22, 2011
    10
    0
    Why not just use the json interface? You could even copy-paste all the data-classes/json parser stuff from the ampdroid project...

    I expect JSON is easier, but I needed to learn more about using web services so went with them for now. I do like the ability of pointing the Eclipse generator at the WSDL at the live service to generate the client side with a single click and having the compiler tell me what to fix in my app if the service definition changes. Do you happen to know if/how I can do that with JSON in Eclipse?

    Thanks for the update Mike!

    Mike P.
     

    Users who are viewing this thread

    Top Bottom