Examples of MessagePartInfo


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

                                    QName exIdlType,
                                    OperationInfo opInfo,
                                    EventDataWriter writer)
        throws Exception {
        QName elName = new QName("", exIdlType.getLocalPart());
        MessagePartInfo faultPart = getFaultMessagePartInfo(opInfo, elName);
        if (faultPart == null) {
            throw new CorbaBindingException("Coulnd't find the message fault part : " + elName);
        }

        Method faultMethod = ex.getClass().getMethod("getFaultInfo");
View Full Code Here

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

            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++) {
                MessagePartInfo part = getInputMessagePartInfo(opInfo, i);    
                Object partValue = args.get(i);
                writer.write(partValue, part, evtWriter);
            }
            ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
            XMLEventReader evtReader = inputFactory.createXMLEventReader(inStream);
View Full Code Here

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

            List<Object> args = arguments;

            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
            XMLEventWriter evtWriter = outputFactory.createXMLEventWriter(outStream);
            for (int i = 0; i < args.size(); i++) {
                MessagePartInfo part = getOutputMessagePartInfo(opInfo, i);
                Object partValue = args.get(i);
                writer.write(partValue, part, evtWriter);
            }
            ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
            XMLEventReader evtReader = inputFactory.createXMLEventReader(inStream);
View Full Code Here

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


    protected MessagePartInfo getInputMessagePartInfo(OperationInfo opInfo, int index) {
        MessageInfo msgInfo = opInfo.getInput();
        List<MessagePartInfo> parts = msgInfo.getMessageParts();
        MessagePartInfo part = parts.get(index);
        return part;   
    }
View Full Code Here

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

    }

    protected MessagePartInfo getOutputMessagePartInfo(OperationInfo opInfo, int index) {
        MessageInfo msgInfo = opInfo.getOutput();
        List<MessagePartInfo> parts = msgInfo.getMessageParts();
        MessagePartInfo part = parts.get(index);
        return part;   
    }
View Full Code Here

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

            corbaStaxObject.writeObjectToStax(retVal.getObject(), evtWriter,
                                              XMLEventFactory.newInstance());
            evtWriter.flush();
            ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
            XMLEventReader evtReader = inputFactory.createXMLEventReader(inStream);           
            MessagePartInfo part = getReturnMessagePartInfo(msgInfo);
            retValue = reader.read(part, evtReader);
            List<Object> args = new ArrayList<Object>();
            args.add(retValue);
            message.setContent(List.class, args);
        }
View Full Code Here

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

                                                  evtWriter,
                                                  XMLEventFactory.newInstance());
                evtWriter.flush();
                ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
                XMLEventReader evtReader = inputFactory.createXMLEventReader(inStream);
                MessagePartInfo part = getMessagePartInfo(msgInfo,
                                                          index,
                                                          opType.getReturn() == null,
                                                          isOutput);
                Object partObj = reader.read(part, evtReader);
                args.add(partObj);
View Full Code Here

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

                                                 boolean isOutput) {
        List<MessagePartInfo> parts = msgInfo.getMessageParts();
        if (isOutput && !isVoidReturn) {
            index++;
        }
        MessagePartInfo part = parts.get(index);
        return part;    
    }
View Full Code Here

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

        return part;    
    }

    protected MessagePartInfo getReturnMessagePartInfo(MessageInfo msgInfo) {
        List<MessagePartInfo> parts = msgInfo.getMessageParts();
        MessagePartInfo part = parts.get(0);
        return part;    
    }
View Full Code Here

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

    private void buildMessage(AbstractMessageContainer minfo, Message msg) {
        SchemaCollection schemas = minfo.getOperation().getInterface().getService()
            .getXmlSchemaCollection();
        List<?> orderedParam = msg.getOrderedParts(null);
        for (Part part : cast(orderedParam, Part.class)) {
            MessagePartInfo pi = minfo.addMessagePart(new QName(minfo.getName().getNamespaceURI(), part
                .getName()));
            if (part.getTypeName() != null) {
                pi.setTypeQName(part.getTypeName());
                pi.setElement(false);
                pi.setXmlSchema(schemas.getTypeByQName(part.getTypeName()));
            } else if (part.getElementName() != null) {
                pi.setElementQName(part.getElementName());
                XmlSchemaElement schemaElement = schemas.getElementByQName(part.getElementName());
                if (null == schemaElement) {
                    org.apache.cxf.common.i18n.Message errorMessage =
                        new org.apache.cxf.common.i18n.Message("WSDL4J_BAD_ELEMENT_PART",
                                                               LOG,
                                                               part.getName(),
                                                               part.getElementName());
                    throw new WSDLRuntimeException(errorMessage);
                }
                pi.setElement(true);
                pi.setXmlSchema(schemaElement);
            } else {
                org.apache.cxf.common.i18n.Message errorMessage =
                    new org.apache.cxf.common.i18n.Message("PART_NO_NAME_NO_TYPE",
                                                           LOG,
                                                           part.getName());
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.