XML Web Services

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
Do both java web services and .net web services generate and adhere to the same specification?

Like say you develop a front-end that calls a method and retrieves the XML output from a web service. Could that web service provider rewrite the web service overnight in the other framework (imagine :p) and your front-end would still function okay?

Probably something stupid, but I figured I had to ask (you never know) ;)
 

daniel1113

Diamond Member
Jun 6, 2003
6,448
0
0
Well, java and .net are two different "languages" completely. You could replace one with the other, but depending on the size of your web app, it could take a long time.

EDIT: If I am reading your question correctly, a simple answer would be that both java and .net can be used to create identical web services. However, each has its good and bad points depending on the situation.
 

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
Originally posted by: daniel1113
Well, java and .net are two different "languages" completely. You could replace one with the other, but depending on the size of your web app, it could take a long time.

EDIT: If I am reading your question correctly, a simple answer would be that both java and .net can be used to create identical web services. However, each has its good and bad points depending on the situation.

Yes your EDIT correctly addresses what I am seeking (I think). I know in functionality they are both capable but I just want to ensure they are also interchangable and follow the same spec. Like I could use a java web service from a .NET rich client just as I would use a .NET web service and so forth.

Thanks
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
They aren't necessarily compatible or not compatible, it depends on the specific tools you use and the protocols they support. SOAP is a common one and you shouldn't have any problem finding implementations on both sides. I'm not quite familiar enough with SOAP to tell you exactly how much that accomplishes for you but you will have some work left to do on both ends but it will only be only xml manipulation so the answer is definitely that the two work together.

Where my dad works they have a java front end talking to a .net backend using web services. Where I work we have a .net frontend talking to a java backend (front end written by another company no less) as well as a 'middle-end' in java which talks to the back end with ws and another .net frontend (in house) which talks to the middle piece.

The java part is implemented using Axis and it simply delivers xml to and fro, although it handles error cases (sort of like distributed exception throwing). We take that xml and automatically transform it to data objects using Castor. So basically we have some configuration xml files and then direct delivery of java objects to our code. I've never worked on the .net end so I don't know what exactly is done there but I imagine it's the same pattern.
 

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
kamper: nice!

I've been thinking of doing one of the scenarios you described (a .NET backend with rich clients in both .NET and Java+SWT or some other toolkit for cross platform, using web services for communication). I am still [typically] having trouble deciding which to choose for the backend though hehe.

The more I look at it the more I think I'll need to use .NET. Everyone says avoid EJBs like the plague. (Additionally the scheduling tools are limited...and I need threads in EJB damnit!)
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Jog my memory Schrodinger. You were the one asking about healthcare systems a while ago right? I usually remember best by avatars and your books look familiar :p

I think I made this speech before but I'll make it again anyways. Unless you're really familiar with jsp/struts or a similar framework I don't think it makes too much sense to do the front end in java. I think your gui building will be easier and the result will be more powerful in .net so long as you can assume that your clients are running windows and can have the .net framework installed.
 

Schrodinger

Golden Member
Nov 4, 2004
1,274
0
0
Yep thats me ;)

Well when I say front-end, I mean rich GUI client not web-based. I can never really predict what people will be running so I'll program safely and to allow for future growth (in a few projects I'm going to do for hobby).

The only problem is that I may do an internship at a friend's shop and they deal with hotel management systems (keycards for locks, payment, etc) and from what I read its a real pain in the behind doing it in Java using JNI and stuff. Naturally, .NET shines in this area... industrial PocketPC devices with barcode scanners and tablet PCs (what they use) are definitely geared towards .NET

I should say that I don't intend to work on the Java front-end in my hobby projects until its necessary. My intent is to use something like an XML web service over the intranet and therefore (more or less) any client/platform can use the system in the future if the need arises.