Package org.codehaus.groovy.runtime.metaclass

Examples of org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Header


        this.theClass = theClass;
        theCachedClass = ReflectionCache.getCachedClass(theClass);
        this.isGroovyObject = GroovyObject.class.isAssignableFrom(theClass);
        this.isMap = Map.class.isAssignableFrom(theClass);
        this.registry = GroovySystem.getMetaClassRegistry();
        metaMethodIndex = new MetaMethodIndex(theCachedClass);
        final MetaMethod[] metaMethods = theCachedClass.getNewMetaMethods();
        if (add != null && !(add.length == 0)) {
            ArrayList<MetaMethod> arr = new ArrayList<MetaMethod>();
            arr.addAll(Arrays.asList(metaMethods));
            arr.addAll(Arrays.asList(add));
View Full Code Here


        this.theClass = theClass;
        theCachedClass = ReflectionCache.getCachedClass(theClass);
        this.isGroovyObject = GroovyObject.class.isAssignableFrom(theClass);
        this.isMap = Map.class.isAssignableFrom(theClass);
        this.registry = GroovySystem.getMetaClassRegistry();
        metaMethodIndex = new MetaMethodIndex(theCachedClass);
        final MetaMethod[] metaMethods = theCachedClass.getNewMetaMethods();
        if (add != null && !(add.length == 0)) {
            ArrayList<MetaMethod> arr = new ArrayList<MetaMethod>();
            arr.addAll(Arrays.asList(metaMethods));
            arr.addAll(Arrays.asList(add));
View Full Code Here

        this.theClass = theClass;
        theCachedClass = ReflectionCache.getCachedClass(theClass);
        this.isGroovyObject = GroovyObject.class.isAssignableFrom(theClass);
        this.isMap = Map.class.isAssignableFrom(theClass);
        this.registry = GroovySystem.getMetaClassRegistry();
        metaMethodIndex = new MetaMethodIndex(theCachedClass);
        final MetaMethod[] metaMethods = theCachedClass.getNewMetaMethods();
        if (add != null && !(add.length == 0)) {
            List<MetaMethod> arr = new ArrayList<MetaMethod>();
            arr.addAll(Arrays.asList(metaMethods));
            arr.addAll(Arrays.asList(add));
View Full Code Here

        this.theClass = theClass;
        theCachedClass = ReflectionCache.getCachedClass(theClass);
        this.isGroovyObject = GroovyObject.class.isAssignableFrom(theClass);
        this.isMap = Map.class.isAssignableFrom(theClass);
        this.registry = GroovySystem.getMetaClassRegistry();
        metaMethodIndex = new MetaMethodIndex(theCachedClass);
        final MetaMethod[] metaMethods = theCachedClass.getNewMetaMethods();
        if (add != null && !(add.length == 0)) {
            ArrayList<MetaMethod> arr = new ArrayList<MetaMethod>();
            arr.addAll(Arrays.asList(metaMethods));
            arr.addAll(Arrays.asList(add));
View Full Code Here

        log.debug("Unmarshalling SOAP message");
        Envelope soapMessage = (Envelope) unmarshallMessage(inTransport.getIncomingStream());
        samlMsgCtx.setInboundMessage(soapMessage);

        Header messageHeader = soapMessage.getHeader();
        if (messageHeader != null) {
            checkUnderstoodSOAPHeaders(soapMessage.getHeader().getUnknownXMLObjects());
        }

        List<XMLObject> soapBodyChildren = soapMessage.getBody().getUnknownXMLObjects();
View Full Code Here

     * @param messageContext the current message context being processed
     * @return a SOAPAction HTTP header URI value
     */
    protected String getSOAPAction(MessageContext messageContext) {
        Envelope env = (Envelope) messageContext.getOutboundMessage();
        Header header = env.getHeader();
        if (header == null) {
            return null;
        }
        List<XMLObject> objList = header.getUnknownXMLObjects(Action.ELEMENT_NAME);
        if (objList == null || objList.isEmpty()) {
            return null;
        } else {
            return ((Action)objList.get(0)).getValue();
        }
View Full Code Here

     */
    private void checkUnderstoodSOAPHeaders(MessageContext messageContext)
            throws MessageDecodingException {
       
        Envelope envelope = (Envelope) messageContext.getInboundMessage();
        Header soapHeader = envelope.getHeader();
        if (soapHeader == null) {
            log.debug("SOAP Envelope contained no Header");
            return;
        }
        List<XMLObject> headers = soapHeader.getUnknownXMLObjects();
        if (headers == null || headers.isEmpty()) {
            log.debug("SOAP Envelope header list was either null or empty");
            return;
        }

View Full Code Here

public class HeaderUnmarshaller extends AbstractXMLObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        Header header = (Header) parentXMLObject;
        header.getUnknownXMLObjects().add(childXMLObject);
    }
View Full Code Here

        header.getUnknownXMLObjects().add(childXMLObject);
    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        Header header = (Header) xmlObject;
        QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
                .getPrefix());
        if (attribute.isId()) {
            header.getUnknownAttributes().registerID(attribQName);
        }
        header.getUnknownAttributes().put(attribQName, attribute.getValue());
    }
View Full Code Here

     *
     * @param envelope the SOAP 1.1 envelope to process
     * @param headerBlock the header to add
     */
    public static void addSOAP11HeaderBlock(Envelope envelope, XMLObject headerBlock) {
        Header envelopeHeader = envelope.getHeader();
        if (envelopeHeader == null) {
            envelopeHeader = (Header) Configuration.getBuilderFactory().getBuilder(Header.DEFAULT_ELEMENT_NAME)
                .buildObject(Header.DEFAULT_ELEMENT_NAME);
            envelope.setHeader(envelopeHeader);
        }
       
        envelopeHeader.getUnknownXMLObjects().add(headerBlock);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.runtime.metaclass.MetaMethodIndex$Header

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.