Examples of BaseFaultType


Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties.BaseFaultType

    *
    * @return Axis-generated BaseFaultType
    */
   public static BaseFaultType toAxisBaseFault( BaseFaultException base_fault )
   {
      BaseFaultType axis_base_fault = createEquivalentAxisBaseFault( base_fault );

      axis_base_fault.setFaultActor( base_fault.getFaultActor(  ) );
      axis_base_fault.setFaultCode( base_fault.getFaultCode(  ) );
      axis_base_fault.setFaultString( base_fault.getFaultString(  ) );
      axis_base_fault.setDescription( base_fault.getDescription(  ) );
      axis_base_fault.setTimestamp( base_fault.getTimestamp(  ) );
      axis_base_fault.setStackTrace( base_fault.getStackTrace(  ) );
      axis_base_fault.setErrorCode( toAxisErrorCode( base_fault ) );

      BaseFaultException[] base_faults = base_fault.getFaultCause(  );

      if ( base_faults != null )
      {
         BaseFaultType[] axis_base_faults = new BaseFaultType[base_faults.length];

         for ( int i = 0; i < base_faults.length; i++ )
         {
            axis_base_faults[i] = toAxisBaseFault( base_faults[i] );
         }

         axis_base_fault.setFaultCause( axis_base_faults );
      }

      axis_base_fault.setOriginator( toAxisEndpointReference( base_fault ) );

      return axis_base_fault;
   }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties.BaseFaultType

    * @return Axis-generated BaseFaultType
    */
   private static BaseFaultType createEquivalentAxisBaseFault( BaseFaultException base_fault )
   {
      Class         axis_fault_class = (Class) BASE_FAULT_TO_AXIS_FAULT_MAP.get( base_fault.getClass(  ) );
      BaseFaultType axis_base_type = null;

      if ( axis_fault_class != null )
      {
         try
         {
            axis_base_type = (BaseFaultType) axis_fault_class.newInstance(  );
         }
         catch ( Exception e )
         {
            throw new RuntimeException( e );
         }
      }
      else
      {
         axis_base_type = new BaseFaultType(  );
      }

      return axis_base_type;
   }
View Full Code Here

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties.BaseFaultType

    *
    * @param rufe The ResourceUnknownFaultException to convert to a SOAPFaultException
    */
   private void throwSOAPFaultExceptionWithDetails( ResourceUnknownFaultException rufe )
   {
      BaseFaultType bft     = AxisGenTypesUtils.toAxisBaseFault( rufe );
      Detail        detail  = new Detail(  );
      Element[]     details = bft.getFaultDetails(  );

      for ( int i = 0; i < details.length; i++ )
      {
         try
         {
            detail.addChildElement( SaajUtils.toSOAPElement( details[i] ) );
         }
         catch ( SOAPException e1 )
         {
            throw new JAXRPCException( e1.getLocalizedMessage(  ) );
         }
      }

      throw new SOAPFaultException( bft.getFaultCode(  ),
                                    bft.getFaultString(  ),
                                    bft.getFaultActor(  ), detail );
   }
View Full Code Here

Examples of org.apache.ws.resource.faults.axis.BaseFaultType

         handleRequest( msgContext );
         handleResponse( msgContext );
      }
      catch ( BaseFaultException bfe )
      {
         throw new BaseFaultType( bfe );
      }
   }
View Full Code Here

