axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jansson <jansss...@gmail.com>
Subject Re: Generic request, empty post
Date Wed, 16 Aug 2006 13:40:52 GMT

Thank you for that answer!
Since this is my first "real" WS project, and I haven't used AXIS and Tomcat
before, I really don't know much (read anything :) about servlet filters.
I'll look into it, but any help on the way (links to tut, code,
mailing-lists etc) is very appriciated.

I'm using Axis 1.4 with Tomcat 5.5.17 and j2sdk1.4.2_12



Anne Thomas Manes wrote:
> 
> I suggest using a servlet filter to catch this request.
> 
> On 8/16/06, jansson <jansssson@gmail.com> wrote:
>>
>> ANYBODY??
>> Help...
>>
>>
>>
>> jansson wrote:
>> >
>> > 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#a5827632
>> Sent from the Axis - User forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Generic-request%2C-empty-post-tf2102463.html#a5832639
Sent from the Axis - User forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message