Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFaultSubCode


         
                   
      } 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
                  if (faultSubCodeValue != null &&
                          faultSubCodeValue.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
                     return true;
View Full Code Here


   
   
    SOAPFactory factory = (SOAPFactory) referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
   
    SOAPFaultCode faultCode = factory.createSOAPFaultCode();
    SOAPFaultSubCode faultSubCode = factory.createSOAPFaultSubCode(faultCode);
   
    SOAPFaultValue faultColdValue = factory.createSOAPFaultValue(faultCode);
    SOAPFaultValue faultSubcodeValue = factory.createSOAPFaultValue(faultSubCode);
   
    faultColdValue.setText(data.getCode());
View Full Code Here

    SOAPFaultCode faultCode = fault.getCode();
    SOAPFaultValue codeValue = faultCode.getValue();
    codeValue.setText(data.getCode());

    SOAPFaultSubCode faultSubCode = factory
        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());
View Full Code Here

        XMLFault xmlFault = new XMLFault(code, reason, detailBlocks);

        // Add the secondary fault information

        // Get the SubCodes
        SOAPFaultSubCode soapSubCode = soapCode.getSubCode();
        if (soapSubCode != null) {
            List<QName> list = new ArrayList<QName>();

            // Walk the nested sub codes and collect the qnames
            while (soapSubCode != null) {
                SOAPFaultValue soapSubCodeValue = soapSubCode.getValue();
                QName qName = soapSubCodeValue.getTextAsQName();
                list.add(qName);
                soapSubCode = soapSubCode.getSubCode();
            }

            // Put the collected sub code qnames onto the xmlFault
            QName[] qNames = new QName[list.size()];
            xmlFault.setSubCodes(list.toArray(qNames));
View Full Code Here

        // Set the SubCodes
        QName[] subCodes = xmlFault.getSubCodes();
        if (subCodes != null && subCodes.length > 0) {
            OMElement curr = soapCode;
            for (int i = 0; i < subCodes.length; i++) {
                SOAPFaultSubCode subCode = (i == 0) ?
                        factory.createSOAPFaultSubCode((SOAPFaultCode)curr) :
                        factory.createSOAPFaultSubCode((SOAPFaultSubCode)curr);
                SOAPFaultValue soapSubCodeValue = factory.createSOAPFaultValue(subCode);
                soapSubCodeValue.setText(subCodes[i]);
                curr = subCode;
View Full Code Here

    SOAPFaultCode faultCode = fault.getCode();
    SOAPFaultValue codeValue = faultCode.getValue();
    codeValue.setText(data.getCode());

    SOAPFaultSubCode faultSubCode = factory
        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());
View Full Code Here

    }

    @Override
    public Iterator<QName> getFaultSubcodes() {
        List<QName> subcodes = new ArrayList<QName>();
        SOAPFaultSubCode subcode = getAxiomFault().getCode().getSubCode();
        while (subcode != null) {
            subcodes.add(subcode.getValue().getTextAsQName());
            subcode = subcode.getSubCode();
        }
        return subcodes.iterator();
    }
View Full Code Here

    }

    @Override
    public void addFaultSubcode(QName subcode) {
        SOAPFaultCode faultCode = getAxiomFault().getCode();
        SOAPFaultSubCode faultSubCode = null;
        if (faultCode.getSubCode() == null) {
            faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultCode);
        }
        else {
            faultSubCode = faultCode.getSubCode();
            while (true) {
                if (faultSubCode.getSubCode() != null) {
                    faultSubCode = faultSubCode.getSubCode();
                }
                else {
                    faultSubCode = getAxiomFactory().createSOAPFaultSubCode(faultSubCode);
                    break;
                }
View Full Code Here

   
   
    SOAPFactory factory = (SOAPFactory) referenceRMMsgContext.getSOAPEnvelope().getOMFactory();
   
    SOAPFaultCode faultCode = factory.createSOAPFaultCode();
    SOAPFaultSubCode faultSubCode = factory.createSOAPFaultSubCode(faultCode);
   
    SOAPFaultValue faultColdValue = factory.createSOAPFaultValue(faultCode);
    SOAPFaultValue faultSubcodeValue = factory.createSOAPFaultValue(faultSubCode);
   
    faultColdValue.setText(data.getCode());
View Full Code Here

    SOAPFaultCode faultCode = fault.getCode();
    SOAPFaultValue codeValue = faultCode.getValue();
    codeValue.setText(data.getCode());

    SOAPFaultSubCode faultSubCode = factory
        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());
View Full Code Here

TOP

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

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.