Package org.apache.axis.message

Examples of org.apache.axis.message.SOAPFault


                    responseMsg = new Message(af);
                } else {
                    try {
                        SOAPEnvelope env = responseMsg.getSOAPEnvelope();
                        env.clearBody();
                        env.addBodyElement(new SOAPFault((AxisFault) e));
                    } catch (AxisFault fault) {
                        // Should never reach here!
                    }
                }
            }
View Full Code Here


            Message respMsg = serverContext.getResponseMessage();
            if (respMsg == null) {
                respMsg = new Message(fault);
                serverContext.setResponseMessage(respMsg);
            } else {
                SOAPFault faultEl = new SOAPFault(fault);
                SOAPEnvelope env = respMsg.getSOAPEnvelope();
                env.clearBody();
                env.addBodyElement(faultEl);
            }
        }
View Full Code Here

            soapConstants = context.getMessageContext().getSOAPConstants();
        }

        SOAPEnvelope envelope = new SOAPEnvelope(soapConstants);

        SOAPFault fault = new SOAPFault(this);
        envelope.addBodyElement(fault);

        // add any headers we need
        if (faultHeaders != null) {
            for (Iterator i = faultHeaders.iterator(); i.hasNext();) {
View Full Code Here

        Reader reader = new StringReader(xmlString);
        InputSource src = new InputSource(reader);
        SOAPBodyElement bodyItem = getFirstBody(src);
        assertTrue("The SOAPBodyElement I got was not a SOAPFault, it was a " +
                bodyItem.getClass().getName(), bodyItem instanceof SOAPFault);
        SOAPFault flt = (SOAPFault)bodyItem;
        flt.addDetail();
        javax.xml.soap.Detail d = flt.getDetail();
        Iterator i = d.getDetailEntries();
        while (i.hasNext())
        {
            DetailEntry entry = (DetailEntry) i.next();
            String name = entry.getElementName().getLocalName();
View Full Code Here

                axisFault.setFaultCodeAsString(Constants.FAULT_SERVER_GENERAL);
            } else {
                axisFault = new AxisFault("Server", "Server Error", null, null);
            }

            SOAPFault fault = new SOAPFault(axisFault);
            SOAPEnvelope envelope = new SOAPEnvelope();
            envelope.addBodyElement(fault);
            Message message = new Message(envelope);
            message.setMessageType(Message.RESPONSE);
            messageContext.setResponseMessage(message);
View Full Code Here

                    responseMsg = new Message(af);
                } else {
                    try {
                        SOAPEnvelope env = responseMsg.getSOAPEnvelope();
                        env.clearBody();
                        env.addBodyElement(new SOAPFault((AxisFault) e));
                    } catch (AxisFault fault) {
                        // Should never reach here!
                    }
                }
            }
View Full Code Here

            Message respMsg = serverContext.getResponseMessage();
            if (respMsg == null) {
                respMsg = new Message(fault);
                serverContext.setResponseMessage(respMsg);
            } else {
                SOAPFault faultEl = new SOAPFault(fault);
                SOAPEnvelope env = respMsg.getSOAPEnvelope();
                env.clearBody();
                env.addBodyElement(faultEl);
            }
        }
View Full Code Here

                    responseMsg = new Message(af);
                } else {
                    try {
                        SOAPEnvelope env = responseMsg.getSOAPEnvelope();
                        env.clearBody();
                        env.addBodyElement(new SOAPFault((AxisFault) e));
                    } catch (AxisFault fault) {
                        // Should never reach here!
                    }
                }
            }
View Full Code Here

        if (context.getMessageContext() != null)
            soapConstants = context.getMessageContext().getSOAPConstants();

        SOAPEnvelope envelope = new SOAPEnvelope(soapConstants);

        SOAPFault fault = new SOAPFault(this);
        envelope.addBodyElement(fault);

        // add any headers we need
        if (faultHeaders != null) {
            for (Iterator i = faultHeaders.iterator(); i.hasNext();) {
View Full Code Here

                    responseMsg.setMessageContext(msgContext);
                } else {
                    try {
                        SOAPEnvelope env = responseMsg.getSOAPEnvelope();
                        env.clearBody();
                        env.addBodyElement(new SOAPFault((AxisFault) e));
                    } catch (AxisFault fault) {
                        // Should never reach here!
                    }
                }
            }
View Full Code Here

TOP

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