Examples of BindingMessageInfo


Examples of org.apache.cxf.service.model.BindingMessageInfo

        BindingOperationInfo unwrappedOp = bop;
        if (bop.isUnwrapped()) {
            unwrappedOp = bop.getWrappedOperation();
        }
        boolean client = isRequestor(message);
        BindingMessageInfo bmi = client ? unwrappedOp.getInput() : unwrappedOp.getOutput();
        BindingMessageInfo wrappedBmi = client ? bop.getInput() : bop.getOutput();
       
        if (bmi == null) {
            return endedHeader;
        }
       
        List<MessagePartInfo> parts = wrappedBmi.getMessageInfo().getMessageParts();
        if (parts.size() > 0) {
            MessageContentsList objs = MessageContentsList.getContentsList(message);
            if (objs == null) {
                return endedHeader;
            }
            SoapVersion soapVersion = message.getVersion();
            List<SoapHeaderInfo> headers = bmi.getExtensors(SoapHeaderInfo.class);
            if (headers == null) {
                return endedHeader;
            }           
           

            for (SoapHeaderInfo header : headers) {
                MessagePartInfo part = header.getPart();
                if (wrappedBmi != bmi) {
                    part = wrappedBmi.getMessageInfo().addMessagePart(part.getName());
                }
                if (part.getIndex() >= objs.size()) {
                    // The optional out of band header is not a part of parameters of the method
                    continue;
                }
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

            bop.addExtensor(sop);

            info.addOperation(bop);


            BindingMessageInfo bInput = bop.getInput();
            if (bInput != null) {
                MessageInfo input = null;
                BindingMessageInfo unwrappedMsg = bInput;
                if (bop.isUnwrappedCapable()) {
                    input = bop.getOperationInfo().getUnwrappedOperation().getInput();
                    unwrappedMsg = bop.getUnwrappedOperation().getInput();
                } else {
                    input = bop.getOperationInfo().getInput();
                }
                setupHeaders(bop, bInput, unwrappedMsg, input, config);
            }

            BindingMessageInfo bOutput = bop.getOutput();
            if (bOutput != null) {
                MessageInfo output = null;
                BindingMessageInfo unwrappedMsg = bOutput;
                if (bop.isUnwrappedCapable()) {
                    output = bop.getOperationInfo().getUnwrappedOperation().getOutput();
                    unwrappedMsg = bop.getUnwrappedOperation().getOutput();
                } else {
                    output = bop.getOperationInfo().getOutput();
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

                                              QName name, boolean client, int index,
                                              Message message) {
        Endpoint ep = exchange.get(Endpoint.class);
        MessagePartInfo lastChoice = null;
        BindingOperationInfo lastBoi = null;
        BindingMessageInfo lastMsgInfo = null;
        BindingMessageInfo msgInfo = null;
        BindingOperationInfo boi = null;
        for (Iterator<OperationInfo> itr = operations.iterator(); itr.hasNext();) {
            OperationInfo op = itr.next();

            boi = ep.getEndpointInfo().getBinding().getOperation(op);
            if (boi == null) {
                continue;
            }
            if (client) {
                msgInfo = boi.getOutput();
            } else {
                msgInfo = boi.getInput();
            }

            if (msgInfo == null) {
                itr.remove();
                continue;
            }
           
            Collection<MessagePartInfo> bodyParts = msgInfo.getMessageParts();
            if (bodyParts.size() == 0 || bodyParts.size() <= index) {
                itr.remove();
                continue;
            }

            MessagePartInfo p = msgInfo.getMessageParts().get(index);
            if (name.getNamespaceURI() == null || name.getNamespaceURI().length() == 0) {
                // message part has same namespace with the message
                name = new QName(p.getMessageInfo().getName().getNamespaceURI(), name.getLocalPart());
            }
            if (name.equals(p.getConcreteName())) {
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

                    getPara(xmlReader, dr, parameters, itr, message);
                }
   
            } else {
                //Bare style
                BindingMessageInfo msgInfo = null;

   
                Endpoint ep = exchange.get(Endpoint.class);
                ServiceInfo si = ep.getEndpointInfo().getService();
                if (bop != null) { //for xml binding or client side
                    if (client) {
                        msgInfo = bop.getOutput();
                    } else {
                        msgInfo = bop.getInput();
                        if (bop.getOutput() == null) {
                            exchange.setOneWay(true);
                        }
                    }
                    if (msgInfo == null) {
                        return;
                    }
                    setMessage(message, bop, client, si, msgInfo.getMessageInfo());
                }
   
                Collection<OperationInfo> operations = null;
                operations = new ArrayList<OperationInfo>();
                operations.addAll(si.getInterface().getOperations());
   
                if (xmlReader == null || !StaxUtils.toNextElement(xmlReader)) {
                    // empty input
                    getBindingOperationForEmptyBody(operations, ep, exchange);
                    return;
                }

                setDataReaderValidation(service, message, dr);
               
                int paramNum = 0;
   
                do {
                    QName elName = xmlReader.getName();
                    Object o = null;
   
                    MessagePartInfo p;
                    if (!client && msgInfo != null && msgInfo.getMessageParts() != null
                        && msgInfo.getMessageParts().size() == 0) {
                        //no input messagePartInfo
                        return;
                    }
                   
                    if (msgInfo != null && msgInfo.getMessageParts() != null
                        && msgInfo.getMessageParts().size() > 0) {
                        if (msgInfo.getMessageParts().size() > paramNum) {
                            p = msgInfo.getMessageParts().get(paramNum);
                        } else {
                            p = null;
                        }
                    } else {
                        p = findMessagePart(exchange, operations, elName, client, paramNum, message);
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

        if (bop.isUnwrapped()) {
            bop = bop.getWrappedOperation();
        }
       
        boolean client = isRequestor(message);
        BindingMessageInfo bmi = client ? bop.getOutput() : bop.getInput();
        if (bmi == null) {
            // one way operation.
            return;
        }
       
        List<SoapHeaderInfo> headers = bmi.getExtensors(SoapHeaderInfo.class);
        if (headers == null || headers.size() == 0) {
            return;
        }
       
        boolean supportsNode = this.supportsDataReader(message, Node.class);
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

        Collection<BindingOperationInfo> bindingOperations = endpoint.getBinding().getOperations();
        if (null != bindingOperations) {
            Iterator<BindingOperationInfo> iterator = bindingOperations.iterator();
            while (iterator.hasNext()) {
                BindingOperationInfo operationInfo = iterator.next();
                BindingMessageInfo inputInfo = operationInfo.getInput();
                BindingMessageInfo outputnfo = operationInfo.getOutput();
                Collection<BindingFaultInfo> faults = operationInfo.getFaults();
               
                //check the extensions under <wsdl:operation>
                checkRespectBindingFeature(getExtensors(operationInfo));
                //check the extensions under <wsdl:input>
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

        if (bop.isUnwrapped()) {
            bop = bop.getWrappedOperation();
        }
       
        boolean client = isRequestor(message);
        BindingMessageInfo bmi = client ? bop.getInput() : bop.getOutput();
       
        if (bmi == null) {
            return;
        }
       
        SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
       
        if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().size() == 0) {
            Service s = ex.getService();
            DataBinding db = s.getDataBinding();
            if (db instanceof JAXBDataBinding
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

                    holdersSize++;
                }
            }
            // need to check the soap header information
            int soapHeadersSize = 0;
            BindingMessageInfo bmi =  boi.getInput();
            if (bmi != null) {
                List<SoapHeaderInfo> headers = bmi.getExtensors(SoapHeaderInfo.class);
                if (headers != null) {
                    soapHeadersSize = headers.size();
                }
            }
         
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

    }
   
    @Test
    public void testGetEffectiveMessagePolicy() {
        ExternalAttachmentProvider eap = new ExternalAttachmentProvider();
        BindingMessageInfo bmi = control.createMock(BindingMessageInfo.class);
        setUpAttachment(bmi, false, eap);
        control.replay();
        assertTrue(eap.getEffectivePolicy(bmi).isEmpty());
        control.verify();
       
View Full Code Here

Examples of org.apache.cxf.service.model.BindingMessageInfo

   
    private void doTestInitialisePolicy(boolean requestor) {       
        EndpointInfo ei = control.createMock(EndpointInfo.class);
        BindingOperationInfo boi = control.createMock(BindingOperationInfo.class);
        PolicyEngineImpl engine = control.createMock(PolicyEngineImpl.class);
        BindingMessageInfo bmi = control.createMock(BindingMessageInfo.class);
        if (requestor) {
            EasyMock.expect(boi.getInput()).andReturn(bmi);
        } else {
            EasyMock.expect(boi.getOutput()).andReturn(bmi);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.