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
Joined: Apr 16, 2008
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.
Joined: Jan 30, 2009
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?
Joined: Apr 16, 2008
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.