You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jeff Greif <jg...@alumni.princeton.edu> on 2005/03/18 18:36:17 UTC

'response' to one-way operation

When a one-way operation is invoked via SOAP over HTTP, is there an HTTP
response to the client, or is the connection just closed by the server?  If
there is some sort of response, what is supposed to appear on the wire back
to the client?

Jeff


Re: 'response' to one-way operation

Posted by Anne Thomas Manes <at...@gmail.com>.
>From the WS-I BP [1]:

3.4.4 HTTP Success Status Codes
HTTP uses the 2xx series of status codes to communicate success. In
particular, 200 is the default for successful messages, but 202 can be
used to indicate that a message has been submitted for processing.
Additionally, other 2xx status codes may be appropriate, depending on
the nature of the HTTP interaction.

R1124 An INSTANCE MUST use a 2xx HTTP status code on a response
message that indicates the successful outcome of a HTTP request.

R1111 An INSTANCE SHOULD use a "200 OK" HTTP status code on a response
message that contains an envelope that is not a fault.

R1112 An INSTANCE SHOULD use either a "200 OK" or "202 Accepted" HTTP
status code for a response message that does not contain a SOAP
envelope but indicates the successful outcome of a HTTP request.

Despite the fact that the HTTP 1.1 assigns different meanings to
response status codes "200" and "202", in the context of the Profile
they should be considered equivalent by the initiator of the request.
The Profile accepts both status codes because some SOAP
implementations have little control over the HTTP protocol
implementation and cannot control which of these response status codes
is sent.

3.4.5 HTTP Redirect Status Codes
There are interoperability problems with using many of the HTTP
redirect status codes, generally surrounding whether to use the
original method, or GET. The Profile mandates "307 Temporary
Redirect", which has the semantic of redirection with the same HTTP
method, as the correct status code for redirection. For more
information, see the 3xx status code descriptions in RFC2616.

R1130 An INSTANCE MUST use the "307 Temporary Redirect" HTTP status
code when redirecting a request to a different endpoint.

R1131 A CONSUMER MAY automatically redirect a request when it
encounters a "307 Temporary Redirect" HTTP status code in a response.

RFC2616 notes that user-agents should not automatically redirect
requests; however, this requirement was aimed at browsers, not
automated processes (which many Web services will be). Therefore, the
Profile allows, but does not require, consumers to automatically
follow redirections.

3.4.6 HTTP Client Error Status Codes
HTTP uses the 4xx series of status codes to indicate failure due to a
client error. Although there are a number of situations that may
result in one of these codes, the Profile highlights those when the
HTTP request does not have the proper media type, and when the
anticipated method ("POST") is not used.

R1125 An INSTANCE MUST use a 4xx HTTP status code for a response that
indicates a problem with the format of a request.

R1113 An INSTANCE SHOULD use a "400 Bad Request" HTTP status code, if
a HTTP request message is malformed.

R1114 An INSTANCE SHOULD use a "405 Method not Allowed" HTTP status
code if a HTTP request message's method is not "POST".

R1115 An INSTANCE SHOULD use a "415 Unsupported Media Type" HTTP
status code if a HTTP request message's Content-Type header
field-value is not permitted by its WSDL description.

Note that these requirements do not force an instance to respond to
requests. In some cases, such as Denial of Service attacks, an
instance may choose to ignore requests.

3.4.7 HTTP Server Error Status Codes
HTTP uses the 5xx series of status codes to indicate failure due to a
server error.

R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP
status code if the response envelope is a Fault.

[1] http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#HTTP_Success_Status_Codes


On Fri, 18 Mar 2005 13:22:37 -0600, Gregory G Carter <gc...@aesgi.com> wrote:
> I furthermore...
> 
> Is there a map of the response codes you get back from the http
> transport session vs the exceptions you get for a soap request.
> 
> I think I could probably answer that one myself by cracking open the
> source code...but
> 
> I am lazy at the moment.
> 
> -gc
> 
> Anne Thomas Manes wrote:
> 
> >HTTP is a request/response protocol, so a response is always returned
> >to the client -- HTTP 200 OK. No SOAP response is returned, though.
> >
> >
> >On Fri, 18 Mar 2005 09:36:17 -0800, Jeff Greif
> ><jg...@alumni.princeton.edu> wrote:
> >
> >
> >>When a one-way operation is invoked via SOAP over HTTP, is there an HTTP
> >>response to the client, or is the connection just closed by the server?  If
> >>there is some sort of response, what is supposed to appear on the wire back
> >>to the client?
> >>
> >>Jeff
> >>
> >>
> >>
> >>
> >
> >.
> >
> >
> >
> 
>

Re: 'response' to one-way operation

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
The use case here was a test platform that simulates web services without a
real soap stack or functional implementations of those services.  For
request-response operations, it builds an http response containing the right
headers and soap envelope with content read out of a fixed document in the
file system.  The question was what should it do for a one-way operation.
It was not a question of whether the client had to know.  Anne Thomas Manes'
answer was just what I needed (as usual -- thanks Anne).

Jeff

----- Original Message ----- 
From: "Ephemeris Lappis" <ep...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Friday, March 18, 2005 11:31 AM
Subject: RE: 'response' to one-way operation


