axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: svn commit: r541537 - in /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2: description/OutInAxisOperation.java description/RobustOutOnlyAxisOperation.java transport/http/HTTPSender.java
Date Fri, 25 May 2007 04:34:55 GMT
Deepal,

Did you see my earlier note about not checking in stuff to Axis2 1.2 branch?

thanks,
dims

On 5/25/07, deepal@apache.org <deepal@apache.org> wrote:
> Author: deepal
> Date: Thu May 24 21:32:17 2007
> New Revision: 541537
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=541537
> Log:
> when there is a fault coming to system when Security is engaged , Client API does not
throw the exception. It returns SOAP fault as the response.
>
> Modified:
>     webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
>     webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
>     webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
>
> Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=541537&r1=541536&r2=541537
> ==============================================================================
> --- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
> +++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
Thu May 24 21:32:17 2007
> @@ -364,9 +364,7 @@
>          }
>          SOAPEnvelope resenvelope = responseMessageContext.getEnvelope();
>          if (resenvelope != null) {
> -            if (resenvelope.getBody().hasFault()) {
> -                SOAPFault soapFault = resenvelope.getBody().getFault();
> -                //we need to call engine.receiveFault
> +            if (resenvelope.getBody().hasFault()||responseMessageContext.isProcessingFault())
{
>                  engine = new AxisEngine(msgctx.getConfigurationContext());
>                  engine.receiveFault(responseMessageContext);
>                  if (options.isExceptionToBeThrownOnSOAPFault()) {
> @@ -377,6 +375,13 @@
>              } else {
>                  engine = new AxisEngine(msgctx.getConfigurationContext());
>                  engine.receive(responseMessageContext);
> +                if(responseMessageContext.getEnvelope().getBody().hasFault()){
> +                    if (options.isExceptionToBeThrownOnSOAPFault()) {
> +                        // does the SOAPFault has a detail element for Excpetion
> +                        AxisFault af = Utils.getInboundFaultFromMessageContext(responseMessageContext);
> +                        throw af;
> +                    }
> +                }
>                  if (responseMessageContext.getReplyTo() != null) {
>                      sc.setTargetEPR(responseMessageContext.getReplyTo());
>                  }
>
> Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java?view=diff&rev=541537&r1=541536&r2=541537
> ==============================================================================
> --- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
(original)
> +++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/description/RobustOutOnlyAxisOperation.java
Thu May 24 21:32:17 2007
> @@ -102,7 +102,7 @@
>                  responseMessageContext.setEnvelope(envelope);
>              }
>              if (envelope != null) {
> -                if (envelope.getBody().hasFault()) {
> +                if (envelope.getBody().hasFault()|| responseMessageContext.isProcessingFault())
{
>                      //receiving a fault
>                      engine.receiveFault(responseMessageContext);
>                      AxisFault af = Utils.getInboundFaultFromMessageContext(responseMessageContext);
>
> Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java?view=diff&rev=541537&r1=541536&r2=541537
> ==============================================================================
> --- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
(original)
> +++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
Thu May 24 21:32:17 2007
> @@ -21,7 +21,9 @@
>  import org.apache.axiom.soap.SOAP12Constants;
>  import org.apache.axis2.AxisFault;
>  import org.apache.axis2.Constants;
> +import org.apache.axis2.wsdl.WSDLConstants;
>  import org.apache.axis2.context.MessageContext;
> +import org.apache.axis2.context.OperationContext;
>  import org.apache.axis2.i18n.Messages;
>  import org.apache.axis2.transport.MessageFormatter;
>  import org.apache.axis2.transport.TransportUtils;
> @@ -311,7 +313,14 @@
>              if (contenttypeHeader != null) {
>                  value = contenttypeHeader.getValue();
>              }
> -
> +            OperationContext opContext = msgContext.getOperationContext();
> +            if(opContext!=null){
> +                MessageContext inMessageContext =
> +                        opContext.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
> +                if(inMessageContext!=null){
> +                    inMessageContext.setProcessingFault(true);
> +                }
> +            }
>              if (value != null) {
>
>                  processResponse(method, msgContext);
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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


Mime
View raw message