NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
« Previous 1 … 37 38 39 40 41 … 193 Next »
Android client

 
  • 0 Vote(s) - 0 Average
Android client
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#31
2011-01-25, 10:13 PM (This post was last modified: 2011-01-25, 10:19 PM by UncleJohnsBand.)
mvallevand Wrote:The real problem with NEWA Web Services on other platforms is the Windows Authentication scheme it uses (it's really Microsoft at fault here) and finding the right libraries for non-Windows platform and even with Java it is not trivial. I tried to finding something in python for XBMC but I wasn't lucky enough to find the one Ton found but it takes work.

Martin

Barsk Wrote:Ok, so maybe some quirks to work out. But webservice to me is either RESTful or SOAP-based traditional. Are there other variants around? Like M$ variants? I am not a .NET programmer myself so if there is a private M$ APi in use I am surely not familiar with it. That could be a drawback.

The authentication is not a MS Windows based scheme. It is using standard SOAP protocol that passes authentication information in the header which is all defined......the "tricky" part is finding the same encryption libraries that provide the same encryption....but even the encryption being used are all standards non-ms specific based. It does use a .Net library....but the encryption routine within the .Net library is standard based and should be available to other platforms. The library is: System.Security.Cryptography

The encrypted data is then put together to create the NEWA credential which ensures that SOAP request is authorized (i.e. id/password are correct) and that the request has not timed out (this is necessary to prevent someone from pulling a web service request and then using the credentials for their own purposes).

The Create Credentials code should be portable to any language that provides the encryption routines being used.

This routine simply pulls a passed in id/password, does the encryption and timestamping and creates the credential object that is passed in the header of the SOAP request.

Yes...the result is a MS based object and uses the MS based interface for working with web services.....but any other language that can make a web service call can create this same object (it ends up only being XML with the encrypted values in the specified fields) and make a web service call.

If there is some other standards based library that is also available in .Net I would consider enhancing the authentication routine to handle multiple authentication processes.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Barsk
Offline

Senior Member

Posts: 395
Threads: 57
Joined: Aug 2006
#32
2011-01-26, 09:35 AM
Ok, this web page seems to have related info on how to create the credentials part at least:
http://www.ehow.com/how_7682347_use-secu...cates.html

For the other part, could this be used? It is a java port of the Exchange webservice API as I understood it:
http://blogs.msdn.com/b/exchangedev/arch...-java.aspx

Otherwise, what is the "name" of the MS webservice API you use?

Google is your friend.
Barsk
Offline

Senior Member

Posts: 395
Threads: 57
Joined: Aug 2006
#33
2011-01-26, 02:08 PM
I found some new stuff regarding webservice support in the form of Apache Axis, a java library that wraps all the nitty gritty stuff of WSDL, UDDI and SOAP with some tools and APIs. I guess this is the solution to the API question.

http://axis.apache.org/axis/

The problem is that it isn't supported by the Android OS which has a rather limited Java support. A workaround would be to build a java NVPR plugin that works as a proxy, intercepting calls to the NEWA webservice and publishing them as a RESTful API, which Android supports.

The best solution would be, IMHO, if NEWA could publish its webservice directly as RESTful.
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#34
2011-01-27, 12:27 AM
For each service offered by NEWA there is an information page that provides the methods that are available and also when you provide the ?wsdl parameter produces the wsdl for the service.

There is a DetailService.asmx, GuideService.asmx, ManageService.asmx, ScheduleService.asmx and SearchService.asmx

If you navigate to http://your-machine:8866/public/services/ScheduleService.asmx you will see the below which shows all the methods within the service:

[Image: capture126201170023pm.jpg]

Adding the ?wsdl at the end will render the wsdl that can be pulled in by other languages to build their interface to the service.
[Image: capture126201170658pm.jpg]

I am not a java programmer....but I was able to use the free soapUI tool to pull in the wsdl and create the JAX-WS(Java API for XML Web Services) java class (and source) files for the service (see attached sample of ScheduleService).

You should then be able to create a java client that uses JAX-WS to interact with the service.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Barsk
Offline

Senior Member

Posts: 395
Threads: 57
Joined: Aug 2006
#35
2011-01-27, 09:17 AM
Thanks for a great guide to the NEWA WS! Smile

I'll look into the SoapUI tool and see if it has something of use. The java source you sent shows the endpoint classes and arguments, but none of the actual SOAP handling and WS calls. Mayby it is in the parts you didn't sent?

Otherwise I still think Apache Axis is useful, even in Android. According to this forum messageI found. It uses Axis to create the SOAP envelope and the HTTPClient to manually send the SOAP message to the webservice. A bit awkward, but if it is working, then it is a way to go.
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#36
2011-01-28, 01:32 AM
Barsk Wrote:Thanks for a great guide to the NEWA WS! Smile

I'll look into the SoapUI tool and see if it has something of use. The java source you sent shows the endpoint classes and arguments, but none of the actual SOAP handling and WS calls. Mayby it is in the parts you didn't sent?

Otherwise I still think Apache Axis is useful, even in Android. According to this forum messageI found. It uses Axis to create the SOAP envelope and the HTTPClient to manually send the SOAP message to the webservice. A bit awkward, but if it is working, then it is a way to go.

The JAX-WS framework handles the SOAP interface and calls. I am looking at NetBeans now....it includes JAX-WS built in......seems to be a very nice free Java IDE.
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Barsk
Offline

Senior Member

Posts: 395
Threads: 57
Joined: Aug 2006
#37
2011-01-28, 07:47 AM
Well, I have never really worked with SOAP WS before. I have a general knowledge about it, but I have successfully dodged all development on the it until now. Most of the customers, and myself included, prefers the RESTful approach to webservice APIs.

So the actual tools and APIs to use is new ground to me. That is why I appear so confused. I am. Smile
I will look into it in deeper detail when it get the time to start developing on the Andoid App. I wish it was today....

Btw, the new Android 3.0 SDk is released now and it includes a simulator that runs the environment. So I could virtually develop this Android App now without having any actual hardware at hand. That is cool! Smile
And start developing on that SDK (with Eclipse that is my preferred IDE) will soon answer the questions what APIs and libraries that are available to me.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,186
Threads: 958
Joined: May 2006
#38
2011-01-28, 05:18 PM
Barsk Wrote:So the actual tools and APIs to use is new ground to me. That is why I appear so confused. I am. Smile

That was probably my real problem more so then it being a Windows issue. While It is trivial to implement the WSDL interface in .NET getting the authentication and connection working on the other platforms is much harder.

Martin
UncleJohnsBand
Offline

Posting Freak

U.S.A.
Posts: 5,643
Threads: 258
Joined: Feb 2005
#39
2011-02-01, 05:05 AM
Ok...I did what I hate to do because it is 20x more time consuming and complex than it needs to be.

Attached is a sample Java client that can securely connect to the NEWA web services.

The sample is pointing at the ScheduleService web service and calls the Test() method which simply authenticates you and give you a message back that you made it into the service successfully.

To accomplish this I used the free NetBeans IDE 6.9.1 which has JAX-WS built into it and I am using the current JDK6.

To ease coding I integrated a few free 3rd party java classes:
  • JodaTime for easier time manipulation
  • A java implementation of Rfc2898DeriveBytes that is compatible with .Net
  • Unlimited strength java cryptography extension (I placed them in my JDK install rather than having them directly in this package so you will need to do this to get it to work)
  • Random GUID generator.

You should just need to load NetBeans on your system, unzip the attached, add the unlimited strength cryptography extension jars into your JDK install library....I renamed the existing jars and then put these in just in case I need to use the original limited versions at sometime.

It is looking for the service on http://localhost:8866/public/services/sc....asmx?wsdl.

This is using the default NEWA id/pwd (admin/password) and the default iteration count from the NEWA config file which is 25 (the higher this number the more secure...but the slower the response.) If you change this number in this app you must also update the setting in the NEWA config file to match.

You should be able to extend out this sample to actually interact with setting recordings since all the methods available in ScheduleService are there and available.

I did this just to proof out that the services are not MS specific/proprietary....but as Martin pointed out....it can be much more difficult to implement within other languages/frameworks. It is not MS's fault that they made working with Web Services a simple thing to do compared to other development languages/frameworks Wink

Have fun. Big Grin
Intel Core i7 @ 4.00GHz Skylake 14nm
ASUSTeK COMPUTER INC. Z170-DELUXE
Windows 10 Pro x64
PVR Software: NPVR 5.1.1
SiliconDust HDHomeRun HDHR5-4US Connect Quatro 4 Channel Tuner
Roku Ultra
2 PCH A-100's
Barsk
Offline

Senior Member

Posts: 395
Threads: 57
Joined: Aug 2006
#40
2011-02-08, 10:19 AM (This post was last modified: 2011-02-08, 10:22 AM by Barsk.)
Hi UncleJohnsBand,

sorry for not replying earlier. Well, for doing something you hate, I am impressed. You did my work already!

But I think that the Apache Axis framework is a tool that greatly simplifies a lot of the hazzles you went through with you low level approach. So I think the 20 times more effort estimate can be readily reduced to somewhere near the MS experiance.

Now for some ramblings. Bear with me Smile
I have no experiance (yet) with either MS WS support or the Axis dito, so I cannot tell wich one is simpler or better. One thing for sure though, and this is from my heart. The Visual Studio environment happens to be great. And all is well. But what happens the day you are NOT satisfied with Visual Studio or the way that MS develops the platform. Or the day you need to buy a license just to build things. Then you are stuck indeed. Or what if you clients (if you have any Smile) want you to deploy your stuff on Linux? Or you need some other support package or library that .NET does not cover? The Open Source community outside MS is awesome and what has been achieved is fantastic.
My development platform is Eclipse and Java, my deployment platform is Tomcat. My database engine os MySQL. All for free, all top class. And all can be substituted for other components at any time if something else comes up. I just love this world of openness and free choice.
End of rambling!

Had to let it out though Wink It is a shame that MS has not created a real of .NET API for Java. Once they where fully commited to Java and my first project was built on MS J++. But then I guess they felt they lost control and did not earn enough money as there where other free tools so they just stuffed the whole Java plan. That was when I got pissed and looked elsewhere. However I do use Windows OS and such as my primary OS. It is still the best! (or maybe MacOs is the best, but it is too limited for me).
Ohh, that was way OT! Big Grin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (5): « Previous 1 2 3 4 5 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Clock in UI Client VCR58 5 1,207 2024-12-29, 11:57 PM
Last Post: artmetz
  Smaller time jumps in EPG for Windows NextPVR Client cliffskier 2 888 2023-11-03, 06:48 AM
Last Post: sub
  subtract time from recordings for web client jobby99 0 654 2023-05-28, 09:09 PM
Last Post: jobby99
  Windows client list suggestions seattlefog 0 824 2022-10-10, 05:28 PM
Last Post: seattlefog
  Client Request kirschey 7 1,942 2021-10-05, 11:31 PM
Last Post: sub
  Roku Channel / App / Client gEd 6 4,936 2021-06-02, 07:15 PM
Last Post: mmortal03
  Web Client info VCR58 0 993 2021-01-26, 10:05 PM
Last Post: VCR58
  Need negative pre-padding and post-padding values for web client scheduling Egregius 1 1,250 2020-10-29, 12:00 AM
Last Post: sub
  v5 Web Client Delete recording needs confirmation dialogue naisiwel 5 2,179 2020-09-29, 02:24 PM
Last Post: mvallevand
  v5 Web client status page naisiwel 1 1,215 2020-09-16, 01:08 PM
Last Post: jcole998

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode