Package org.apache.axis2.soap

Examples of org.apache.axis2.soap.SOAPFault


    public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
        super(envelope, builder);
    }

    public SOAPFault addFault(Exception e) throws OMException {
        SOAPFault soapFault = new SOAP12FaultImpl(this, e);
        return soapFault;
    }
View Full Code Here


    public SOAP11BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
        super(envelope, builder);
    }

    public SOAPFault addFault(Exception e) throws OMException  {
        SOAPFault soapFault =  new SOAP11Factory().createSOAPFault(this, e);
        return soapFault;
    }
View Full Code Here

    throw new UnsupportedOperationException();
  }

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

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

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

                if (expectedEnvelope.getHeader() != null)
                    super.compare(ReplyEnvelope.getHeader(), expectedEnvelope.getHeader());

                if (expectedEnvelope.getBody().hasFault()) {
                    SOAPFault replyFault = ReplyEnvelope.getBody().getFault();
                    SOAPFault expectedFault = expectedEnvelope.getBody().getFault();

                    super.compare(replyFault.getCode(), expectedFault.getCode());
                    super.compare(replyFault.getReason(), expectedFault.getReason());

                    if (expectedFault.getRole() != null) {
                        super.compare(replyFault.getRole(), expectedFault.getRole());
                    }
                    if (expectedFault.getNode() != null) {
                        super.compare(replyFault.getNode(), expectedFault.getNode());
                    }
                    if (expectedFault.getDetail() != null) {
                        super.compare(replyFault.getDetail(), expectedFault.getDetail());
                    }
                } else {
                    super.compare(ReplyEnvelope.getBody(), expectedEnvelope.getBody());
                }
            } else {
View Full Code Here

    public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
        super(envelope, builder);
    }

    public SOAPFault addFault(Exception e) throws OMException {
        SOAPFault soapFault = new SOAP12FaultImpl(this, e);
        addFault(soapFault);
        return soapFault;
    }
View Full Code Here

                    TwoWayTransportBasedSender.send(msgctx, listenerTransport);

            //check for a fault and return the result
            SOAPEnvelope resenvelope = response.getEnvelope();
            if (resenvelope.getBody().hasFault()) {
                SOAPFault soapFault = resenvelope.getBody().getFault();
                Exception ex = soapFault.getException();

                if (isExceptionToBeThrownOnSOAPFault) {
                    //does the SOAPFault has a detail element for Excpetion
                    if (ex != null) {
//                        AxisEngine engine  = new AxisEngine(sysContext);
//                        engine.receiveFault(response);
                        throw new AxisFault(ex);
                    } else {
                        //if detail element not present let us throw the exception with Reason
                        throw new AxisFault(soapFault.getReason().getText());
                    }
                }
            }
            return response;
        }
View Full Code Here

    public SOAP12BodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder) {
        super(envelope, builder);
    }

    public SOAPFault addFault(Exception e) throws OMException  {
        SOAPFault soapFault = new SOAP12FaultImpl(this, e);
        addFault(soapFault);
        return soapFault;
    }
View Full Code Here

            String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
            msgContext.setProperty(
                    Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
                        RESTUtil.processPOSTRequest(msgContext, is, os,
                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
                    } else {
View Full Code Here

            String contentTypeStr = contentType != null ?
                    contentType.getValue() : inferContentType();

            boolean eprFound = false;
            if (endpointsConfiguration != null) {
                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
                if (epr != null) {
                    eprFound = true;
                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);

                    epr.setParameters(msgContext);

                    Builder builder = epr.getBuilder(type);
                    RESTUtil.processGetAndDeleteRequest(
                            msgContext, os, request.getRequestLine().getUri(),
                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
                            method, isRestDispatching);
                }
View Full Code Here

        params = getListenerParameters();


        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
        if (param != null && param.getValue() != null) {
            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.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.