Results 1 to 3 of 3
Thread: java webservices
- 08-17-2009, 08:36 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
- 12-08-2009, 01:24 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
Greetings young jedi,
Take this steps:
1. Read short but nice and clean WSDL tutorial on w3schools
2. Create CLIENT APP.
For this you will need any WSDL file that you can find
on any server that has WEB SERVICE SERVER SIDE
3. Use IDE (Eclipse, Netbeans) to automatically create client classes for you
directly from *.wsdl file
There is very nice little example on using Eclipse IDE for this here:
Use this key words to find it:
"eclipse web service create tutorial"
5. Create Test class using your 5 client classes
(In example below WebServerOperationsProxy is one of them)
Example:
If you have web service server up and runningJava Code:/** Call web serveice server, sending String param from client and getting some response */ public class WebServiceClient { public static void main(String[] args) { WebServiceClient caller = new WebServiceClient(); String s = "john"; caller.callServer(s); }// private void callServer(String s) { WebServerOperationsProxy proxy = new WebServerOperationsProxy(); try { String responseFromServer = proxy.receiceResponseOperationFromServer(s); System.out.println(responseFromServer); } catch (RemoteException e) { e.printStackTrace(); } }
on URL that is specified at LOCATION attribute at
the end of your *.wsdl file :
<wsdlsoap:address location="URL"/>
your client Test class will send String there through auto created proxy class
and you will get answer
Take your time, read all links i have posted
and you will be very satisfied with how quick you will have your on
example running
good luck young jedi!
- 12-08-2009, 01:32 PM #3
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
Important HINT:
Every IDE, Eclipse for example has some sort of WSDL TEST tool.
No coding is needed to test if web service server is working !
If you have any J2EE Eclipse version with support of Web services in it:
1. copy *.wsdl file in your web project
2. right click on it and choose Web Services => Test with web service Explorer
3. In explorer first check URL of web service server
4. fill in all parameters needed to invoke server operation
(just like filling any form with proper data type)
5. call server
Similar Threads
-
Webservices in JAVA
By naveenit7sep in forum Advanced JavaReplies: 0Last Post: 03-30-2009, 07:16 AM -
Webservices
By RT08 in forum Advanced JavaReplies: 0Last Post: 09-15-2008, 09:02 AM -
create a Java Client to consume WEBSERVICES XML SOAP
By Felissa in forum Web FrameworksReplies: 2Last Post: 05-16-2008, 06:42 AM -
webservices axis..
By kalpana in forum Advanced JavaReplies: 0Last Post: 01-30-2008, 06:06 PM -
java webServices
By renukadevi.karri in forum New To JavaReplies: 0Last Post: 01-10-2008, 12:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks