I've never seen a payload sent with 202. Tried googling for it with no luck.

Thanks,
Keith.

On Fri, Sep 26, 2008 at 5:21 PM, Markus Tost <[EMAIL PROTECTED]> wrote:

> Sorry, I was wrong. HTTP allows a response, and at least SOAP 1.2 allows a
> response with 202, but not specifies the behaviour. [1]
>
> In Axis2, as I see, the org.apache.axis2.transport.http.HTTPSender sender
> ignores the response and just drops the InputStream, in case of status code
> 202 [2].
>
> @all: What's your opinion?
>
> Thanks,
> Markus
>
> [1] see
> http://www.w3.org/TR/2007/REC-soap12-part2-20070427/#http-reqbindrecstate
> "The response MAY be of content type other than "application/soap+xml".
> Such usage is considered non-normative, and accordingly is not modeled in
> the state machine. Interpretation of such responses is at the discretion of
> the receiver. Similarly, receipt of any response entity-body with a status
> code of 202 is not normative. If such an unexpected response is of type
> "application/soap+xml", then SOAP processing of that response is beyond the
> scope of the specification for this binding."
>
> [2]
>       if (statusCode == HttpStatus.SC_OK) {
>           processResponse(method, msgContext);
>       } else if (statusCode == HttpStatus.SC_ACCEPTED) {
>       } else if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR || ...
>
> Gordon Rogers schrieb:
>
>  >From my understanding status code 202 means that the service has
>> accepted the response and may process it. The HTTP spec does say that
>> the response should contain an indication of the request's current state
>> which I take it can mean that a payload is allowed.
>>
>> The service I'm trying to build against specifies that an ebXML
>> acknowledgement will be returned on the same connection with a status
>> code of 202, so that's the behaviour I'm trying to mimic in my test
>> harness.
>>
>> Will keep on investigating and post any findings.
>>
>> Thanks,
>> Gordon
>>
>> -----Original Message-----
>> From: Markus Tost [mailto:[EMAIL PROTECTED] Sent: 26 September 2008
>> 11:15
>> To: axis-user@ws.apache.org
>> Subject: Re: ANON_OUT_IN_OP and HTTP 202 Status Code
>>
>> Hi Gordon,
>>
>> why do you need to use status code 202? It's only for HTTP-Responses
>> without payload, isn't it?
>>
>> I guess Axis2 transport mechanism drops the connection without getting the
>> InputStream in case of status code 202.
>>
>> Thanks,
>> Markus
>>
>> Gordon Rogers schrieb:
>>
>>
>>> Hi
>>>
>>> I'm having some difficulty with using the ANON_OUT_IN_OP MEP when the
>>> status code of the response is not 200 ok. I'm implementing a specification
>>> that takes a request and returns a response on the same connection, but with
>>> a status code of 202. Since the request and response are on the same
>>> connection I need to use the In-Out MEP, I
>>>
>>>
>> think.
>>
>>
>>> Everything works fine when the service responds with a status code of
>>> 200, but as soon as I change the status code (and nothing else) the
>>> following error occurs on the client:
>>>
>>> org.apache.axis2.AxisFault: The input stream for an incoming message is
>>> null.
>>>
>>> at
>>>
>>>
>> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
>> ls.java:72)
>>
>>
>>> at
>>>
>>>
>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
>> InAxisOperation.java:353)
>>
>>
>>> at
>>>
>>>
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
>> ation.java:416)
>>
>>
>>> at
>>>
>>>
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
>> xisOperation.java:228)
>>
>>
>>> at
>>>
>>>
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
>> )
>>
>>
>>> My request looks like:
>>>
>>> POST /fis/FISservices/TestService HTTP/1.1
>>>
>>> Content-Type: multipart/related;
>>> boundary=MIMEBoundaryurn_uuid_41FA027BFE1CB14DFB1222419358456;
>>> type="text/xml"; start="<
>>> 0.urn:uuid:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>>> >"
>>>
>>> SOAPAction: "urn:anonOutInOp"
>>>
>>> User-Agent: Axis2
>>>
>>> Host: 127.0.0.1
>>>
>>> Transfer-Encoding: chunked
>>>
>>> 940
>>>
>>> --MIMEBoundaryurn_uuid_41FA027BFE1CB14DFB1222419358456
>>>
>>> Content-Type: text/xml; charset=UTF-8
>>>
>>> Content-Transfer-Encoding: 8bit
>>>
>>> Content-ID: <0.urn:uuid:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>>> >
>>>
>>> <?xml version='1.0' encoding='UTF-8'?>
>>>
>>> <soapenv:Envelope xmlns:soapenv="
>>> http://schemas.xmlsoap.org/soap/envelope/";
>>>
>>>
>> xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-head
>> er-2_0.xsd">
>>
>>
>>> <soapenv:Header>
>>>
>>> <eb:MessageHeader eb:version="2.0" soapenv:mustUnderstand="1">
>>>
>>> <eb:From>
>>>
>>> <eb:PartyId eb:type="type">from_party</eb:PartyId>
>>>
>>> </eb:From>
>>>
>>> <eb:To>
>>>
>>> <eb:PartyId eb:type="type">to_party</eb:PartyId>
>>>
>>> </eb:To>
>>>
>>> <eb:CPAId>1234-5678-9012-3456</eb:CPAId>
>>>
>>>
>>>
>>>
>> <eb:ConversationId>9ddf202fc0a800e600f4f44a53ab205c</eb:ConversationId>
>>
>>
>>> <eb:Service>service</eb:Service>
>>>
>>> <eb:Action>action</eb:Action>
>>>
>>> <eb:MessageData>
>>>
>>> <eb:MessageId>9ddf1f15c0a800e600f4f44af5c3e3d2</eb:MessageId>
>>>
>>> <eb:Timestamp>2008-09-26T09:55:57.743+01:00</eb:Timestamp>
>>>
>>> </eb:MessageData>
>>>
>>> <eb:DuplicateElimination />
>>>
>>> </eb:MessageHeader>
>>>
>>> <eb:AckRequested soapenv:mustUnderstand="1" eb:signed="false"
>>> eb:version="2.0" eb:actor="actor" />
>>>
>>> <eb:SyncReply/>
>>>
>>> </soapenv:Header>
>>>
>>> <soapenv:Body>
>>>
>>> <eb:Manifest eb:version="2.0">
>>>
>>> <eb:Reference xmlns:axis2ns3="http://www.w3.org/1999/xlink";
>>> axis2ns3:href="urn:uuid:41FA027BFE1CB14DFB1222419357634" />
>>>
>>> </eb:Manifest>
>>>
>>> </soapenv:Body>
>>>
>>> </soapenv:Envelope>
>>>
>>> b44
>>>
>>> --MIMEBoundaryurn_uuid_41FA027BFE1CB14DFB1222419358456
>>>
>>> [... I've left of the attachment for brevity ...]
>>>
>>> My response looks like:
>>>
>>> HTTP/1.1 100 Continue
>>>
>>> Server: Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)
>>>
>>> Date: Fri, 26 Sep 2008 08:55:57 GMT
>>>
>>> HTTP/1.1 202 Accepted
>>>
>>> Date: Fri, 26 Sep 2008 08:55:58 GMT
>>>
>>> Server: Oracle Application Server Containers for J2EE 10g (9.0.4.2.0)
>>>
>>> Connection: Close
>>>
>>> Content-Type: text/xml; charset=utf-8
>>>
>>> Transfer-Encoding: chunked
>>>
>>> 113
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <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>
>>>
>>> <soapenv:dog/>
>>>
>>> </soapenv:Body>
>>>
>>> </soapenv:Envelope>
>>>
>>> 0
>>>
>>> I'm hoping there's something obvious I'm missing as I don't think any of
>>> the other message patterns match what I need.
>>>
>>> Thanks in advance for any help. If you need more information let me
>>>
>>>
>> know.
>>
>>
>>> Gordon
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to