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.
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.
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.
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);
});
With Java you can try using the very good frameworks Axis2 or Spring-WS:
hxxp://static.springsource.org/spring-ws/sites/1.5/
You will find good documentation on the project sites and all over the web.