Reputation: 3282
I'm new to web services. With all difficulty I have generated a simple 'Hello World' web service :D. I want to invoke the web service using java. The web service has a hard coded value shown as the output. Here is what I have tried.
Part of the wsdl look like this
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://sample.com/Webservice/wsTest" targetNamespace="http://sample.com/Webservice/wsTest">
<xsd:element name="test" type="tns:test"/>
<xsd:element name="testResponse" type="tns:testResponse"/>
<xsd:complexType name="test">
<xsd:sequence></xsd:sequence>
</xsd:complexType>
<xsd:complexType name="testResponse">
<xsd:sequence>
<xsd:element name="outputString" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="wsTest_PortType_test">
<wsdl:part name="parameters" element="tns:test"></wsdl:part>
</wsdl:message>
Could you please let me know how to invoke a web service using Java in eclipse.
Later part: In case my webservice has input(eg: web service for addition) how do i pass the request parameters and get an output as a response.
Upvotes: 0
Views: 8383
Reputation: 610
I think this will definitely helps you
Just go through step by step procedure according to it,then you can achieve easily your Requirement.
the Link is here:
http://www.ibm.com/developerworks/webservices/library/ws-apacheaxis/index.html?ca=dat
Upvotes: 1