This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes SOAP request as HTTP GET Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "SOAP request as HTTP GET " Watch "SOAP request as HTTP GET " New topic
Author

SOAP request as HTTP GET

akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
I read that a SOAP request could be an HTTP POST or an HTTP GET request...

But all my SOAP requests that my client sends using wsdl are going as HTTP POST. How do i send a SOAP request as HTTP GET??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41017
    
  43
You can't. SOAP always uses POST. Only REST uses GET (as well as various other HTTP methods, including POST). I'd say that whatever source you read is incorrect.


Ping & DNS - my free Android networking tools app
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
ooh...

I believe i read it from w3schools.........

Thanks for correcting me........
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Akhil,

You are right. w3schools does say it at The HTTP Protocol -
A SOAP request could be an HTTP POST or an HTTP GET request.


However, usually they are pretty good. Btw, they must have an errata page...

Regards,
Dan

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12753
    
    5
Actually, AXIS2 has a method by which REST style GET requests can get automatically translated inside the server to a SOAP request and create a SOAP response.

See this tutorial example. or search for Axis 2 restful on Google for more.

Personally I think this is an outrageous kludge and contrary to the spirit of both SOAP and REST.

Bill
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

I was poking around the internet on the same question and found this.

Is the author in this context referring to REST style webservices, but I have not noticed he mentioning anything about this... Is this something that is introduced recently in SOAP 1.2. Unfortunately the author has not presented any code example for this, and hence wondering if anybody had a chance to look at this post and having their valuable understanding on it.


Regards
KumarRaja

Oladeji Oluwasayo
Ranch Hand

Joined: Sep 10, 2010
Posts: 101

Please I'll like to know how SOAP requests are sent over HTTP POST.

Is the entire envelop posted raw into the request body such as can be read entirely into a String with the following method call?



OCPJP 6, OCMJD 6
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12753
    
    5
The entire text of a SOAP request is sent as the body of a HTTP POST.

The SOAPui or TCPMON utility will let you look at and modify the contents of a SOAP request.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SOAP request as HTTP GET
 
Similar Threads
how to write http header for soap request
SOAP Client using Java Sockets
After getting WSDL ? SOAP Confusion
WSDL issues
How does the browser and web service communicate using SOAP?