Package org.apache.axis

Examples of org.apache.axis.AxisFault


            Document  doc = emitter.emit(Emitter.MODE_ALL);

            msgContext.setProperty("WSDL", doc);
        } catch (NoClassDefFoundError e) {
            entLog.info( Messages.getMessage("toAxisFault00"), e );
            throw new AxisFault(e.toString(), e);
        } catch (Exception e) {
            entLog.info( Messages.getMessage("toAxisFault00"), e );
            throw AxisFault.makeFault(e);
        }
View Full Code Here


            try {
                JavaClass jc = cache.lookup(clsName, cl);
                serviceClass = jc.getJavaClass();
            } catch (ClassNotFoundException e) {
                log.error(Messages.getMessage("exception00"), e);
                throw new AxisFault(Messages.getMessage("noClassForService00", clsName), e);
            }
        } else {
            // if no engine, we don't have a cache, use Class.forName instead.
            try {
                serviceClass = ClassUtils.forName(clsName, true, cl);
            } catch (ClassNotFoundException e) {
                log.error(Messages.getMessage("exception00"), e);
                throw new AxisFault(Messages.getMessage("noClassForService00", clsName), e);
            }
        }
        return serviceClass;
    }
View Full Code Here

    {
        // Set up the Implementation class for the service

        String clsName = getServiceClassName(service);
        if (clsName == null) {
            throw new AxisFault(Messages.getMessage("noServiceClass"));
        }
        Class cls = getServiceClass(clsName, service, msgContext);
        ServiceDesc serviceDescription = service.getServiceDescription();

        // And the allowed methods, if necessary
View Full Code Here

            msg = new Message(af);
            msg.setMessageContext(msgContext);
        }
        catch (Exception e)
        {
            msg = new Message(new AxisFault(e.toString()));
            msg.setMessageContext(msgContext);
        }

        try
        {
View Full Code Here

                    {
                        String oldPassword = (String)passwords.get(username);
                        if(password.equals(oldPassword))
                            connector = (JMSConnector)connectors.get(username);
                        else
                            throw new AxisFault("badUserPass");
                    }
                    else
                    {
                        connector = createConnector(username, password);
                        connectors.put(username, connector);
                        // I should really md5 hash these
                        passwords.put(username, password);
                    }
                }
            }
        }
        catch(Exception e)
        {
            log.error(Messages.getMessage("cannotConnectError"), e);

            if(e instanceof AxisFault)
                throw (AxisFault)e;
            throw new AxisFault("cannotConnect", e);
        }

        context.setProperty(JMSConstants.CONNECTOR, connector);

        //I would like to use the following, but that requires JMS-URL syntax
View Full Code Here

        try {
            runTest(badHeader, false);
        } catch (Exception e) {
            assertTrue("Non AxisFault Exception : " + e,
                       e instanceof AxisFault);
            AxisFault fault = (AxisFault)e;
            assertEquals("Bad fault code!", Constants.FAULT_MUSTUNDERSTAND,
                         fault.getFaultCode());
            return;
        }
       
        fail("Should have gotten mustUnderstand fault!");
    }
View Full Code Here

        responseMessage = context.getResponseMessage();
        res.setStatusCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        Message responseMsg = responseMessage;
        log.warn(Messages.getMessage("exception00"), e);
        if (responseMsg == null) {
            AxisFault fault = AxisFault.makeFault(e);
            //log the fault
            Element runtimeException = fault.lookupFaultDetail(Constants.QNAME_FAULTDETAIL_RUNTIMEEXCEPTION);
            if (runtimeException != null) {
                log.debug(Messages.getMessage("axisFault00"), fault);
                //strip runtime details
                fault.removeFaultDetail(Constants.QNAME_FAULTDETAIL_RUNTIMEEXCEPTION);
            }
            responseMsg = new Message(fault);
        }
        responseMessage = responseMsg;
        SOAPPart soapPart = (SOAPPart) responseMessage.getSOAPPart();
View Full Code Here

            /** The idea is that this handler only goes in the chain IF this
            * service does a mapping between SOAPAction and target.  Therefore
            * if we get here with no action, we're in trouble.
            */
            if (action == null) {
                throw new AxisFault( "Server.NoHTTPSOAPAction",
                    Messages.getMessage("noSOAPAction00"),
                    null, null );
            }
           
            action = action.trim();
View Full Code Here

        catch (java.net.ConnectException ce) {
            System.err.println("getTemp connect error: " + ce);
            return;
        catch (java.rmi.RemoteException re) {
            if (re instanceof AxisFault) {
                AxisFault fault = (AxisFault) re;
                if (fault.detail instanceof ConnectException ||
                    fault.getFaultCode().getLocalPart().equals("HTTP")) {
                    System.err.println("getTemp HTTP error: " + fault);
                    return;
                }
            }
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
View Full Code Here

        catch (java.net.ConnectException ce) {
            System.err.println("getQuote connect error: " + ce);
            return;
        catch (java.rmi.RemoteException re) {
            if (re instanceof AxisFault) {
                AxisFault fault = (AxisFault) re;
                if (fault.detail instanceof ConnectException ||
                    fault.getFaultCode().getLocalPart().equals("HTTP")) {
                    System.err.println("getQuote HTTP error: " + fault);
                    return;
                }
            }
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
View Full Code Here

TOP

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