Examples of FaultDescription


Examples of org.apache.axis2.jaxws.description.FaultDescription

            // E) Other runtime exceptions (i.e. NullPointerException)

            // Get the FaultDescriptor matching this Exception.
            // If FaultDescriptor is found, this is a JAX-B Service Exception.
            // If not found, this is a System Exception
            FaultDescription fd =
                    operationDesc.resolveFaultByExceptionName(t.getClass().getCanonicalName());

            if (fd != null) {
                if (log.isErrorEnabled()) {
                    log.debug("Marshal as a Service Exception");
                }
                // Create the JAXB Context
                JAXBBlockContext context = new JAXBBlockContext(marshalDesc.getPackages());

                // The exception is a Service Exception. 
                // It may be (A) JAX-WS compliant exception or
                // (B) JAX-WS legacy exception

                // The faultBeanObject is a JAXB object that represents the data of the exception.
                // It is marshalled in the detail section of the soap fault. 
                // The faultBeanObject is obtained direction from the exception (A) or via
                // the legacy exception rules (B).
                Object faultBeanObject = null;

                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                String faultInfo = fd.getFaultInfo();
                if (faultInfo == null || faultInfo.length() == 0) {
                    // Legacy Exception case
                    faultBeanObject = LegacyExceptionUtil.createFaultBean(t, fd, marshalDesc);
                } else {
                    // Normal case
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

            log.debug("XMLFault Dump = " +xmlfault.dump(""));
            log.debug("OperationDesc Dump =" + operationDesc);
        }

        // Use the element name to find the matching FaultDescriptor
        FaultDescription faultDesc = null;
        if (elementQName != null) {
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);

        if (faultBeanDesc != null) {
          QName tryQName = new QName(faultBeanDesc.getFaultBeanNamespace(),
              faultBeanDesc.getFaultBeanLocalName());
          if (log.isErrorEnabled()) {
            log.debug("  FaultDescription qname is (" + tryQName +
                ") and detail element qname is (" + elementQName + ")");
          }

          if (elementQName.equals(tryQName)) {
            faultDesc = fd;
          }
        }
            }
        }

        if (faultDesc == null && elementQName != null) {
            // If not found, retry the search using just the local name
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                if (faultBeanDesc != null) {
                  String tryName = faultBeanDesc.getFaultBeanLocalName();
                  if (elementQName.getLocalPart().equals(tryName)) {
                    faultDesc = fd;
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

                if(className != null) {
                    if(log.isDebugEnabled()) {
                        log.debug("Looking for FaultDescription for class: " + className +
                                  " from @FaultAction annotation");
                    }
                    FaultDescription faultDesc = resolveFaultByExceptionName(className);
                    if (faultDesc != null)  {
                        String faultActionString = faultAction.value();
                        if (log.isDebugEnabled()) {
                            log.debug("faultAction value = "+faultActionString);
                        }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

            // E) Other runtime exceptions (i.e. NullPointerException)

            // Get the FaultDescriptor matching this Exception.
            // If FaultDescriptor is found, this is a JAX-B Service Exception.
            // If not found, this is a System Exception
            FaultDescription fd =
                    operationDesc.resolveFaultByExceptionName(t.getClass().getCanonicalName());

            if (fd != null) {
                if (log.isErrorEnabled()) {
                    log.debug("Marshal as a Service Exception");
                }
                // Create the JAXB Context
                JAXBBlockContext context = new JAXBBlockContext(marshalDesc.getPackages());

                // The exception is a Service Exception. 
                // It may be (A) JAX-WS compliant exception or
                // (B) JAX-WS legacy exception

                // The faultBeanObject is a JAXB object that represents the data of the exception.
                // It is marshalled in the detail section of the soap fault. 
                // The faultBeanObject is obtained direction from the exception (A) or via
                // the legacy exception rules (B).
                Object faultBeanObject = null;

                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                String faultInfo = fd.getFaultInfo();
                if (faultInfo == null || faultInfo.length() == 0) {
                    // Legacy Exception case
                    faultBeanObject = LegacyExceptionUtil.createFaultBean(t, fd, marshalDesc);
                } else {
                    // Normal case
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

        if (detailBlocks != null && detailBlocks.length == 1) {
            elementQName = detailBlocks[0].getQName();
        }

        // Use the element name to find the matching FaultDescriptor
        FaultDescription faultDesc = null;
        if (elementQName != null) {
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                QName tryQName = new QName(faultBeanDesc.getFaultBeanNamespace(),
                                           faultBeanDesc.getFaultBeanLocalName());
                if (log.isErrorEnabled()) {
                    log.debug("  FaultDescription qname is (" + tryQName +
                            ") and detail element qname is (" + elementQName + ")");
                }
                if (elementQName.equals(tryQName)) {
                    faultDesc = fd;
                }
            }
        }

        if (faultDesc == null && elementQName != null) {
            // If not found, retry the search using just the local name
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                String tryName = faultBeanDesc.getFaultBeanLocalName();
                if (elementQName.getLocalPart().equals(tryName)) {
                    faultDesc = fd;
                }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

            // E) Other runtime exceptions (i.e. NullPointerException)

            // Get the FaultDescriptor matching this Exception.
            // If FaultDescriptor is found, this is a JAX-B Service Exception.
            // If not found, this is a System Exception
            FaultDescription fd =
                    operationDesc.resolveFaultByExceptionName(t.getClass().getCanonicalName());

            if (fd != null) {
                if (log.isErrorEnabled()) {
                    log.debug("Marshal as a Service Exception");
                }
                // Create the JAXB Context
                JAXBBlockContext context = new JAXBBlockContext(marshalDesc.getPackages());

                // The exception is a Service Exception. 
                // It may be (A) JAX-WS compliant exception or
                // (B) JAX-WS legacy exception

                // The faultBeanObject is a JAXB object that represents the data of the exception.
                // It is marshalled in the detail section of the soap fault. 
                // The faultBeanObject is obtained direction from the exception (A) or via
                // the legacy exception rules (B).
                Object faultBeanObject = null;

                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                String faultInfo = fd.getFaultInfo();
                if (faultInfo == null || faultInfo.length() == 0) {
                    // Legacy Exception case
                    faultBeanObject = LegacyExceptionUtil.createFaultBean(t, fd, marshalDesc);
                } else {
                    // Normal case
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

        if (detailBlocks != null && detailBlocks.length == 1) {
            elementQName = detailBlocks[0].getQName();
        }

        // Use the element name to find the matching FaultDescriptor
        FaultDescription faultDesc = null;
        if (elementQName != null) {
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);

        if (faultBeanDesc != null) {
          QName tryQName = new QName(faultBeanDesc.getFaultBeanNamespace(),
              faultBeanDesc.getFaultBeanLocalName());
          if (log.isErrorEnabled()) {
            log.debug("  FaultDescription qname is (" + tryQName +
                ") and detail element qname is (" + elementQName + ")");
          }

          if (elementQName.equals(tryQName)) {
            faultDesc = fd;
          }
        }
            }
        }

        if (faultDesc == null && elementQName != null) {
            // If not found, retry the search using just the local name
            for (int i = 0; i < operationDesc.getFaultDescriptions().length && faultDesc == null;
                 i++) {
                FaultDescription fd = operationDesc.getFaultDescriptions()[i];
                FaultBeanDesc faultBeanDesc = marshalDesc.getFaultBeanDesc(fd);
                if (faultBeanDesc != null) {
                  String tryName = faultBeanDesc.getFaultBeanLocalName();
                  if (elementQName.getLocalPart().equals(tryName)) {
                    faultDesc = fd;
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

                if(className != null) {
                    if(log.isDebugEnabled()) {
                        log.debug("Looking for FaultDescription for class: " + className +
                                  " from @FaultAction annotation");
                    }
                    FaultDescription faultDesc = resolveFaultByExceptionName(className);
                    if (faultDesc != null)  {
                        newAxisOperation.addFaultAction(className, faultAction.value());
                    }
                }
            }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

        FaultAction[] faultActions = getFaultActions();
       
        if (faultActions != null) {
            for (FaultAction faultAction : faultActions) {
                String className = faultAction.className().getName();
                FaultDescription faultDesc = resolveFaultByExceptionName(className);
                if (faultDesc != null)  {
                    newAxisOperation.addFaultAction(className, faultAction.value());
                }
            }
        }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.FaultDescription

                if(className != null) {
                    if(log.isDebugEnabled()) {
                        log.debug("Looking for FaultDescription for class: " + className +
                                  " from @FaultAction annotation");
                    }
                    FaultDescription faultDesc = resolveFaultByExceptionName(className);
                    if (faultDesc != null)  {
                        String faultActionString = faultAction.value();
                        if (log.isDebugEnabled()) {
                            log.debug("faultAction value = "+faultActionString);
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.