File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing webservices clients from wsdl files

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 528
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic