I created a web service class with the necessary SOAP annotations and a few web methods within, and generated .wsdl from it using axis - ant build. Now I generated the client code from the .wsdl again using the axis build. Deployed my web service class as a web project in my jboss with the necessary web.xml and the communication to the web service methods works just fine.
Now my aim is to send HTTP POST and GET using SOAP. How do i do this? I checked the xml that goes to and fro whenever i make the web service call... There is nothing in it to state it as a GET or POST...
Googling showed that the SOAP requests over HTTP will have header something like below, which my guys doesnt :
POST /jwsbook/BookQuote HTTP/1.1
Content-Type: text/xml; charset="utf-8"
How do I make my requests have a header like this??
Is there anything to be specified in the web service class or in my java2wsdl axis build, so that the wsdl file created from it shows support for GET/POST..
Most uses of HTTP as a transport protocol are done in ignorance of how the operation would be modeled in HTTP. This is by design—similar to how different protocols sit on top of each other in the IP stack. But this analogy is imperfect; the application protocols used as transport protocols aren't really transport protocols. As a result, there is no way to know if the method used is appropriate to the operation. This makes good analysis at the application-protocol level problematic with sub-optimal results—for example, a POST operation is used when it would more naturally be modeled as a GET. The REST architecture has become a web service alternative that makes appropriate use of HTTP's defined methods.
I fear I do not quite understand your question. What do you want to do?
1. Send requests to the web service using a client with generated artifacts.
2. Send requests to the web service using a client that does not use generated artifacts, i.e. that assembles SOAP messages in the code.
3. Send requests to the web service using arbitrary HTTP client, like Apache HttpClient, the Jetty HttpClient or the means supplied by the Java JDK.
4. Something else.