Results 1 to 3 of 3
  1. #1
    umail2deep is offline Member
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Question java webservices

    Hi ,
    Im a fresher, need to start with webservices(WSDL)
    Can any one help me out with small example with end to end flow,abt the targetnamespce,port,binding,how it works, books ,tutorials.

    NEED HELP

    Thanks
    Deepan

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    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:

    Java 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();
    		}
    
    	}
    If you have web service server up and running
    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!

  3. #3
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    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

  1. Webservices in JAVA
    By naveenit7sep in forum Advanced Java
    Replies: 0
    Last Post: 03-30-2009, 08:16 AM
  2. Webservices
    By RT08 in forum Advanced Java
    Replies: 0
    Last Post: 09-15-2008, 10:02 AM
  3. create a Java Client to consume WEBSERVICES XML SOAP
    By Felissa in forum Web Frameworks
    Replies: 2
    Last Post: 05-16-2008, 07:42 AM
  4. webservices axis..
    By kalpana in forum Advanced Java
    Replies: 0
    Last Post: 01-30-2008, 07:06 PM
  5. java webServices
    By renukadevi.karri in forum New To Java
    Replies: 0
    Last Post: 01-10-2008, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •