OUR NETWORK:TiVoCommunity TechLore MyOpenRouter Dijit Community MediaSmart Home See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 283614.0
January 5, 2011 10:00 PM

Categories: PogoPlug Development

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

glombus

Member
Joined: 01/05/2011

Hello,

I've been looking at the forums for a while and had a question I was hoping someone here could field.

I've been able to build a function in php to do all of my json parsing for the pogo api, but are there any public and static endpoints like a WSDL for soap with which we can build our class and interface stubs?

I've been working with SOAP for about a year, and without an endpoint I feel like we're forced to implement and duplicate a lot of work that pogoplug has done in order to parse the results from the Pogo API and define our own Classes rather than being able to generate the classes based off of definitions provided by pogoplug.

I'm happy to add any more information to help explain my issue.  If anyone knows if there is an endpoint I'd definitely appreciate it.

Thanks

-Will

Discussion:    Add a Comment | Comments 1-8 of 8 | Latest Comment

January 6, 2011 12:55 PM updated: January 6, 2011 12:56 PM

Hello,

We currently do not have WSDL endpoints. You must use the firefox-addon firebug's XHR tab, and our webdev documentation, to observe and reproduce all our API calls. Our documentation is at http://www.pogoplug.com/home-en-developers-web-developers.html/

However, please note that there shouldn't be any modern scripting language that doesn't have the built-in ability to evaluate a JSON string into a usable object; e.g. array-map. You shouldn't have to write a custom function to parse JSON.

The only limit to the Pogoplug is your imagination... and C skills... and linux skills. ^_^ h\t\tp://download.pogoplug.com/opensource/pogoplug-gcc.tar.bz2

January 7, 2011 11:39 AM

Cloud Engines: Can you prioritize having WSDL endpoint? I was looking for the same too, and I am sure there are others...

January 7, 2011 2:59 PM updated: January 7, 2011 3:16 PM

Sorry, I mispoke.  What I meant is that I had to write a function that would easily call the JSON functions for me.  I'm no SOAP/Web service expert, but I use Eclipse for most of my development and when making a web service client in Java in Eclipse I just have to feed in a WSDL endpoint and then it builds the implementation for me. 

What I meant to originally say is that I felt compelled to write a function that did this more or less

$val = getPogoJsonValue($pogofunctionName,arr[params],$nameOfReturnValue);

I'm relying on PHP's json_decode to truly parse the JSON, but my function is doing more of the repetitive work for me of calling the right service URL based on the function/method and parameters that I provide and getting the return result I specify.

Regardless, with PHP's JSON functionality out of the box it seems like I'd have to do what I'm doing above no matter what.  Sorry, I just jumped into JSON recently when I got my pogoplug.

I should have made clear that I really want a SOAP WSDL endpoint to help build the functionality for a Java/PHP SOAP Client.

It's extra work on our parts to have to implement the classes and functions for the PogoPlug API when exposing a WSDL would allow us to get the grunt stuff out of the way.  We could rely on PHP (or whatever) and the Web Service Definition Language to build our SOAP implementation for us, and leave us to just have to worry about the fun stuff.

Basically, I want to be able to do something like this.

$client = new SoapClient ("https://service.pogoplug.com/svc/api/soap/SoapEndPoint.wsdl");

$loginResultsObject = $client->loginUser("blah@blah.blah","blahbity blah"));

$valtoken = $loginResultsObject->getToken();

$client->listDevices($valtoken);

Without having to implement all of PogoPlug's classes and functions on my own.  I'm sure the syntax isn't totally right, but hopefully you can see what I'm going for here.  An end point the PHP SoapClient can consume and figure out the implementation for me.  Sorry for wasting your time if I'm way off point here, and don't know what I'm talking about.

Alternatively, if you could provide me with an example PHP script that uses Soap to login a user and list all of his/her devices, I would greatly appreciate it.

January 10, 2011 7:59 PM updated: January 10, 2011 8:00 PM

PHP Web Service should be the most important part for a site to be successful.

PHP Web Service

January 10, 2011 8:15 PM updated: January 10, 2011 8:26 PM

loginUser listDevices@glombus Sorry, I'm more of a python person. Install firebug for Firefox and observe the SOAP commands. You'll see the strings we send.

The only limit to the Pogoplug is your imagination... and C skills... and linux skills. ^_^ h\t\tp://download.pogoplug.com/opensource/pogoplug-gcc.tar.bz2

January 11, 2011 11:57 AM updated: January 11, 2011 12:29 PM

Thanks libtoks. I appreciate your responses and patience. I do have a working PHP function to pass my params to the Pogo API and authenticate and get the values that I want. The API clearly explains how to interact with it and it's helpful. I think the disconnect on my part is that I was not familiar with the concept of a SOAP Client using what PHP refers to as "Non-WSDL mode". I was hoping you'd post some snippet to help me see if I'm on the right track, but I think I'm clear now either way and have a better understanding of SOAP and API calls in general.

I'm used to my IDE and tools like wsdl2java (and I see there's a wsdl2php) that consume the WSDL and use that to build the client code for me. I'm guessing that's what a number of other users asking for a WSDL are looking for too. I was hoping that there might be a web service URL I could point to in order to avoid having to write my implementation of the Classes in the PogoPlug API and so duplicate the work pogo's been so nice to do already.

I used a WSDL of my own to realize that it's not that much more code in the end using a non-WSDL over WSDL based Soap Client. I'm just embarrassed it took me so long to realize that there's really no gain in me getting generated client code in my project.

I think it's nice that WSDL gives you the benefit of being able to generate code automatically if you so wanted and to get an OO design right out of the gate without having to write anything yourself. Plus, for those who want it, I'd think it's probably not so difficult to make public this WSDL especially if all the functions of the API are already exposed, but if Pogo doesn't feel like making a WSDL publicly available, then I can and will work without it.

Thanks.

Answers Post January 11, 2011 12:50 PM updated: January 11, 2011 12:52 PM

@glombus

It's more of an internal prioritizing thing. You're the first person that I'm aware of who has ever asked for such a feature. If time permits and/or more people ask for this feature, the chances of it being provided will rise significantly.

Thanks,

The only limit to the Pogoplug is your imagination... and C skills... and linux skills. ^_^ h\t\tp://download.pogoplug.com/opensource/pogoplug-gcc.tar.bz2

January 11, 2011 1:04 PM

Thanks libtoks. I shouldn't have assumed it's something that the pogoplug team can simply "flip on" right now but chose not to. I'm sure you have many projects to work on and this may not be the top priority at the moment or for the immediate future.

FYI, I did see Stephen Gennard and JeffMc inquired about it in this older post.
http://www.pogoplugged.com/forum/thread/13949/WSDLs/

For my part, I could see it being helpful for future projects as well, but I can do what I have to without it for the mean time.

Thanks. Question answered.

Discussion:    Add a Comment | Back to Top | Comments 1-8 of 8 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window