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

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


            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


        //
       
        String timeString = xml.getAttribute(MuwsConstants.TIME);
       
        if (timeString == null || timeString.length() == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoTransitionTime"));
       
        try
        {
            _transitionTime = XsdUtils.getLocalTime(timeString);
        }
       
        catch (ParseException error)
        {
            throw new InvalidMessageFormatFault(error);
        }
       
        //
        // now grab the two state values - the "previous" one is optional
        //
       
        Element previousXML = XmlUtils.getElement(xml, MuwsConstants.PREVIOUS_QNAME);
       
        if (previousXML != null)
            _previous = new SimpleStateType(previousXML);
       
        Element enteredXML = XmlUtils.getElement(xml, MuwsConstants.ENTERED_QNAME);

        if (enteredXML == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoEnteredState"));
       
        _entered = new SimpleStateType(enteredXML);
    }
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("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

        //       
        QName qname = WsrpConstants.PROPERTY_QNAME;
        Element[] properties = XmlUtils.getElements(request, qname);
       
        if (properties.length == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoPropertiesInGet"));
       
        _qnames = new QName[properties.length];
       
        for (int n = 0; n < properties.length; ++n)
        {
            _qnames[n] = XmlUtils.getQName(properties[n]);
           
            if (_qnames[n] == null)
            {
                Object[] filler = { new Integer(n) };
                throw new InvalidMessageFormatFault(_MESSAGES.get("NullPropertyN", filler));
            }
        }
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullRequestElement"));
       
        _qname = XmlUtils.getQName(request);
       
        if (_qname == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NullGetProperty"));
    }
View Full Code Here

       
        Element expression =
            XmlUtils.getElement(request, WsrpConstants.QUERY_EXPRESSION_QNAME);
       
        if (expression == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoQueryExpressionFound"));
       
        _dialect = expression.getAttribute(WsrpConstants.DIALECT);
       
        if (_dialect == null || _dialect.length() == 0)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoDialectFound"));
       
        _query = XmlUtils.extractText(expression);
       
        if (_query == null)
            throw new InvalidMessageFormatFault(_MESSAGES.get("NoQueryFound"));
    }
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

            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

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.