Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFault


    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        SOAPFault fault = soapFactory.createSOAPFault(body);
        SOAPFaultDetail soapFaultDetail = soapFactory.createSOAPFaultDetail(fault);
        OMNamespace omNamespace = soapFactory.createOMNamespace("http://www.test.org", "test");
        Iterator iterator = soapFaultDetail.getAllDetailEntries();
        assertFalse(
                "SOAP Fault Detail Test : - After creating SOAP11FaultDetail element, it has DetailEntries",
View Full Code Here


    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        SOAPFault fault = soapFactory.createSOAPFault(body);
        SOAPFaultDetail soapFaultDetail = soapFactory.createSOAPFaultDetail(fault);
        OMNamespace omNamespace = soapFactory.createOMNamespace("http://www.test.org", "test");
        soapFaultDetail.addDetailEntry(
                soapFactory.createOMElement("DetailEntry1", omNamespace));
        soapFaultDetail.addDetailEntry(
View Full Code Here

    }

    protected void runTest() throws Throwable {
        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();
        SOAPBody body = soapFactory.createSOAPBody(envelope);
        SOAPFault fault = soapFactory.createSOAPFault(body);
        SOAPFaultDetail soapFaultDetail = soapFactory.createSOAPFaultDetail(fault);
        OMNamespace omNamespace = soapFactory.createOMNamespace("http://www.test.org", "test");
        soapFaultDetail.addDetailEntry(
                soapFactory.createOMElement("DetailEntry1", omNamespace));
        soapFaultDetail.addDetailEntry(
View Full Code Here

        throw new UnsupportedOperationException("SOAP 1.1 has no Fault Node");
    }

    protected OMElement createClone(OMCloneOptions options, ParentNode targetParent,
            boolean generateNSDecl) {
        SOAPFault clone = new SOAP11FaultImpl(targetParent, namespace, null, factory, generateNSDecl);
        if (e != null) {
            clone.setException(e);
        }
        return clone;
    }
View Full Code Here

 
  private boolean isSecurityFault(RampartMessageData rmd) {
     
      SOAPEnvelope soapEnvelope = rmd.getMsgContext().getEnvelope();   
     
      SOAPFault soapFault = soapEnvelope.getBody().getFault();
           
            // This is not a soap fault
            if (soapFault == null) {
                return false;
            }
           
            String soapVersionURI =  rmd.getMsgContext().getEnvelope().getNamespace().getNamespaceURI();
          
      if (soapVersionURI.equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI) ) {
         
          SOAPFaultCode faultCode = soapFault.getCode();
         
          // This is a fault processing the security header
                if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
                   return true;
                }
         
                   
      } else if (soapVersionURI.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
         
          //TODO AXIOM API returns only one fault sub code, there can be many
          SOAPFaultSubCode faultSubCode = soapFault.getCode().getSubCode();
         
          if (faultSubCode != null) {
                  SOAPFaultValue faultSubCodeValue = faultSubCode.getValue();
                 
                  // This is a fault processing the security header
View Full Code Here

        this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
    }

    @Override
    public Soap11Fault addMustUnderstandFault(String faultString, Locale locale) {
        SOAPFault fault = addStandardFault(SOAP11Constants.FAULT_CODE_MUST_UNDERSTAND, faultString, locale);
        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }
View Full Code Here

        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }

    @Override
    public Soap11Fault addClientOrSenderFault(String faultString, Locale locale) {
        SOAPFault fault = addStandardFault(SOAP11Constants.FAULT_CODE_SENDER, faultString, locale);
        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }
View Full Code Here

        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }

    @Override
    public Soap11Fault addServerOrReceiverFault(String faultString, Locale locale) {
        SOAPFault fault = addStandardFault(SOAP11Constants.FAULT_CODE_RECEIVER, faultString, locale);
        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }
View Full Code Here

        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }

    @Override
    public Soap11Fault addVersionMismatchFault(String faultString, Locale locale) {
        SOAPFault fault = addStandardFault(SOAP11Constants.FAULT_CODE_VERSION_MISMATCH, faultString, locale);
        return new AxiomSoap11Fault(fault, getAxiomFactory());
    }
View Full Code Here

        if (!langAttributeOnSoap11FaultString) {
            faultStringLocale = null;
        }
        try {
            AxiomUtils.removeContents(getAxiomBody());
            SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody());
            SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault);
            setValueText(code, fault, faultCode);
            SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault);
            if (faultStringLocale != null) {
                addLangAttribute(faultStringLocale, faultReason);
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.SOAPFault

Copyright © 2018 www.massapicom. 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.