I'm currently developing a servlet for two way communication, and need to be
able to handle an empty post.

I have a set of methods the client may call, but when the client doesn't
have any more requests, it sends an empty HTTP post to my servlet. I can't
affect the client, and I need to handle the empty post.

The empty post is a way for the client to tell my service that it doesn't
have anything more to request, although my service may want to tell the
client something more, and the empty post consists of an HTTP header with
Content-Length: 0, SOAPAction: "" and NOTHING in the HTTP Body.

When my service receives this, it responds with a SAXParserException:
Premature end of file.

Now, I want this emtpy HTTP post (request) to trigger a custom method (just
as a SOAP request triggers a method mapped by the first tag inside the body)
with no input parameters, which, depending on results taken from a database,
should respond with a SOAP envelope built up by the service.

To make it simple:
I want this:
-------------------------- Request -------------------------
POST /myservice HTTP/1.1
Content-Type: text/xml; Charset=UTF-8
User-Agent: XML Spy
SOAPAction: ""
Host: localhost:80
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache

-------------------------------------------------------------

to get a response like this:
----------------------- Response------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 09 Aug 2006 16:49:30 GMT

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soapenv:Body>
    <myCustomResponse xmlns="urn:mynamespace">
            <AValue>1</AValue>
    </myCustomResponse>
  </soapenv:Body>
</soapenv:Envelope>

--------------------------------------------------------------

How do I make this happend? It must be possible in some way, but how??
For more information, look att the TR-069 CWMP protocol,
(http://www.dslforum.org/techwork/tr/TR-069.pdf), point 3.7.*, cause that's
what I'm trying to implement.
-- 
View this message in context: 
http://www.nabble.com/Generic-request%2C-empty-post-tf2102463.html#a5794105
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to