• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Web Services-SOAP over HTTP

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am newbie to web services.

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
Host: www.xxxxx.com
Content-Type: text/xml; charset="utf-8"
Content-Length: 295
SOAPAction=""

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..


Thanks
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please pay attention to the following SOAP article. It says -

Most uses of HTTP as a transport protocol are done in ignorance of how the operation would be modeled in HTTP.[citation needed] 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.



Regards,
Dan
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
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.
Best wishes!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP-based WS always use POST, never GET. If being able to use GET is for some reason paramount (why?), then you'll have to use a RESTful WS (probably using the JAX-RS API).
 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply ....

I am fine with having a POST communication..
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic