views:

154

answers:

5
+1  Q: 

XML Web Services

I just start learning to write web services yesterday, kinda fascinating. I created an XML web service, i most program on my Linux box, I want to use the java language or some other language to access this web service. Can you direct me to any tutorial that show how to access the .net web services from another programming language.

+2  A: 

Web services should be language/platform independent. That is one of the pillars. So you should access web service written in .net like any other web service. The implementation details shouldn't be visible for customer of the web service.

Petar Repac
Yeah i know that. What i'm asking is if you can direct me to some tutorials for implementation and calling the web service from other lanaguage
ferronrsmith
Try this: http://www.codeproject.com/KB/XML/WSfromJava.aspx It's a little old though.
Petar Repac
BTW, if you are starting with web services in .net go with WCF if possible. XML ASP.NET web services are history.
Petar Repac
ok thanks for the advice
ferronrsmith
A: 

To consume an XML service, use Java, JavaScript, Ruby, Perl, Python, whatever. You just need to be able to read HTTP streams and parse the XML.

mcandre
an example or tutorial would be nice :)
ferronrsmith
Which language do you want to use? Google: SOME_LANGUAGE parse xml.
mcandre
+1  A: 

For an example, you can try Jquery.get():

Load a remote page using an HTTP GET request.

This is an easy way to send a simple GET request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code). If you need to have both error and success callbacks, you may want to use $.ajax.

If your web service provides an XML response, set the type argument to "xml". Use a Javascript snippet from a Jquery example.

A very simple JQuery snippet (from a tutorial), using Jquery.post(), which calls the server with an argument (t) and displays the content of the reply as a text alert:

 $.post("test2.php",{content: t},function(txt){
   alert(txt);
 });
gimel
A: 

Java comes with some web-service APIs

ykaganovich
A: 

With Java you can try using the very good frameworks Axis2 or Spring-WS:

http://axis2.apache.org

hxxp://static.springsource.org/spring-ws/sites/1.5/

You will find good documentation on the project sites and all over the web.