Invoking a method in WSDL file from client class
Hi,
I have got a WSDL file and I have to invoke certian methods from a client class from the WSDL file. What exactly should I do to invoke them from a Java standalone program /servlet/JSP. There is a sayHello() method in the WSDL. Please tell me how to invoke that method from client side. Aslo please let me know the jar files that are needed.
Below is the WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tutorial.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://tutorial.com" xmlns:intf="http://tutorial.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2.1Built on Jun 14, 2005 (09:15:57 EDT)-->
<wsdl:message name="sayHelloResponse">
</wsdl:message>
<wsdl:message name="sayHelloResponse1">
<wsdl:part name="sayHelloReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="addRequest">
<wsdl:part name="a" type="xsd:int"/>
<wsdl:part name="b" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="sayHelloRequest">
</wsdl:message>
<wsdl:message name="addResponse">
<wsdl:part name="addReturn" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="sayHelloRequest1">
<wsdl:part name="name" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="Hello">
<wsdl:operation name="sayHello">
<wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"/>
<wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse"/>
</wsdl:operation>
<wsdl:operation name="sayHello" parameterOrder="name">
<wsdl:input message="impl:sayHelloRequest1" name="sayHelloRequest1"/>
<wsdl:output message="impl:sayHelloResponse1" name="sayHelloResponse1"/>
</wsdl:operation>
<wsdl:operation name="add" parameterOrder="a b">
<wsdl:input message="impl:addRequest" name="addRequest"/>
<wsdl:output message="impl:addResponse" name="addResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloSoapBinding" type="impl:Hello">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="sayHelloResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="sayHello">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="sayHelloRequest1">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="sayHelloResponse1">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="add">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="addRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:input>
<wsdl:output name="addResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloService">
<wsdl:port binding="impl:HelloSoapBinding" name="Hello">
<wsdlsoap:address location="http://localhost/WebService1/services/Hello"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks in advance
Prashanth

