views:

36

answers:

4

Basically I would like a TFS SDK that I can uses to retrieve files from source control.

Does something like this exist for Java? My searching only returned results from 2007 about rumors that Teamprise was working on a SDK.

+2  A: 

I don't know about an SDK, but if you connect to the TFS URL, you will see that it's actually a standard SOAP webservice with functions pretty much matching the .NET SDK functions 1:1. The rest should be straightforward.

Vilx-
though I wouldn't recommend writing any code against those services. They're not part of the published API, and could change without notice.
Robaticus
@Robaticus - true, but I think this would be the fastest way. And think of it this way - the official SDK uses the same webservices. If they change, the official SDK breaks as well. You won't get any better version compatibility by using the official SDK. Of course, adding a version check to your software would be good.
Vilx-
There's a saying "you pay your money, you take your chances." I certainly think that applies here. Can he do it? Yes. Should he do it? I would say "no." I would guess that most of what he needs to do could be accomplished either using the command line, or available tools in the community or marketplace.
Robaticus
@Robaticus - The topic says that he just needs to retrieve files. That can certainly be done from command line. In fact, most things can. So, yes, that's another option. And I do agree that from an ideological standpoint using the webservices is the Wrong Thing. From the practical standpoint however I believe that the risks are very small. But it's up to the OP to decide which is better for him.
Vilx-
@Robat, @Vilx, thanks for the good discussion! I will probably end up using the command line utilities through Java's `Process` class.
jjnguy
+1  A: 

Another way, suggested by Robaticus in comments is to use the command line utilities that come with TFS. Simple and reliable, although less integration.

Added: The CLI utilities come with TFS itself. A quick google query reveals the official documentation.

Vilx-
Could you please point me to some documentation about the command line tool? Or where I can download it? I have never worked with TFS beyond Visual Studio.
jjnguy
@Justin 'jjnguy' Nelson - Check update.
Vilx-
Thanks! I'm not sure why I didn't do that myself. I feel kinda dumb now.
jjnguy
A: 

A third possibility that came to my mind is to use a Java-to-.NET bridge. There are a few to choose from. This way you can use the original MS libraries.

Vilx-
Ick, that sounds gross.
jjnguy
@Justin 'jjnguy' Nelson - Yup. But hey - it works! :)
Vilx-
+1  A: 

Teamprise plugin is now called "Team Explorer Everywhere" and has a java based command line client (TEE-CLC), also have a look at SvnBridge which would let you use subclipse/other svn clients to connect to TFS.

queBurro
Awesome. Thanks.
jjnguy