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

        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.wijiscommons.ssaf.drop_off.wrapper.FaultDescription

        
        if (invocationType.equals("WebService"))
        {   
                      
            log.error("Error occurred due to : " + ssafErrorMessage);
            FaultDescription faultDescription = new FaultDescription();
            faultDescription.setAny(returnDoc.getDocumentElement());
            FatalFault fault = new FatalFault(ssafErrorMessage, faultDescription);
            exchange.getFault().setBody(fault);
           
        }
View Full Code Here

Examples of org.wijiscommons.ssaf.drop_off.wrapper.FaultDescription

   
    Element errorDocumentElement = Drop_OffUtil.createDropOffErrorMessage(
        "TestRecordURI", null, null, null,
        SSAFErrorTypes.REQUEST_INVALID, "mailBoxName", null);
   
    FaultDescription faultDescription = new FaultDescription();
    faultDescription.setAny(errorDocumentElement);

    FatalFault fault = new FatalFault(sb.getMergedMessages(),
        faultDescription);
    //throw new Fault(fault);
View Full Code Here

Examples of org.wijiscommons.ssaf.drop_off.wrapper.FaultDescription

        
        if (invocationType.equals("WebService"))
        {   
                      
            log.error("Error occurred due to : " + ssafErrorMessage);
            FaultDescription faultDescription = new FaultDescription();
            faultDescription.setAny(returnDoc.getDocumentElement());
            FatalFault fault = new FatalFault(ssafErrorMessage, faultDescription);
            exchange.setException( fault );
        }

           
View Full Code Here

Examples of org.wijiscommons.ssaf.drop_off.wrapper.FaultDescription

                  mailBoxURI,
                   null);
    }
    log.error("Error occurred due to : " + serviceResponseInfo.getMergedMessages());

    FaultDescription faultDescription = new FaultDescription();
    faultDescription.setAny(errorDocumentElement);

    FatalFault fault = new FatalFault(serviceResponseInfo.getMergedMessages(),
        faultDescription);
    throw new Fault(fault);
  }
View Full Code Here

Examples of org.wijiscommons.ssaf.drop_off.wrapper.FaultDescription

        
        if (invocationType.equals("WebService"))
        {   
                      
            log.error("Error occurred due to : " + ssafErrorMessage);
            FaultDescription faultDescription = new FaultDescription();
            faultDescription.setAny(returnDoc.getDocumentElement());
            FatalFault fault = new FatalFault(ssafErrorMessage, faultDescription);
            exchange.setException( fault );
        }

           
View Full Code Here

Examples of org.wijiscommons.ssaf.pick_up.wrapper.FaultDescription

            {
                Document errorResponse = DomUtils.createErrorResponse(null,
                    null, messageID, sb.getMergedMessages(), null,
                    SSAFErrorTypes.REQUEST_USER_UNAUTHORIZED, nominalURI, null);
               
                FaultDescription faultDescr = new FaultDescription();
                faultDescr.setAny(errorResponse.getDocumentElement());
                FatalFault ssafFault =
                    new FatalFault(sb.getMergedMessages(), faultDescr);

                throw new Fault(ssafFault);
            }
View Full Code Here

Examples of org.wijiscommons.ssaf.search.wrapper.FaultDescription

            errorTypes);
        log.error("Error occurred due to : " + sb.getMergedMessages());
      }
    }
   
    FaultDescription faultDescription = new FaultDescription();
    if(errorDocument != null)
    {
       faultDescription.setAny(errorDocument.getDocumentElement());
    }

    FatalFault fault = new FatalFault(sb.getMergedMessages(), faultDescription);
    throw new Fault(fault);
  }
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.