Hi, I guess 202 is correct HTTP response code for oneWay operation.
WSI-BasicProfile 3.5.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. HTTP-TRANSPORT NOT_TESTABLE R1111 An INSTANCE SHOULD use a "200 OK" HTTP status code on a response message that contains an envelope that is not a fault. HTTP-TRANSPORT TESTABLE BP1100 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. HTTP-TRANSPORT TESTABLE BP1101 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. Regards, Andrei. > -----Original Message----- > From: sanjeevghimire [mailto:[email protected]] > Sent: Freitag, 11. Juli 2014 22:58 > To: [email protected] > Subject: web service with void method returning 202 > > Hi all, > > I have a webservice which has no return type. I removed the @oneWay > annotation since it was returning 202 but it still returns 202. How can we > change it to return 200 with the void method. > > thank for help. > > Sanjeev > > @WebMethod(action = "notify") > public void notify( > @WebParam(partName = "parameters", name = > "notify", targetNamespace = > "urn:pershing:utf.tradealert.notify") > com.barcapint.baits.ws.tradealertnotify.beans.Notify parameters) > throws AlertMessageSOAPFaultException; > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/web-service- > with-void-method-returning-202-tp5746375.html > Sent from the cxf-user mailing list archive at Nabble.com.
