Package org.apache.muse.ws.resource.ext.faults

Examples of org.apache.muse.ws.resource.ext.faults.InvalidMessageFormatFault


        throws InvalidMessageFormatFault
    {
        Element eprXML = XmlUtils.getElement(xml, WsnConstants.SUBSCRIPTION_EPR_QNAME);
       
        if (eprXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoSubscriptionEPR"));
       
        try
        {
            _subscriptionEPR = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        String currentString = XmlUtils.getElementText(xml, WsnConstants.CURRENT_TIME_QNAME);
        String terminationString = XmlUtils.getElementText(xml, WsnConstants.TERMINATION_TIME_QNAME);
       
        try
        {
            if (currentString != null)
                _currentTime = XsdUtils.getLocalTime(currentString);
           
            if (terminationString != null)
                _terminationTime = XsdUtils.getLocalTime(terminationString);
        }
       
        catch (ParseException error)
        {
            throw new InvalidMessageFormatFault(error);
        }
    }
View Full Code Here


            _consumer = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        Element filterXML = XmlUtils.getElement(xml, WsnConstants.FILTER_QNAME);
        FilterFactory factory = FilterFactory.getInstance();
        _filter = factory.newInstance(filterXML, resource);
       
        Element timeXML = XmlUtils.getElement(xml, WsnConstants.INIT_TERMINATION_TIME_QNAME);
       
        try
        {
            if (timeXML != null)
                _terminationTime = XmlUtils.getDate(timeXML);
        }
       
        catch (ParseException error)
        {
            Object[] filler = { error.getMessage() };
            throw new InvalidMessageFormatFault(_MESSAGES.get("InvalidTerminationTime", filler));
        }
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullRequestElement"));
       
        Element[] properties = XmlUtils.getAllElements(request);
       
        if (properties.length == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoPropertiesFoundUpdate"));
       
        setPropertyName(XmlUtils.getElementQName(properties[0]));
        setValues(properties);
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullRequestElement"));
       
        Element[] children = XmlUtils.getAllElements(request);
       
        if (children.length == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoPropertiesFoundInsert"));
       
        //
        // the WS-RP spec says that in an Insert request with multiple
        // elements, all elements MUST have the same qualified name
        //
       
        QName firstQName = XmlUtils.getElementQName(children[0]);
       
        Element[] matches = XmlUtils.getElements(request, firstQName);
       
        if (matches.length != children.length)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NamesNotEqualInsert"));
       
        setPropertyName(firstQName);
        setValues(children);
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullParticipantElement"));
       
        Element eprXML = XmlUtils.getElement(xml, MuwsConstants.MANAGEABILITY_EPR_QNAME);
       
        if (eprXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoParticipantEPR"));
       
        try
        {
            _resourceEPR = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        _resourceID = XmlUtils.getElementText(xml, MuwsConstants.RESOURCE_ID_QNAME);
       
        if (_resourceID == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoParticipantID"));
       
        _role = XmlUtils.getElementText(xml, MuwsConstants.ROLE_QNAME);
       
        if (_role == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoParticipantRole"));
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullRequestElement"));
       
        Element[] children = XmlUtils.getAllElements(request, WsrpConstants.NAMESPACE_URI);
       
        if (children.length == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("EmptySetRequest"));
       
        SetRequest set = new SimpleSetRequest();
       
        //
        // build the different types of sets from XML. don't bother with a
        // table, we only have three command types
        //
        for (int n = 0; n < children.length; ++n)
        {
            String type = children[n].getLocalName();
           
            SetRequestComponent operation = null;
           
            if (type.equals(DeleteRequest.OPERATION))
                operation = new DeleteRequest(children[n]);
           
            else if (type.equals(InsertRequest.OPERATION))
                operation = new InsertRequest(children[n]);
           
            else if (type.equals(UpdateRequest.OPERATION))
                operation = new UpdateRequest(children[n]);
           
            else
            {
                Object[] filler = { type };
                throw new InvalidMessageFormatFault(_MESSAGES.get("InvalidSet", filler));
            }
           
            set.addRequestComponent(operation);
        }
       
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullElement"));
       
        Element eprXML = XmlUtils.getElement(xml, WssgConstants.MEMBER_EPR_QNAME);
       
        if (eprXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoMemberEPR"));
       
        try
        {
            _memberEPR = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        _content = XmlUtils.getElement(xml, WssgConstants.CONTENT_QNAME);
       
        Element timeXML = XmlUtils.getElement(xml, WssgConstants.INIT_TERMINATION_QNAME);
       
        try
        {
            if (timeXML != null)
                _termination = XmlUtils.getDate(timeXML);
        }
       
        catch (ParseException error)
        {
            throw new InvalidMessageFormatFault(error);
        }
    }
View Full Code Here

            _consumer = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        Element filterXML = XmlUtils.getElement(xml, WsnConstants.FILTER_QNAME);
        FilterFactory factory = FilterFactory.getInstance();
        _filter = factory.newInstance(filterXML);
       
        Element timeXML = XmlUtils.getElement(xml, WsnConstants.INIT_TERMINATION_TIME_QNAME);
       
        try
        {
            if (timeXML != null)
                _terminationTime = XmlUtils.getDate(timeXML);
        }
       
        catch (ParseException error)
        {
            Object[] filler = { error.getMessage() };
            throw new InvalidMessageFormatFault(_MESSAGES.get("InvalidTerminationTime", filler));
        }
    }
View Full Code Here

        throws InvalidMessageFormatFault
    {
        Element eprXML = XmlUtils.getElement(xml, WsnConstants.SUBSCRIPTION_EPR_QNAME);
       
        if (eprXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoSubscriptionEPR"));
       
        try
        {
            _subscriptionEPR = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        String currentString = XmlUtils.getElementText(xml, WsnConstants.CURRENT_TIME_QNAME);
        String terminationString = XmlUtils.getElementText(xml, WsnConstants.TERMINATION_TIME_QNAME);
       
        try
        {
            if (currentString != null)
                _currentTime = XsdUtils.getLocalTime(currentString);
           
            if (terminationString != null)
                _terminationTime = XsdUtils.getLocalTime(terminationString);
        }
       
        catch (ParseException error)
        {
            throw new InvalidMessageFormatFault(error);
        }
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullElement"));
       
        Element eprXML = XmlUtils.getElement(xml, WssgConstants.SG_ENTRY_REFERENCE_QNAME);

        if (eprXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoEntryEPR"));
       
        try
        {
            _entryEPR = new EndpointReference(eprXML);
        }
       
        catch (SoapFault error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        Element currentXML = XmlUtils.getElement(xml, WssgConstants.CURRENT_TIME_QNAME);
        Element terminationXML = XmlUtils.getElement(xml, WssgConstants.TERMINATION_TIME_QNAME);
       
        try
        {
            _currentTime = XmlUtils.getDate(currentXML);
            _terminationTime = XmlUtils.getDate(terminationXML);
        }
       
        catch (ParseException error)
        {
            throw new InvalidMessageFormatFault(error);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.ext.faults.InvalidMessageFormatFault

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.