Thanks sir, for your reply in for httpclient
1. Can i use apache httpclient commons for invoking webservice
2. If yes,
to post soap request,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://testws.example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns0:getEmployeeDetails>
<emnpNo>11111</emnpNo>
</ns0:getEmployeeDetails>
</soapenv:Body>
</soapenv:Envelope>
Should i have to give entire message, or just body of the soap, enough,
like <ns0:getEmployeeDetails>
<emnpNo>11111</emnpNo>
</ns0:getEmployeeDetails>
Will httpclient will automatically construct the soap envelopes?
2. Which approach to follow for constructing the soap envelope?
a. KEep stringbuffer and appending the tags?
b. or Keep a
string constant with ${0} parameters and replace parameters with the values using messageformat class?
c. or read from xml file and put the values and post it?