wood burning stoves 2.0*
The moose likes Web Services and the fly likes Receiving empty SOAP requests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Receiving empty SOAP requests" Watch "Receiving empty SOAP requests" New topic
Author

Receiving empty SOAP requests

akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
I understand that an empty HTTP Post over SOAP would mean sending something with empty body and envelop...

What is confusing me is that when we make a SOAP request, we generally invoke some method at the deployed web service server end. But here with an empty request what can be do, or am i missing something in web services here?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
If the SOAP server can't match the request to some service you are just going to get an error of some sort.

You might even get a HTML error which can be very confusing to your SOAP client.

Bill
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
But isnt the matching of the request to a service done with the service name available with the SOAP header? Is so, then the server should be able to map to the respective service.....Hope i have not gone wrong here - i am a newbie to WS

If the above holds, then my question starts from this point... my request has identified its service using the service name, but the request has nothing in its body to tell as to which web service defined method it should invoke... in such a case what will happen...... where will this call go?

or will the ws server have any intelligence to identify that a web service call has come to its region without any body content???


My actual requirement is that -- I need to send an empty HTTP Post from a test client to my web service and my web service server should respond to it.......
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
If you want to be able to send an empty request to a SOAP web service, then it should at least contain a SOAP message in which the body is empty.
In a case such as this, your web service could be a document web service which, after having examined the SOAP message body and noticing that it is empty, could generate an appropriate answer.
Note that your web service endpoint implementation class will have to implement the javax.xml.ws.Provider<SOAPMessage> interface, in order to be able to examine the incoming SOAP messages.
Best wishes!
 
 
subject: Receiving empty SOAP requests