> Think that the http protocol is just a transport binding for your service.
> In the future, another binding should be selected : for the one-way call,
an
> asynchronous protocol could be a good candidate. Your client code should
not
> be aware of this technical detail, the same way your client logic should
not
> depend on the soap choice...
> I suppose that if the client soap stack doesn't throw back an error, your
> one way request has been successfully processed, and it's just what you
need
> to known...
> Onece more, it's just my opinion !
>
> --
> Philippe Maseres
>
> >>> -----Message d'origine-----
> >>> De : Gregory G Carter [mailto:gcarter@aesgi.com]
> >>> Envoye : vendredi 18 mars 2005 20:23
> >>> A : axis-user@ws.apache.org
> >>> Objet : Re: 'response' to one-way operation
> >>>
> >>>
> >>> I furthermore...
> >>>
> >>> Is there a map of the response codes you get back from the http
> >>> transport session vs the exceptions you get for a soap request.
> >>>
> >>> I think I could probably answer that one myself by cracking open the
> >>> source code...but
> >>>
> >>> I am lazy at the moment.
> >>>
> >>> -gc
> >>>
> >>> Anne Thomas Manes wrote:
> >>>
> >>> >HTTP is a request/response protocol, so a response is always returned
> >>> >to the client -- HTTP 200 OK. No SOAP response is returned, though.
> >>> >
> >>> >
> >>> >On Fri, 18 Mar 2005 09:36:17 -0800, Jeff Greif
> >>> ><jg...@alumni.princeton.edu> wrote:
> >>> >
> >>> >
> >>> >>When a one-way operation is invoked via SOAP over HTTP, is
> >>> there an HTTP
> >>> >>response to the client, or is the connection just closed by
> >>> the server?  If
> >>> >>there is some sort of response, what is supposed to appear on
> >>> the wire back
> >>> >>to the client?
> >>> >>
> >>> >>Jeff
> >>> >>
> >>> >>
> >>> >>
> >>> >>
> >>> >
> >>> >.
> >>> >
> >>> >
> >>> >
> >>>
>


RE: 'response' to one-way operation

Posted by Ephemeris Lappis <ep...@gmail.com>.
Think that the http protocol is just a transport binding for your service.
In the future, another binding should be selected : for the one-way call, an
asynchronous protocol could be a good candidate. Your client code should not
be aware of this technical detail, the same way your client logic should not
depend on the soap choice...
I suppose that if the client soap stack doesn't throw back an error, your
one way request has been successfully processed, and it's just what you need
to known...
Onece more, it's just my opinion !

--
Philippe Maseres

>>> -----Message d'origine-----
>>> De : Gregory G Carter [mailto:gcarter@aesgi.com]
>>> Envoye : vendredi 18 mars 2005 20:23
>>> A : axis-user@ws.apache.org
>>> Objet : Re: 'response' to one-way operation
>>>
>>>
>>> I furthermore...
>>>
>>> Is there a map of the response codes you get back from the http
>>> transport session vs the exceptions you get for a soap request.
>>>
>>> I think I could probably answer that one myself by cracking open the
>>> source code...but
>>>
>>> I am lazy at the moment.
>>>
>>> -gc
>>>
>>> Anne Thomas Manes wrote:
>>>
>>> >HTTP is a request/response protocol, so a response is always returned
>>> >to the client -- HTTP 200 OK. No SOAP response is returned, though.
>>> >
>>> >
>>> >On Fri, 18 Mar 2005 09:36:17 -0800, Jeff Greif
>>> ><jg...@alumni.princeton.edu> wrote:
>>> >
>>> >
>>> >>When a one-way operation is invoked via SOAP over HTTP, is
>>> there an HTTP
>>> >>response to the client, or is the connection just closed by
>>> the server?  If
>>> >>there is some sort of response, what is supposed to appear on
>>> the wire back
>>> >>to the client?
>>> >>
>>> >>Jeff
>>> >>
>>> >>
>>> >>
>>> >>
>>> >
>>> >.
>>> >
>>> >
>>> >
>>>


Re: 'response' to one-way operation

Posted by Gregory G Carter <gc...@aesgi.com>.
I furthermore...

Is there a map of the response codes you get back from the http 
transport session vs the exceptions you get for a soap request.

I think I could probably answer that one myself by cracking open the 
source code...but

I am lazy at the moment.

-gc

Anne Thomas Manes wrote:

>HTTP is a request/response protocol, so a response is always returned
>to the client -- HTTP 200 OK. No SOAP response is returned, though.
>
>
>On Fri, 18 Mar 2005 09:36:17 -0800, Jeff Greif
><jg...@alumni.princeton.edu> wrote:
>  
>
>>When a one-way operation is invoked via SOAP over HTTP, is there an HTTP
>>response to the client, or is the connection just closed by the server?  If
>>there is some sort of response, what is supposed to appear on the wire back
>>to the client?
>>
>>Jeff
>>
>>
>>    
>>
>
>.
>
>  
>


Re: 'response' to one-way operation

Posted by Anne Thomas Manes <at...@gmail.com>.
HTTP is a request/response protocol, so a response is always returned
to the client -- HTTP 200 OK. No SOAP response is returned, though.


On Fri, 18 Mar 2005 09:36:17 -0800, Jeff Greif
<jg...@alumni.princeton.edu> wrote:
> When a one-way operation is invoked via SOAP over HTTP, is there an HTTP
> response to the client, or is the connection just closed by the server?  If
> there is some sort of response, what is supposed to appear on the wire back
> to the client?
> 
> Jeff
> 
>