Package org.apache.cxf.service.model

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


                            Exchange exchange = message.getExchange();
                            Service service = exchange.get(Service.class);
                            if (service != null) {
                                description.append('\'');
                                description.append(service.getName());
                                OperationInfo opInfo = exchange.get(OperationInfo.class);
                                if (opInfo != null) {
                                    description.append("#").append(opInfo.getName());
                                }
                                description.append("\' ");
                            }
                        }
View Full Code Here


            }
            if (opType == null) {
                throw new CorbaBindingException("Unable to find operation definition");
            }

            OperationInfo opInfo = bopInfo.getOperationInfo();

            QName exIdlType = null;
            List<RaisesType> exList = opType.getRaises();
            for (Iterator<RaisesType> i = exList.iterator(); i.hasNext();) {
                // REVISIT: Note that this assumes that exception names need to
View Full Code Here

                                           XMLInputFactory inputFactory,
                                           XMLOutputFactory outputFactory,
                                           EventDataWriter writer)
        throws Exception {
        if (writer != null) {
            OperationInfo opInfo = boi.getOperationInfo();
            List<Object> args = arguments;
            OperationType opType = boi.getExtensor(OperationType.class);
            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
            for (int i = 0; i < args.size(); i++) {
View Full Code Here

                                            XMLOutputFactory outputFactory,
                                            EventDataWriter writer)
        throws Exception {
        List<ParamType> params = opType.getParam();
        if (writer != null) {
            OperationInfo opInfo = boi.getOperationInfo();
            List<Object> args = arguments;

            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
            for (int i = 0; i < args.size(); i++) {
View Full Code Here

            if (exStreamable != null) {
                EventDataReader reader = (EventDataReader) ContextUtils.getDataReader(message);

                BindingOperationInfo bopInfo = message.getExchange().get(BindingOperationInfo.class);
                OperationType opType = bopInfo.getExtensor(OperationType.class);
                OperationInfo opInfo = bopInfo.getOperationInfo();
               
                List<CorbaTypeMap> typeMaps = new ArrayList<CorbaTypeMap>();

                ServiceInfo service = message.getExchange().get(ServiceInfo.class);
                List<TypeMappingType> corbaTypes =
View Full Code Here

        EndpointInfo endpointInfo = control.createMock(EndpointInfo.class);
        ServiceInfo sInfo = control.createMock(ServiceInfo.class);
        BindingInfo bInfo = control.createMock(BindingInfo.class);
        InterfaceInfo info = control.createMock(InterfaceInfo.class);
        BindingOperationInfo bopInfo = control.createMock(BindingOperationInfo.class);
        OperationInfo opInfo = control.createMock(OperationInfo.class);
        EasyMock.expect(destination.getBindingInfo()).andReturn(bInfo);
        EasyMock.expect(destination.getEndPointInfo()).andReturn(endpointInfo);               
        QName qname = new QName("" , "Test", "");
        EasyMock.expect(bInfo.getOperation(qname)).andReturn(bopInfo);
        EasyMock.expect(bopInfo.getOperationInfo()).andReturn(opInfo);                       
        CorbaMessage message = control.createMock(CorbaMessage.class);
        Exchange exchange = control.createMock(Exchange.class);
        EndpointReferenceType etype = control.createMock(EndpointReferenceType.class);
        MessageInfo mInfo = control.createMock(MessageInfo.class);
        EasyMock.expect(message.getExchange()).andReturn(exchange);     
        EasyMock.expect(destination.getAddress()).andReturn(etype);
        EasyMock.expect(opInfo.getInput()).andReturn(mInfo);
        exchange.setInMessage(message);
        EasyMock.expectLastCall();       
        OperationType opType = control.createMock(OperationType.class);
        List<ParamType> paramTypes = control.createMock(List.class);
        EasyMock.expect(opType.getParam()).andReturn(paramTypes);
View Full Code Here

        ServerRequest request = exchange.get(ServerRequest.class);
        NVList list = prepareArguments(message, destination, info, opType, opQName);
        request.arguments(list);
        message.setList(list);           
   
        OperationInfo opInfo = processWrappedOperation(bopInfo, false);

        addUnmarshalParams(message,
                           message,
                           info,
                           opType,
View Full Code Here

        }
        CorbaMessage outMessage = (CorbaMessage)exchange.getOutMessage();
       
        opType = bopInfo.getExtensor(OperationType.class);

        OperationInfo opInfo = processWrappedOperation(bopInfo, true);

        writeReturnValue(message, outMessage, opInfo, argType, reader);

        addUnmarshalParams(outMessage,
                           message,
View Full Code Here

     * WrapperClassIn & WrapperClassOut interceptors.
     */
    protected void addWrapperParams(Message message, BindingOperationInfo bopInfo, boolean isOutput)
        throws Exception {
        if (bopInfo.isUnwrappedCapable()) {
            OperationInfo opInfo = bopInfo.getOperationInfo();

            MessageInfo msgInfo = null;
            if (isOutput) {
                msgInfo = opInfo.getOutput();
            } else {
                msgInfo = opInfo.getInput();
            }
            Class wrapperTypeClass = msgInfo.getMessageParts().get(0).getTypeClass();
            opInfo = opInfo.getUnwrappedOperation();
            if (isOutput) {
                msgInfo = opInfo.getOutput();
            } else {
                msgInfo = opInfo.getInput();
            }
            List objs = message.getContent(List.class);
            if (objs != null) {
                Object wrapperType = wrapperTypeClass.newInstance();
                int i = 0;
View Full Code Here

     * 2. Since corba binding doesn't depend on wrapped doc-style, there is no need for cxf jaxws
     * WrapperClassIn & WrapperClassOut interceptors.
     */
    protected OperationInfo processWrappedOperation(BindingOperationInfo bopInfo, boolean isOutput)
        throws Exception {
        OperationInfo opInfo = bopInfo.getOperationInfo();
        MessageInfo msgInfo = null;
        if (bopInfo.isUnwrappedCapable()) {
            if (isOutput) {
                msgInfo = opInfo.getOutput();
            } else {
                msgInfo = opInfo.getInput();
            }
            Class wrapperTypeClass = msgInfo.getMessageParts().get(0).getTypeClass();
            opInfo = opInfo.getUnwrappedOperation();
            if (isOutput) {
                msgInfo = opInfo.getOutput();
            } else {
                msgInfo = opInfo.getInput();
            }
           
            for (MessagePartInfo part : msgInfo.getMessageParts()) {
                String elementType = null;
                if (part.isElement()) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.model.OperationInfo

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.