Examples of org.oasis.wsrf.faults.BaseFaultType

     */
    public static BaseFaultType makeFault(Class faultClass,
                                          String errMsg,
                                          Throwable t) {

        BaseFaultType fault = null;
        try {
            fault = (BaseFaultType) faultClass.newInstance();
            final FaultHelper faultHelper = new FaultHelper(fault);
            if (errMsg != null) {
                faultHelper.addDescription(errMsg);
            }

            if (t != null) {
                final BaseFaultType faultCause;
                if (t instanceof BaseFaultType) {
                    faultCause = (BaseFaultType) t;
                } else {
                    faultCause = FaultHelper.toBaseFault(t);
                }
View Full Code Here

Examples of org.oasis.wsrf.faults.BaseFaultType

    public static BaseFaultType makeFault(Class faultClass,
                                          String errMsg,
                                          Throwable t) {

        BaseFaultType fault = null;
        try {
            fault = (BaseFaultType) faultClass.newInstance();
            final FaultHelper faultHelper = new FaultHelper(fault);
            if (errMsg != null) {
                faultHelper.addDescription(errMsg);
            }

            if (t != null) {
                final BaseFaultType faultCause;
                if (t instanceof BaseFaultType) {
                    faultCause = (BaseFaultType) t;
                } else {
                    faultCause = FaultHelper.toBaseFault(t);
                }
View Full Code Here

Examples of org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType

        parentCursor.toPrevSibling();
        XmlObject childXBean = parentCursor.getObject();
        parentCursor.dispose();
        //BaseFaultDocument baseFaultDocument = BaseFaultDocument.Factory.newInstance( );
        //BaseFaultType baseFaultType = baseFaultDocument.addNewBaseFault();
        BaseFaultType baseFaultType = BaseFaultType.Factory.newInstance( );
        baseFaultType.setTimestamp( Calendar.getInstance( ) );
        childXBean.set( baseFaultType );
        System.out.println( "AFTER:\n" + oldValue.xmlText( new XmlOptions().setSaveOuter() ) );

        ResourcePropertyValueChangeNotificationDocument resourcePropertyValueChangeNotificationDocument1 = ResourcePropertyValueChangeNotificationDocument.Factory.newInstance();
        ResourcePropertyValueChangeNotificationType resourcePropertyValueChangeNotificationType1 = resourcePropertyValueChangeNotificationDocument.addNewResourcePropertyValueChangeNotification();
View Full Code Here

Examples of org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType

      XmlObject childXBean = parentCursor.getObject(  );
      parentCursor.dispose(  );

      //BaseFaultDocument baseFaultDocument = BaseFaultDocument.Factory.newInstance( );
      //BaseFaultType baseFaultType = baseFaultDocument.addNewBaseFault();
      BaseFaultType baseFaultType = BaseFaultType.Factory.newInstance(  );
      baseFaultType.setTimestamp( Calendar.getInstance(  ) );
      childXBean.set( baseFaultType );
      System.out.println( "AFTER:\n" + oldValue.xmlText( new XmlOptions(  ).setSaveOuter(  ) ) );

      ResourcePropertyValueChangeNotificationDocument      resourcePropertyValueChangeNotificationDocument1 =
         ResourcePropertyValueChangeNotificationDocument.Factory.newInstance(  );
View Full Code Here

Examples of org.oasis_open.docs.wsrf.bf_2.BaseFaultType

            output = webMethod.invoke(pojo, new Object[] {input });
        } catch (InvocationTargetException e) {
            if (e.getCause() instanceof Exception) {
                WebFault fa = (WebFault) e.getCause().getClass().getAnnotation(WebFault.class);
                if (!(exchange instanceof InOnly) && fa != null) {
                    BaseFaultType info = (BaseFaultType) e.getCause().getClass().getMethod("getFaultInfo").invoke(
                            e.getCause());
                    Fault fault = exchange.createFault();
                    exchange.setFault(fault);
                    exchange.setError((Exception) e.getCause());
                    StringWriter writer = new StringWriter();
View Full Code Here

Examples of org.oasis_open.docs.wsrf.bf_2.BaseFaultType

      output = webMethod.invoke(pojo, new Object[] { input });
    } catch (InvocationTargetException e) {
      if (e.getCause() instanceof Exception) {
        WebFault fa = (WebFault) e.getCause().getClass().getAnnotation(WebFault.class);
        if (exchange instanceof InOnly == false && fa != null) {
          BaseFaultType info = (BaseFaultType) e.getCause().getClass().getMethod("getFaultInfo").invoke(e.getCause());
          Fault fault = exchange.createFault();
          exchange.setFault(fault);
          exchange.setError((Exception) e.getCause());
          StringWriter writer = new StringWriter();
          jaxbContext.createMarshaller().marshal(new JbiFault(info), writer);
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.