In wsdl we have the information like Url , port number and method name every thing is described. We can communicate to the exposed method using those information then why we are using tool(Wsdl2Java) to generate client code(consumer code). and then use that client code to consume the webservice.
Share
Actually Consumer code generation(Using Wsdl2Java tool) is not mandatory if your exposed web method is taking primitive type as a parameter and return primitive type also . But if it is returning complex type like any object . that time The templet of object( Class of that Object) is nessary to be in client system. That class is also be generated while excuting WSDL2JAVE tool .