Examples of Fault


Examples of org.apache.cxf.interceptor.Fault

            Transformer trans = xsltTemplate.newTransformer();
            trans.transform(beforeSource, new DOMResult(out));

            return out;
        } catch (TransformerException e) {
            throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.servicemix.soap.api.Fault

            if (xmlReader.nextTag() == XMLStreamConstants.END_ELEMENT) {
                // Empty body
                message.setContent(XMLStreamReader.class, null);
            }
        } catch (XMLStreamException e) {
            throw new Fault(e);
        }
    }
View Full Code Here

Examples of org.eclipse.higgins.sts.common.Fault

  }

    private void setWstFault(IConstants constants, ISTSResponse response,
                             String reason, String detail)
    {
        final Fault fault = new Fault(
            constants.getWSTrustNamespace(),
            "wst", constants.getRequestFailedFaultCode(),
            reason, detail);

        response.setFault(fault);
View Full Code Here

Examples of org.eclipse.wst.wsdl.Fault

      boolean foundMatch = false;
      Iterator faultsIt = faults.iterator();
      while (faultsIt.hasNext())
      {
        Fault fault = (Fault)faultsIt.next();
        if (namesEqual(bindingFault.getName(), fault.getName()))
        {
          foundMatch = true;
          break;
        }
      }

      if (!foundMatch)
      {
        // We need to remove this BindingFault from the bindingFaults List
        bindingFaults.remove(index);
        index--;
      }
    }

    // Remove any Faults which already exists in bindingFaults.  What we
    // have left are the Faults which needs newly created BindingFaults
    List bindingFaultsNeeded = new ArrayList();
    for (int index = 0; index < faults.size(); index++)
    {
      Fault fault = (Fault)faults.get(index);

      boolean foundMatch = false;
      Iterator bindingFaultsIt = bindingFaults.iterator();
      while (bindingFaultsIt.hasNext())
      {
        BindingFault bindingFault = (BindingFault)bindingFaultsIt.next();
        if (namesEqual(bindingFault.getName(), fault.getName()))
        {
          foundMatch = true;
          break;
        }
      }

      if (!foundMatch)
      {
        // We need to remove this BindingFault from the bindingFaults List
        bindingFaultsNeeded.add(fault);
      }
    }

    // bindingFaultsNeeded contains the needed BindingFault's we need to create
    Iterator neededBindingFaultsIt = bindingFaultsNeeded.iterator();
    while (neededBindingFaultsIt.hasNext())
    {
      Fault fault = (Fault)neededBindingFaultsIt.next();
      BindingFault newBindingFault = factory.createBindingFault();
      newBindingFault.setEFault(fault);
      newBindingFault.setName(fault.getName());
      bindingOperation.addBindingFault(newBindingFault);
    }

    // Create the contents for each BindingFault
    Iterator faultContentIt = bindingOperation.getEBindingFaults().iterator();
View Full Code Here

Examples of org.jboss.identity.federation.org.xmlsoap.schemas.soap.envelope.Fault

      return envelope;
   }
  
   private JAXBElement<Fault> createFault(String msg)
   {
      Fault fault = SOAPFactory.getObjectFactory().createFault();
      fault.setFaultstring(msg);
      return SOAPFactory.getObjectFactory().createFault(fault);
   }
View Full Code Here

Examples of org.jboss.jbossts.xts.soapfault.Fault

        {
            soapFault.setAction(action.getURI().toString()) ;
        }

        final SoapFaultPortType faultPort = getSoapFaultPort(addressingProperties, action);
        Fault fault = soapFault.toFault();
        faultPort.soapFault(fault);
    }
View Full Code Here

Examples of org.jboss.soa.esb.message.Fault

   
    private static Message getFaultMessage(final QName code, final String description, final String detail, final Throwable th)
    {
        final Message message = MessageFactory.getInstance().getMessage() ;
        final Body body = message.getBody() ;
        final Fault fault = message.getFault() ;
        if (th != null)
        {
            fault.setCause(th);
            fault.setReason(th.toString()) ;
        }
        fault.setCode(URI.create(Factory.PROCESSING_ERROR)) ;
       
        body.add(Fault.DETAIL_CODE_CONTENT, code) ;
        if (description != null)
        {
            body.add(Fault.DETAIL_DESCRIPTION_CONTENT, description) ;
        }
        if (detail != null)
        {
            body.add(Fault.DETAIL_DETAIL_CONTENT, detail) ;
        }
        fault.setReason(description) ;
       
        return message ;
    }
View Full Code Here

Examples of org.opensaml.ws.soap.soap11.Fault

            List<XMLObject> faults = response.getBody().getUnknownXMLObjects(Fault.DEFAULT_ELEMENT_NAME);
            if (faults.size() < 1) {
                throw new SOAPClientException("HTTP status code was 500 but SOAP response did not contain a Fault");
            }
            Fault fault = (Fault) faults.get(0);

            log.debug("SOAP fault code {} with message {}", fault.getCode().getValue(), fault.getMessage().getValue());
            SOAPFaultException faultException = new SOAPFaultException("SOAP Fault: " + fault.getCode().getValue()
                    + " Fault Message: " + fault.getMessage().getValue());
            faultException.setFault(fault);
            throw faultException;
        } catch (IOException e) {
            throw new SOAPClientException("Unable to read response", e);
        }
View Full Code Here

Examples of org.riftsaw.engine.Fault

                   
                    faultCode = fault.getFaultCodeAsQName();
                }
               
                Element newfault=WSDLHelper.wrapFaultMessagePart(respelem, operation, null);
                throw new Fault(faultCode, newfault);
            }
           
            Element newresp=WSDLHelper.wrapResponseMessagePart(respelem, operation);
           
            return ((Element)newresp);
View Full Code Here

Examples of org.w3._2003._05.soap_envelope.Fault

            faultObject = method.invoke(exception);
        } catch (Exception e) {
            throw new RuntimeCamelException("Exception while trying to get fault details", e);
        }

        Fault fault = new Fault();
        Faultcode code = new Faultcode();
        code.setValue(FAULT_CODE_SERVER);
        fault.setCode(code);

        Reasontext text = new Reasontext();
        text.setValue(exception.getMessage());
        text.setLang("en");
        fault.setReason(new Faultreason().withText(text));

        Detail detailEl = new ObjectFactory().createDetail();
        @SuppressWarnings("rawtypes")
        JAXBElement<?> faultDetailContent = new JAXBElement(name, faultObject.getClass(), faultObject);
        detailEl.getAny().add(faultDetailContent);
        fault.setDetail(detailEl);
        return new ObjectFactory().createFault(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.