Most web service provide a WSDL Link. When you pass this WSDL link to Eclipse it generates the JAVA coded Client. When you Pass the WSDL Link to SOAPUI It generates the SOAP envelope.
the question is:
is there an API in java that will allow me to generate the SOAP XML programatically?
Something like this :
WSDLReader re = new WSDLReader("WSDLURL");
String s = re.getWSDL();
ADDITIONAL INFO:
I found an API that does something similar, Its called SOAP-WS. but the example given in the document is maven based. I want it in normal JAVA, i.e. non-maven base.
I have solved this problem with the following link :
http://www.membrane-soa.org/create-soap-request.htm
This IS the answer to my question. just download the required JARs, include them in your project and use the attached example. after that , if you pass a WSDL file the program will generate the required SOAP request.
This is for anyone that happens to have the same problem as i did. 🙂