Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFaultReason


        SOAPFaultCode soapFaultCode = factory.createSOAPFaultCode();
        soapFaultCode.setText(faultCode);
        soapFault.setCode(soapFaultCode);
       
        SOAPFaultReason soapFaultReason = factory.createSOAPFaultReason();
        soapFaultReason.setText(faultReason);
        soapFault.setReason(soapFaultReason);
       
        SOAPFaultDetail soapFaultDetail = factory.createSOAPFaultDetail();
        soapFaultDetail.setText(faultDetail);
        soapFault.setDetail(soapFaultDetail);
View Full Code Here


        OMSerializerUtil.serializeStartpart(this, writer);
        SOAPFaultCode faultCode = getCode();
        if (faultCode != null) {
            ((OMNodeEx) faultCode).internalSerialize(writer, true);
        }
        SOAPFaultReason faultReason = getReason();
        if (faultReason != null) {
            ((OMNodeEx) faultReason).internalSerialize(writer, true);
        }

        serializeFaultNode(writer);
View Full Code Here

        SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());

        SOAPFaultCode faultCode = createSOAPFaultCode(fault);
        createSOAPFaultValue(faultCode);

        SOAPFaultReason reason = createSOAPFaultReason(fault);
        createSOAPFaultText(reason);

        createSOAPFaultDetail(fault);

        return defaultEnvelope;
View Full Code Here

        SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
        SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());

        SOAPFaultCode faultCode = createSOAPFaultCode(fault);

        SOAPFaultReason reason = createSOAPFaultReason(fault);
        //createSOAPFaultText(reason);

        createSOAPFaultDetail(fault);

        return defaultEnvelope;
View Full Code Here

        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);
            }
            faultReason.setText(faultString);
            return new AxiomSoap11Fault(fault, getAxiomFactory());

        }
        catch (SOAPProcessingException ex) {
            throw new AxiomSoapFaultException(ex);
View Full Code Here

            AxiomUtils.removeContents(getAxiomBody());
            SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody());
            SOAPFaultCode faultCode = getAxiomFactory().createSOAPFaultCode(fault);
          faultCode.setText(new QName(fault.getNamespace().getNamespaceURI(), localName,
              fault.getNamespace().getPrefix()));
            SOAPFaultReason faultReason = getAxiomFactory().createSOAPFaultReason(fault);
            if (locale != null) {
                addLangAttribute(locale, faultReason);
            }
            faultReason.setText(faultString);
            return fault;
        }
        catch (SOAPProcessingException ex) {
            throw new AxiomSoapFaultException(ex);
        }
View Full Code Here

            AxiomUtils.removeContents(getAxiomBody());
            SOAPFault fault = getAxiomFactory().createSOAPFault(getAxiomBody());
            SOAPFaultCode code = getAxiomFactory().createSOAPFaultCode(fault);
            SOAPFaultValue value = getAxiomFactory().createSOAPFaultValue(code);
            value.setText(fault.getNamespace().getPrefix() + ":" + localName);
            SOAPFaultReason reason = getAxiomFactory().createSOAPFaultReason(fault);
            SOAPFaultText text = getAxiomFactory().createSOAPFaultText(reason);
            if (locale != null) {
                text.setLang(AxiomUtils.toLanguage(locale));
            }
            text.setText(faultStringOrReason);
View Full Code Here

   
    faultSubcodeValue.setText(data.getSubcode());

    faultCode.setSubCode(faultSubCode);
   
    SOAPFaultReason reason = factory.createSOAPFaultReason();
    SOAPFaultText reasonText = factory.createSOAPFaultText();
    reasonText.setText(data.getReason());
   
    SOAPFaultDetail detail = factory.createSOAPFaultDetail();
    detail.addDetailEntry(data.getDetail());
   
    String SOAPNamespaceValue = factory.getSoapVersionURI();
   
    if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(SOAPNamespaceValue)) {
      reason.addSOAPText(reasonText);
      referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, faultCode);
      referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, reason);
      referenceRMMsgContext.setProperty(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, detail);
    } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals (SOAPNamespaceValue)) {
      reason.setText(data.getReason());
      referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_CODE_LOCAL_NAME, faultCode);
      referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, detail);
      referenceRMMsgContext.setProperty(SOAP11Constants.SOAP_FAULT_STRING_LOCAL_NAME, reason);
      // Need to send this message as the Axis Layer doesn't set the "SequenceFault" header
      MessageContext faultMessageContext =
View Full Code Here

        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());

    SOAPFaultReason faultReason = fault.getReason();
    SOAPFaultText faultText = faultReason.getSOAPFaultText("en");
   
    if (faultText==null) {
      faultText = factory.createSOAPFaultText();
      faultReason.addSOAPText(faultText);
    }
   
    if (data!=null && data.getReason()!=null)
      faultText.setText(data.getReason());
View Full Code Here

        }
        XMLFaultCode code = XMLFaultCode.fromQName(codeQName);

        // Get the primary reason text
        // TODO what if this fails
        SOAPFaultReason soapReason = soapFault.getReason();
        String text = null;
        String lang = null;
        List soapTexts = null;
        if (isSoap11) {
            text = soapReason.getText();
        } else {
            soapTexts = soapReason.getAllSoapTexts();
            SOAPFaultText reasonText = (SOAPFaultText)soapTexts.get(0);
            text = reasonText.getText();
            lang = reasonText.getLang();
        }
        XMLFaultReason reason = new XMLFaultReason(text, lang);
View Full Code Here

TOP

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

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.