Package org.apache.axis2.engine

Examples of org.apache.axis2.engine.AxisFault


        host = Utils.getParameterValue(transportIn.getParameter(MailConstants.POP3_HOST));
        password = Utils.getParameterValue(transportIn.getParameter(MailConstants.POP3_PASSWORD));
        port = Utils.getParameterValue(transportIn.getParameter(MailConstants.POP3_PORT));
        replyTo = Utils.getParameterValue(transportIn.getParameter(MailConstants.RAPLY_TO));
        if (user == null || host == null || password == null || port == null) {
            throw new AxisFault(
                "user, port, host or password not set, "
                    + "   [user null = "
                    + (user == null)
                    + ", password null= "
                    + (password == null)
View Full Code Here


           
            msg.setText(message);
            msg.setHeader("Content-Transfer-Encoding", "7bit");
            Transport.send(msg);
        } catch (AddressException e) {
            throw new AxisFault(e);
        } catch (MessagingException e) {
            throw new AxisFault(e);
        }
    }
View Full Code Here

                OMOutput output = new OMOutput(outputWriter);
                element.serialize(output);
                outputWriter.flush();
                return bytesOut.toByteArray();
            } catch (XMLStreamException e) {
                throw new AxisFault(e);
            } catch (FactoryConfigurationError e) {
                throw new AxisFault(e);
            }
        }
View Full Code Here

                        bytes = writeBytes();
                    }
                    out.write(bytes);
                }
            } catch (XMLStreamException e) {
                throw new AxisFault(e);
            } catch (FactoryConfigurationError e) {
                throw new AxisFault(e);
            } catch (IOException e) {
                throw new AxisFault(e);
            }
        }
View Full Code Here

                               buf.append(HTTPConstants.HEADER_CONTENT_TYPE).append(": ").append(SOAP12Constants.SOAP_12_CONTENT_TYPE);
                               buf.append("; charset=utf-8\n");
                           } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
                               buf.append(HTTPConstants.HEADER_CONTENT_TYPE).append(": text/xml; charset=utf-8\n");
                           }else {
                               throw new AxisFault("Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages");
                           }
               
            }
           
            buf.append(HTTPConstants.HEADER_ACCEPT).append(": application/soap+xml, application/dime, multipart/related, text/*\n");
            buf.append(HTTPConstants.HEADER_HOST).append(": ").append(url.getHost()).append("\n");
            buf.append(HTTPConstants.HEADER_CACHE_CONTROL).append(": no-cache\n");
            buf.append(HTTPConstants.HEADER_PRAGMA).append(": no-cache\n");
            if (chuncked) {
                buf
                    .append(HTTPConstants.HEADER_TRANSFER_ENCODING)
                    .append(": ")
                    .append(HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED)
                    .append("\n");
            }
            if(!chuncked && !msgContext.isDoingMTOM()) {
                buf.append(HTTPConstants.HEADER_CONTENT_LENGTH).append(": " + contentLength + "\n");
            }
            if (!msgContext.isDoingREST()) {
                buf.append("SOAPAction: \"" + soapActionString + "\"\n");
            }
            buf.append("\n");
            out.write(buf.toString().getBytes());
        } catch (IOException e) {
            throw new AxisFault(e);
        }
    }
View Full Code Here

                transportInfo.in = socket.getInputStream();
                transportInfo.out = socket.getOutputStream();
                transportInfo.socket = socket;
                return transportInfo.out;
            } catch (MalformedURLException e) {
                throw new AxisFault(e.getMessage(), e);
            } catch (IOException e) {
                throw new AxisFault(e.getMessage(), e);
            }
        } else {
            throw new AxisFault("to EPR must be specified");
        }
    }
View Full Code Here

                        opContext.setProperty(HTTPConstants.MTOM_RECIVED_CONTENT_TYPE,contentType);
                    }
                }
            }
        }catch (IOException e) {
            throw new AxisFault(e);
        }

    }
View Full Code Here

        if(msgContext.isDoingMTOM()){
            HTTPOutTransportInfo httpOutTransportInfo = (HTTPOutTransportInfo)msgContext.getProperty(HTTPConstants.HTTPOutTransportInfo);
            if(httpOutTransportInfo != null){
                httpOutTransportInfo.setContentType(OMOutput.getContentType(true));
            }else{
                throw new AxisFault("Property "+ HTTPConstants.HTTPOutTransportInfo + " not set by the Server");
            }
           
        }
        return out;
    }
View Full Code Here

                }
            }else {
                return out;
            }
        } catch (IOException e) {
            throw new AxisFault(e);
        }

    }
View Full Code Here

                }
            } else if (
                HTTPConstants.HEADER_PROTOCOL_10.equals(version.getValue())) {
                //TODO HTTP1.0 specific parameters
            } else {
                throw new AxisFault(
                    "Parameter "
                        + HTTPConstants.PROTOCOL_VERSION
                        + " Can have values only HTTP/1.0 or HTTP/1.1");
            }
        }
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.