Deepal, *PLEASE* fix your IDE to not make unnecessary whitespace changes. *PLEASE* review your changes before you check in to make sure there are no whitespace changes.
It's very difficult to review patches if there are so many whitespace changes. I'd even recommend using command line svn to run "svn diff" and "svn commit" if you can't get your IDE to behave. thanks, dims On 11/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Author: deepal Date: Wed Nov 8 05:33:45 2006 New Revision: 472488 URL: http://svn.apache.org/viewvc?view=rev&rev=472488 Log: We not handling two channel case with HTTP , it was sending HTTP 200 in two channel case for the initiator but it should send HTTP 202 Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/Utils.java Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java?view=diff&rev=472488&r1=472487&r2=472488 ============================================================================== --- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java (original) +++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java Wed Nov 8 05:33:45 2006 @@ -190,6 +190,8 @@ public static final char SERVICE_NAME_SPLIT_CHAR = ':'; public static final String SERVICE_GROUP_ID = "ServiceGroupId"; public static final String RESPONSE_WRITTEN = "CONTENT_WRITTEN"; + //To have a floag if the replyTo is not annon one + public static final String DIFFERENT_EPR = "DIFFERENT_EPR"; /** * Transport Info Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?view=diff&rev=472488&r1=472487&r2=472488 ============================================================================== --- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java (original) +++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java Wed Nov 8 05:33:45 2006 @@ -738,6 +738,7 @@ */ public void setTargetEPR(EndpointReference targetEpr) { serviceContext.setTargetEPR(targetEpr); + options.setTo(targetEpr); } Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java?view=diff&rev=472488&r1=472487&r2=472488 ============================================================================== --- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java (original) +++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/transport/http/HTTPWorker.java Wed Nov 8 05:33:45 2006 @@ -43,9 +43,9 @@ } public void service( - final HttpRequest request, - final HttpResponse response, - final MessageContext msgContext) throws HttpException, IOException { + final HttpRequest request, + final HttpResponse response, + final MessageContext msgContext) throws HttpException, IOException { ConfigurationContext configurationContext = msgContext.getConfigurationContext(); final String servicePath = configurationContext.getServiceContextPath(); @@ -55,7 +55,7 @@ String uri = request.getRequestLine().getUri(); String method = request.getRequestLine().getMethod(); String soapAction = HttpUtils.getSoapAction(request); - + // Adjust version and content chunking based on the config boolean chunked = false; TransportOutDescription transportOut = msgContext.getTransportOut(); @@ -75,7 +75,7 @@ } } } - + if (method.equals(HTTPConstants.HEADER_GET)) { if (uri.equals("/favicon.ico")) { response.setStatusLine(new StatusLine(ver, 301, "Redirect")); @@ -111,7 +111,7 @@ public void writeTo(final OutputStream outstream) throws IOException { service.printWSDL2(outstream, ip, servicePath); } - + }); entity.setContentType("text/xml"); entity.setChunked(chunked); @@ -130,7 +130,7 @@ public void writeTo(final OutputStream outstream) throws IOException { service.printWSDL(outstream, ip, servicePath); } - + }); entity.setContentType("text/xml"); entity.setChunked(chunked); @@ -148,7 +148,7 @@ public void writeTo(final OutputStream outstream) throws IOException { service.printSchema(outstream); } - + }); entity.setContentType("text/xml"); entity.setChunked(chunked); @@ -168,7 +168,7 @@ service.populateSchemaMappings(); //write out the correct schema Map schemaTable = service.getSchemaMappingTable(); - final XmlSchema schema = (XmlSchema)schemaTable.get(schemaName); + final XmlSchema schema = (XmlSchema) schemaTable.get(schemaName); //schema found - write it to the stream if (schema != null) { EntityTemplate entity = new EntityTemplate(new ContentProducer() { @@ -176,7 +176,7 @@ public void writeTo(final OutputStream outstream) throws IOException { schema.write(outstream); } - + }); entity.setContentType("text/xml"); entity.setChunked(chunked); @@ -190,19 +190,19 @@ } } - OutputBuffer outbuffer = new OutputBuffer(); + OutputBuffer outbuffer = new OutputBuffer(); msgContext.setProperty(MessageContext.TRANSPORT_OUT, outbuffer); msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, outbuffer); // deal with GET request boolean processed = HTTPTransportUtils.processHTTPGetRequest( - msgContext, - outbuffer.getOutputStream(), - soapAction, + msgContext, + outbuffer.getOutputStream(), + soapAction, uri, configurationContext, HTTPTransportReceiver.getGetRequestParameters(uri)); - + if (processed) { outbuffer.setChunked(chunked); response.setEntity(outbuffer); @@ -214,11 +214,11 @@ entity.setChunked(chunked); response.setEntity(entity); } - + } else if (method.equals(HTTPConstants.HEADER_POST)) { // deal with POST request - OutputBuffer outbuffer = new OutputBuffer(); + OutputBuffer outbuffer = new OutputBuffer(); msgContext.setProperty(MessageContext.TRANSPORT_OUT, outbuffer); msgContext.setProperty(Constants.OUT_TRANSPORT_INFO, outbuffer); @@ -228,27 +228,35 @@ contenttype = inentity.getContentType().getValue(); } HTTPTransportUtils.processHTTPPostRequest( - msgContext, - inentity.getContent(), + msgContext, + inentity.getContent(), outbuffer.getOutputStream(), - contenttype, - soapAction, + contenttype, + soapAction, uri); - + outbuffer.setChunked(chunked); response.setEntity(outbuffer); - + } else { throw new MethodNotSupportedException(method + " method not supported"); } - + // Finalize response OperationContext operationContext = msgContext.getOperationContext(); Object contextWritten = null; + Object isTwoChannel = null; if (operationContext != null) { contextWritten = operationContext.getProperty(Constants.RESPONSE_WRITTEN); + isTwoChannel = operationContext.getProperty(Constants.DIFFERENT_EPR); } + + if ((contextWritten != null) && Constants.VALUE_TRUE.equals(contextWritten)) { + if ((isTwoChannel != null) && Constants.VALUE_TRUE.equals(isTwoChannel)) { + response.setStatusLine(new StatusLine(ver, 202, "OK")); + return; + } response.setStatusLine(new StatusLine(ver, 200, "OK")); } else { response.setStatusLine(new StatusLine(ver, 202, "OK")); Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/Utils.java URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/Utils.java?view=diff&rev=472488&r1=472487&r2=472488 ============================================================================== --- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/Utils.java (original) +++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/util/Utils.java Wed Nov 8 05:33:45 2006 @@ -58,7 +58,7 @@ newmsgCtx.setSessionContext(inMessageContext.getSessionContext()); newmsgCtx.setTransportIn(inMessageContext.getTransportIn()); newmsgCtx.setTransportOut(inMessageContext.getTransportOut()); - + Options oldOptions = inMessageContext.getOptions(); @@ -84,18 +84,17 @@ replyToEPR.addReferenceParameter(new QName(Constants.AXIS2_NAMESPACE_URI, Constants.SERVICE_GROUP_ID, Constants.AXIS2_NAMESPACE_PREFIX), serviceGroupContextId); } + } else { + newmsgCtx.setReplyTo(new EndpointReference(AddressingConstants.Final.WSA_NONE_URI)); } - else { - newmsgCtx.setReplyTo(new EndpointReference(AddressingConstants.Final.WSA_NONE_URI)); - } - + AxisOperation ao = inMessageContext.getAxisOperation(); if (ao.getOutputAction() != null) { newmsgCtx.setWSAAction(ao.getOutputAction()); } else { newmsgCtx.setWSAAction(oldOptions.getAction()); } - + newmsgCtx.setAxisMessage(ao.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE)); newmsgCtx.setOperationContext(inMessageContext.getOperationContext()); newmsgCtx.setServiceContext(inMessageContext.getServiceContext()); @@ -133,6 +132,8 @@ } newmsgCtx.setTransportOut(transportOut); } + inMessageContext.getOperationContext().setProperty( + Constants.DIFFERENT_EPR, Constants.VALUE_TRUE); } } } catch (URISyntaxException e) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
