Package org.apache.muse.ws.addressing.soap

Examples of org.apache.muse.ws.addressing.soap.SoapFault


                eprListing.append('\n');
                eprListing.append(i.next());
            }
           
            Object[] filler = { eprNotFound, eprListing };
            throw new SoapFault(_MESSAGES.get("DestinationUnreachable", filler));
        }
       
        return resource;
    }
View Full Code Here


            XmlUtils.toFile(subXML, resourceFile);
        }
       
        catch (IOException error)
        {
            throw new SoapFault(error);
        }
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullMessageElement"));
       
        _topicPath = XmlUtils.getQNameFromChild(root, WsnConstants.TOPIC_QNAME);
       
        if (_topicPath == null)
            throw new SoapFault(_MESSAGES.get("NoTopicPath"));
       
        Element producerXML = XmlUtils.getElement(root, WsnConstants.PRODUCER_QNAME);
       
        if (producerXML != null)
            _producer = new EndpointReference(producerXML);
       
        Element subXML = XmlUtils.getElement(root, WsnConstants.SUBSCRIPTION_EPR_QNAME);
       
        if (subXML != null)
            _subscription = new EndpointReference(subXML);
       
        Element messageXML = XmlUtils.getElement(root, WsnConstants.MESSAGE_QNAME);
       
        //
        // we have to have a Message element, even if it's empty
        //
        if (messageXML == null)
            throw new SoapFault(_MESSAGES.get("NoMessageContent"));
       
        Element[] children = XmlUtils.getAllElements(messageXML);
       
        for (int n = 0; n < children.length; ++n)
            addMessageContent(children[n]);
View Full Code Here

            configParams = readConfigFile(_installDir + "/conf/httpd.conf");
        }
       
        catch (IOException error)
        {
            throw new SoapFault("Error while reading httpd.conf.", error);
        }
       
        _name = readName(configParams);
        _port = readPort(configParams);
        _languages = readLanguages(configParams);
View Full Code Here

    }
   
    protected void throwInvalidAddressingHeaderFault(String message)
        throws SoapFault
    {
        SoapFault fault = new SoapFault(message);
        fault.setCode(SoapConstants.SENDER_QNAME);
        fault.setSubCode(WsaConstants.INVALID_HEADER_FAULT_QNAME);
        throw fault;
    }
View Full Code Here

        //
        if (correctName != null && !correctName.equals(actualName))
        {
            Object[] filler = { correctName, actualName };
            String message = _MESSAGES.get("InvalidProxyResponse", filler);
            throw new SoapFault(message);
        }
       
        //
        // if the value is a simple type, use the root of the
        // response body
View Full Code Here

        {
            //
            // create and return WS-A ActionNotSupported fault
            //
            Object[] filler = { getContextPath(), action };
            SoapFault wsaFault = new SoapFault(_MESSAGES.get("ActionNotSupported", filler));
            wsaFault.setCode(SoapConstants.SENDER_QNAME);
            wsaFault.setSubCode(WsaConstants.ACTION_NOT_SUPPORTED_FAULT_QNAME);
           
            Element detail = XmlUtils.createElement(WsaConstants.PROBLEM_ACTION_QNAME);
            XmlUtils.setElement(detail, WsaConstants.ACTION_QNAME, action);
            wsaFault.setDetail(detail);
           
            return wsaFault.toXML();
        }
       
        MessageHandler handler = capability.getMessageHandler(action);
        Method method = handler.getMethod();
       
        Object[] parameters = null;
       
        try
        {
            //
            // translate from XML -> POJO. the reflection call will take
            // care of casting the generic Object references to the actual
            // method parameter types
            //
            parameters = handler.fromXML(soapBody);
           
            //
            // invoke operation and translate result to XML
            //
            Object result = method.invoke(capability, parameters);
           
            return handler.toXML(result);
        }
       
        catch (Throwable error)
        {
            //
            // the exception is the generic reflection error, and useless
            // to the programmer - we want to report on the REAL cause
            //
            Throwable cause = error.getCause();
           
            if (cause != null// sanity check
                error = cause;
           
            Logger log = getLog();
           
            //
            // log the details of de-serialization and reflection
            //
            if (parameters != null)
                LoggingUtils.logCall(log, method, parameters);
           
            LoggingUtils.logError(log, error);
           
            SoapFault response = SoapUtils.convertToFault(error);
            return response.toXML();
        }
    }
View Full Code Here

    {
        //
        // error - we've already been here
        //
        if (hasBeenShutdown())
            throw new SoapFault(_MESSAGES.get("ResourceAlreadyDestroyed"));
       
        //
        // error - never initialized, why are we shutting down?
        //
        if (!hasBeenInitialized())
            throw new SoapFault(_MESSAGES.get("ResourceNotInitialized"));

        //
        // set this flag early so that code that is invoked because of
        // capability shutdown tasks knows that the resource is dying
        //
View Full Code Here

        // in the persistence impl
        //
        if (results.length == 0)
        {
            Object[] filler = { "\n\n" + epr };
            throw new SoapFault(_MESSAGES.get("NoFileForEPR", filler));
        }
       
        results[0].delete();
        fileNumbersByEPR.remove(epr);
    }
View Full Code Here

        {
            //
            // the key already exists - not allowed!
            //     
            if (_resources.containsKey(epr))
                throw new SoapFault(_MESSAGES.get("ResourceEPRExists", new Object[]{ epr }));
           
            _resources.put(epr, resource);
        }
       
        //
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.addressing.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.