Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.OperationInfo


     * @return the echo service endpoint.
     */
    public static Service getEchoFaultService()
    {
        Service endpoint = getEchoService();
        OperationInfo operation = endpoint.getServiceInfo().getOperation("echo");
        FaultInfo fault = operation.addFault("echoFault");
        fault.addMessagePart(new QName("echoFault0"), String.class);

        return endpoint;
    }
View Full Code Here


        factory.writeHeaders(msg.getOrCreateHeader(), headers);
    }

    private void invokeClient(MessageContext context)
    {
        OperationInfo oi=context.getExchange().getOperation();
        AddressingOperationInfo aoi = (AddressingOperationInfo)
            oi.getProperty(AddressingOperationInfo.ADDRESSING_OPERATION_KEY);

        if (aoi == null) return;
       
        AddressingHeadersFactory factory = (AddressingHeadersFactory) oi.getProperty(AddressingInHandler.ADRESSING_FACTORY.toString());
        if (factory==null) factory = new AddressingHeadersFactory200508();
       
        AddressingHeaders headers = new AddressingHeaders();
        headers.setTo(aoi.getTo());
        headers.setAction(aoi.getInAction());
View Full Code Here

                        // url
                        service = context.getService();
                    }

                    // Dispatch the Exchange and operation
                    OperationInfo op = context.getExchange().getOperation();
                    AddressingOperationInfo aop = AddressingOperationInfo.getOperationByInAction(service.getServiceInfo(), headers
                                .getAction());
                   
                    // Check the client side case
                    if (aop == null)
View Full Code Here

   
    public static AddressingOperationInfo getOperationByInAction(ServiceInfo service, String name)
    {
        for (Iterator itr = service.getOperations().iterator(); itr.hasNext();)
        {
            OperationInfo op = (OperationInfo) itr.next();
            AddressingOperationInfo aoi = getAddressingOperationInfo(op);
           
            if (aoi == null) continue;
           
            if (aoi.getInAction() != null && aoi.getInAction().equals(name))
View Full Code Here

   
    public static AddressingOperationInfo getOperationByOutAction(ServiceInfo service, String name)
    {
        for (Iterator itr = service.getOperations().iterator(); itr.hasNext();)
        {
            OperationInfo op = (OperationInfo) itr.next();
            AddressingOperationInfo aoi = getAddressingOperationInfo(op);
           
            if (aoi == null) continue;
           
            if (aoi.getOutAction() != null && aoi.getOutAction().equals(name))
View Full Code Here

        throws Exception
    {
        XFireFault fault = (XFireFault) context.getExchange().getFaultMessage().getBody();
       
        Throwable cause = fault.getCause();
        OperationInfo op = null;
       
        if (context.getExchange() != null)
            op = context.getExchange().getOperation();

        if (cause == null || op == null)
View Full Code Here

    }
   
    public Object[] invoke(String name, XMLStreamReader reader) throws Exception
    {
        Invocation call = new Invocation(this);
        OperationInfo op = service.getServiceInfo().getOperation(name);
        if (op == null)
            throw new XFireRuntimeException("Could not find operation with name " + name);
        try
        {
            invocations.add(call);
View Full Code Here

        }
    }
   
    public Object[] invoke(String name, Object[] params) throws Exception
    {
        OperationInfo op = service.getServiceInfo().getOperation(name);
        if (op == null)
            throw new XFireRuntimeException("Could not find operation with name " + name);
       
        return invoke(op, params);
    }
View Full Code Here

    protected OperationInfo findOperation(Collection operations, List parameters)
    {
        // first check for exact matches
        for ( Iterator itr = operations.iterator(); itr.hasNext(); )
        {
            OperationInfo o = (OperationInfo) itr.next();
            List messageParts = o.getInputMessage().getMessageParts();
            if ( messageParts.size() == parameters.size() )
            {
                if (checkExactParameters(messageParts, parameters))
                    return o;
            }
        }
       
        // now check for assignable matches
        for ( Iterator itr = operations.iterator(); itr.hasNext(); )
        {
            OperationInfo o = (OperationInfo) itr.next();
            List messageParts = o.getInputMessage().getMessageParts();
            if ( messageParts.size() == parameters.size() )
            {
                if (checkParameters(messageParts, parameters))
                    return o;
            }
View Full Code Here

    }

    private Object handleRequest(Method m, Object[] args)
            throws Exception
    {
        OperationInfo op = client.getService().getServiceInfo().getOperation(m);
        if (op == null)
        {
          op = client.getService().getServiceInfo().getOperation(m.getName());
        }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.service.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.