Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.MessageInfo


        };
       
        Service service = osf.create(HeaderService.class);
        ServiceInfo info = service.getServiceInfo();
       
        MessageInfo inMsg =info.getOperation("doSomething").getInputMessage();
        assertEquals(1, inMsg.getMessageParts().size());
       
        AbstractSoapBinding soapOp = (AbstractSoapBinding) service.getBindings().iterator().next();
        MessagePartInfo part = soapOp.getHeaders(inMsg).getMessagePart(new QName(service.getName().getNamespaceURI(), "header"));
        assertNotNull(part);
    }
View Full Code Here


        BeanType type = new BeanType();
        tm.register(SimpleBean.class, new QName("urn:Bean", "SimpleBean"), type);
       
        ServiceInfo info = service.getServiceInfo();
        OperationInfo o = info.getOperation("getSubmitBean");
        MessageInfo inMsg = o.getInputMessage();
        MessagePartInfo p = inMsg.getMessagePart(new QName("urn:Bean", "bean"));
        p.setSchemaType(type);
       
        o = info.getOperation("getSimpleBean");
        MessageInfo outMsg = o.getOutputMessage();
        p = outMsg.getMessagePart(new QName("urn:Bean", "getSimpleBeanout"));
        p.setSchemaType(type);
    }
View Full Code Here

        type.setSchemaType(new QName("urn:ReallyNotSoSimpleBean", "SimpleBean"));
        type.setTypeMapping(tm);
       
        ServiceInfo info = service.getServiceInfo();
        OperationInfo o = info.getOperation("getSubmitBean");
        MessageInfo inMsg = o.getInputMessage();
        MessagePartInfo p = inMsg.getMessagePart(new QName(service.getTargetNamespace(), "bean"));
        p.setSchemaType(type);
    }
View Full Code Here

            throw new XFireRuntimeException("Could not find echo method on Echo class", e);
        }
        ServiceInfo serviceInfo = new ServiceInfo(new QName("http://test.xfire.codehaus.org", "EchoPortType"),
                                                  echoClass);
        OperationInfo operation = serviceInfo.addOperation("echo", echoMethod);
        MessageInfo inputMessage = operation.createMessage(new QName("echoRequest"));
        operation.setInputMessage(inputMessage);
        MessageInfo outputMessage = operation.createMessage(new QName("echoResponse"));
        operation.setOutputMessage(outputMessage);
        inputMessage.addMessagePart(new QName("echoRequestin0"), String.class);
        outputMessage.addMessagePart(new QName("echoResponseout"), String.class);

        Service service = new Service(serviceInfo);
        service.setName(new QName("http://test.xfire.codehaus.org", "Echo"));
        return service;
    }
View Full Code Here

    protected void visit(Input input)
    {
        if (isWrapped)
        {
            Part part = (Part) input.getMessage().getParts().values().iterator().next();
            MessageInfo info = opInfo.createMessage(new QName(part.getElementName().getNamespaceURI(),
                                                              input.getMessage().getQName().getLocalPart()));
            winput2msg.put(input, info);
           
            opInfo.setInputMessage(info);
           
            createMessageParts(info, getWrappedSchema(input.getMessage()));
        }
        else
        {
            MessageInfo info = opInfo.createMessage(input.getMessage().getQName());
            winput2msg.put(input, info);
           
            opInfo.setInputMessage(info);
            createMessageParts(info,  input.getMessage());
        }
View Full Code Here

        return getDefinition().getTargetNamespace();
    }

    protected void visit(Output output)
    {
        MessageInfo info = opInfo.createMessage(
            new QName(opInfo.getInputMessage().getName().getNamespaceURI(),
                      output.getMessage().getQName().getLocalPart()));
        opInfo.setOutputMessage(info);
        woutput2msg.put(output, info);
       
View Full Code Here

        // TODO: filter out operations which aren't applicable
        MessagePartInfo lastChoice = null;
        for ( Iterator itr = operations.iterator(); itr.hasNext(); )
        {
            OperationInfo op = (OperationInfo) itr.next();
            MessageInfo msgInfo = null;
            if (isClientModeOn(context))
            {
                msgInfo = op.getOutputMessage();
            }
            else
            {
                msgInfo = op.getInputMessage();
            }

            Collection bodyParts = msgInfo.getMessageParts();
            if (bodyParts.size() == 0 || bodyParts.size() <= index)
            {
                // itr.remove();
                continue;
            }
           
            MessagePartInfo p = (MessagePartInfo) msgInfo.getMessageParts().get(index);
            if (p.getName().equals(name)) return p;

            if (p.getSchemaType().getSchemaType().equals(XSD_ANY))
                lastChoice = p;
        }
View Full Code Here

        return (on != null && on.booleanValue());
    }
   
    public static MessageInfo getIncomingMessageInfo(MessageContext context)
    {
        MessageInfo msgInfo;
        if (isClientModeOn(context))
        {
            msgInfo = context.getExchange().getOperation().getOutputMessage();
        }
        else
View Full Code Here

        return msgInfo;
    }
   
    public static MessageInfo getOutgoingMessageInfo(MessageContext context)
    {
        MessageInfo msgInfo;
        if (isClientModeOn(context))
        {
            msgInfo = context.getExchange().getOperation().getInputMessage();
        }
        else
View Full Code Here

    {
        if (context.getCurrentMessage().equals(context.getExchange().getInMessage()))
        {
            List body = (List) context.getCurrentMessage().getBody();
            Binding binding = context.getBinding();
            MessageInfo msgInfo = context.getExchange().getOperation().getOutputMessage();
            Object result = ServiceInvocationHandler.readHeaders(context,
                                                                 binding.getHeaders(msgInfo),
                                                                 (Object[]) context.getOutMessage().getBody());
           
            if (result != null)
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.service.MessageInfo

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.