my dog learned polymorphism*
The moose likes Web Services and the fly likes Writing  webservices clients from wsdl files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Writing  webservices clients from wsdl files" Watch "Writing  webservices clients from wsdl files" New topic
Author

Writing webservices clients from wsdl files

RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528



We have Stateless Session Bean exposed as a Webservice.

For my Application there are a few services published and I have the WSDL documents of them.

(I have to write a client to these published web services)


Why do we need to write the client for WSDL files ? Is this for testing purpose.
Generally what do we do by writing the client for the wsdl file.

May be my question would be the dumbest question of JR. but please tell me if you know

If you want something you never had do something which you had never done
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Why do we need to write the client for WSDL files ?


You do not need to "write the client for WSDL files."

You can use a WSDL file to generate the client code for a web service. For example, the Net Express IDE has a feature called "Generate Client" which creates the COBOL code required to call a web service. All you need to do is submit the WSDL file and .... poof .... your client code is automatically generated for you. It takes about 1 to 3 seconds to create the client code.
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528

Paul,

From the above what i understood is :

We use wsdl files to generate the client on the fly with the help of tools.
Then we should use this generated client code to test the webservice by passing parameters to the methods?

Am i right?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187

A WSDL file contains a machine-readable description of a web service. You "can" use a WSDL file to generate client code that can be integrated into an application (service consumer).

The generated client code is integrated into the application which uses the web service at runtime. The application is then tested.

The generated code, by itself, is not enough to test the web service. You need to integrate the generated code into an application.

Once the generated code is in the application, then you can test the web service call.

Once this is tested, then the application can move into production.

This is one way in which to use a WSDL file to create an application that uses a web service. There are other dynamic methods that use WSDL to enable an application to use a web service.

The main point is that a WSDL file is much more than just a testing artifact.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing webservices clients from wsdl files
 
Similar Threads
How to change the name of the binding element in wsdl file ?
Java2WSDL & WSDL2Java tools ?
How to change the name of the binding element in wsdl file ?
Different approaches to developing web services
Different approaches to developing web services