Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFaultCode


       
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope faultEnvelope = factory.getDefaultFaultEnvelope();      
        SOAPFault soapFault = faultEnvelope.getBody().getFault();

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


        // this is a special case. This fault element may contain its children in any order. But spec mandates a specific order
        // the overriding of the method will facilitate that. Not sure this is the best method to do this :(
        build();

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

    public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException {
        SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
        SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());

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

        SOAPFaultReason reason = createSOAPFaultReason(fault);
        createSOAPFaultText(reason);
View Full Code Here

    public SOAPEnvelope getDefaultFaultEnvelope() throws SOAPProcessingException {
        SOAPEnvelope defaultEnvelope = getDefaultEnvelope();
        SOAPFault fault = createSOAPFault(defaultEnvelope.getBody());

        SOAPFaultCode faultCode = createSOAPFaultCode(fault);

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

        createSOAPFaultDetail(fault);
View Full Code Here

    }

    protected void runTest() throws Throwable {
        SOAPEnvelope env = soapFactory.getDefaultEnvelope();
        SOAPFault fault = soapFactory.createSOAPFault(env.getBody());
        SOAPFaultCode code = soapFactory.createSOAPFaultCode(fault);
        QName value = new QName("urn:test", "myFaultCode");
        code.setValue(value);
        assertEquals(value, code.getValueAsQName());
    }
View Full Code Here

    public TestGetValueAsQNameWithParser(OMMetaFactory metaFactory, SOAPSpec spec) {
        super(metaFactory, spec);
    }

    protected void runTest() throws Throwable {
        SOAPFaultCode faultCode = getTestMessage(MESSAGE).getBody().getFault().getCode();
        assertEquals(new QName(spec.getEnvelopeNamespaceURI(), "Sender"), faultCode.getValueAsQName());
    }
View Full Code Here

           
            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)) {
View Full Code Here

            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

    private SOAPFault addStandardFault(String localName, String faultString, Locale locale) {
        Assert.notNull(faultString, "No faultString given");
        try {
            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);
            }
View Full Code Here

    private SOAPFault addStandardFault(String localName, String faultStringOrReason, Locale locale) {
        Assert.notNull(faultStringOrReason, "No faultStringOrReason given");
        try {
            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) {
View Full Code Here

TOP

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

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.