Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisFault


            }
            ///factory.createChains(serviceMetaData, axisConfig, );
            System.out.println("service Description : " + serviceMetaData.getServiceDescription());
            System.out.println("adding new service : " + serviceMetaData.getName().getLocalPart());
        } catch (PhaseException e) {
            throw new AxisFault(e);
        }

    }
View Full Code Here


            if (readInClass != null && !"".equals(readInClass)) {
                moduleClass = Class.forName(readInClass, true, currentArchiveFile.getClassLoader());
                module.setModule((Module) moduleClass.newInstance());
            }
        } catch (Exception e) {
            throw new AxisFault(e.getMessage(), e);
        }

    }
View Full Code Here

                handler = (Handler) handlerClass.newInstance();
                handler.init(handlermd);
                handlermd.setHandler(handler);

            } catch (InstantiationException e) {
                throw new AxisFault(e.getMessage());
            } catch (IllegalAccessException e) {
                throw new AxisFault(e.getMessage());
            }

        }
    }
View Full Code Here

        ServiceDescription service = axisConfiguration.getService(serviceName);
        if(service != null){
            ServiceContext serviceContext = new ServiceContext(service, this);
            return serviceContext;
        }else{
            throw new AxisFault("Service not found service name = "+serviceName );
        }
    }
View Full Code Here

        Class handlerClass = null;

        try {
            handlerClass = Class.forName(className, true, loader1);
        } catch (ClassNotFoundException e) {
            throw new AxisFault(e.getMessage());
        }
        return handlerClass;
    }
View Full Code Here

    public static SOAPEnvelope createSOAPMessage(MessageContext msgContext) throws AxisFault {

        InputStream inStream = (InputStream) msgContext.getProperty(MessageContext.TRANSPORT_IN);
        msgContext.setProperty(MessageContext.TRANSPORT_IN, null);
        if (inStream == null) {
            throw new AxisFault("Input stream is Null");
        }
        return createSOAPMessage(msgContext, inStream);
    }
View Full Code Here

            Object contentType = null;
            OperationContext opContext = msgContext.getOperationContext();
            if (opContext != null) {
                contentType = opContext.getProperty(HTTPConstants.MTOM_RECIVED_CONTENT_TYPE);
            }else{
                throw new AxisFault("Operation Context can not be Null");
            }

            StAXBuilder builder = null;
            SOAPEnvelope envelope = null;

            if (contentType != null) {
                msgContext.setDoingMTOM(true);
                builder = HTTPTransportUtils.selectBuilderForMIME(msgContext, inStream, (String)contentType);
                envelope = (SOAPEnvelope) builder.getDocumentElement();
            }else if (msgContext.isDoingREST()) {
                Reader reader = new InputStreamReader(inStream);
                XMLStreamReader xmlreader =
                    XMLInputFactory.newInstance().createXMLStreamReader(reader);
                SOAPFactory soapFactory = new SOAP11Factory();
                builder = new StAXOMBuilder(xmlreader);
                builder.setOmbuilderFactory(soapFactory);
                envelope = soapFactory.getDefaultEnvelope();
                envelope.getBody().addChild(builder.getDocumentElement());
            } else {
                Reader reader = new InputStreamReader(inStream);
                XMLStreamReader xmlreader =
                    XMLInputFactory.newInstance().createXMLStreamReader(reader);
                builder = new StAXSOAPModelBuilder(xmlreader);
                envelope = (SOAPEnvelope) builder.getDocumentElement();
            }
            return envelope;
        } catch (Exception e) {
            throw new AxisFault(e);
        }
    }
View Full Code Here

                || MEP_CONSTANT_OUT_OPTIONAL_IN == mepURI
                || MEP_CONSTANT_ROBUST_OUT_ONLY == mepURI) {
            return new OperationContext(axisOp, serviceContext);

        } else {
            throw new AxisFault("Cannot handle the MEP " + mepURI
                    + " for the current invocation of Operation ");
        }
    }
View Full Code Here

            if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
                fac = OMAbstractFactory.getSOAP12Factory();
            } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
                fac = OMAbstractFactory.getSOAP11Factory();
            }else {
                throw new AxisFault("Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages");
            }

            ServiceDescription service =
                msgContext.getOperationContext().getServiceContext().getServiceConfig();
            ClassLoader classLoader = service.getClassLoader();
            Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
            if (implInfoParam != null) {
                Class implClass =
                    Class.forName((String) implInfoParam.getValue(), true, classLoader);
                return implClass.newInstance();
            } else {
                throw new AxisFault("SERVICE_CLASS parameter is not specified");
            }

        } catch (Exception e) {
            throw AxisFault.makeFault(e);
        }
View Full Code Here

        startSendWithOutputStreamFromIncomingConnection(msgContext, out);
        writeMessage(msgContext, out);
        finalizeSendWithOutputStreamFromIncomingConnection(msgContext,
            out);
      } else {
        throw new AxisFault(
            "Both the TO and Property MessageContext.TRANSPORT_WRITER is Null, No where to send");
      }
    }
    //TODO fix this, we do not set the value if the operation context is
    // not avalible
View Full Code Here

TOP

Related Classes of org.apache.axis2.engine.AxisFault

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.