Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.ServiceInfo


       
        Element element = new Element("dates", ns);
        new Document(element);
        JDOMWriter writer = new JDOMWriter(element);
        MessageContext mc = new MessageContext();
        mc.setService(new Service(new ServiceInfo(
            new QName("larry","curly","moe"),DateTypeTest.class)));
        dtoType.writeObject(dto, writer, new MessageContext());
        writer.close();
       
        addNamespace("d", ns);
View Full Code Here


        }
        catch (NoSuchMethodException e)
        {
            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);
View Full Code Here

                PortType portType = (PortType) entry.getKey();
                Collection ports = (Collection) entry.getValue();
               
                if (ports.size() == 0) continue;
               
                ServiceInfo serviceInfo = getServiceInfo(portType);
                WSDLServiceConfigurator config = new WSDLServiceConfigurator(serviceInfo,
                                                                             definition,
                                                                             wservice,
                                                                             portType,
                                                                             ports,
View Full Code Here

        }
    }
   
    protected void visit(PortType portType)
    {
        ServiceInfo serviceInfo = new ServiceInfo(null, Object.class);
        portType2serviceInfo.put(portType, serviceInfo);
        serviceInfo.setPortType(portType.getQName());
        Element documentation = portType.getDocumentationElement();
        if( documentation != null ){
            String docText = documentation.getNodeValue() ;//TextContent();
            serviceInfo.setDocumentation(docText);
        }
        if (forceBare) {
      isWrapped = false;
    } else {
      isWrapped = true;
      Iterator itr = portType.getOperations().iterator();
      while (isWrapped && itr.hasNext()) {
        Operation o = (Operation) itr.next();
        isWrapped = isWrapped(o, schemas);
      }
    }
       
        serviceInfo.setWrapped(isWrapped);
       
        List operations = portType.getOperations();
        for (int i = 0; i < operations.size(); i++)
        {
            Operation operation = (Operation) operations.get(i);
View Full Code Here

    {
        setCurrentService(service);
       
        if (!isWritten(context));

        ServiceInfo serviceInfo = service.getServiceInfo();

        String clsName = getClassName(context, service);
        log.info("Creating class " + clsName);

        File classFile = new File(context.getOutputDirectory(), clsName.replace('.', File.separatorChar) + ".java");
       
        if (classFile.exists() && !overwriteClass(context, service, clsName, classFile))
        {
            return;
        }
       
        JDefinedClass jc = context.getCodeModel()._class(clsName, getClassType());
       
        SchemaSupport schema = context.getSchemaGenerator();
        String documentation = service.getServiceInfo().getDocumentation();
        if( documentation != null ){
            jc.javadoc().add(documentation);   
        }
       
        annotate(context, service, jc, binding);
       
        // Process operations
        for (Iterator itr = serviceInfo.getOperations().iterator(); itr.hasNext();)
        {
            OperationInfo op = (OperationInfo) itr.next();
           
            JType returnType = getReturnType(context, schema, op);
           
View Full Code Here

        if (theStyle == null) theStyle = style;
        if (theUse == null) theUse = use;
        if (portType == null) portType = new QName(theNamespace, theName + "PortType");
        if (theScope == null) theScope = "";
       
        ServiceInfo serviceInfo = new ServiceInfo(portType, clazz);
        createDocumentationProvider(serviceInfo);
       
       
        serviceInfo.setDocumentation(getDocumentationProvider().getServiceDoc());
       
        if (theStyle.equals(SoapConstants.STYLE_WRAPPED))
            serviceInfo.setWrapped(true);
       
        Service endpoint = new Service(serviceInfo);
        endpoint.setName(qName);
        setProperties(endpoint, properties);
View Full Code Here

        return binding;
    }

    protected void createSoapBinding(Service service, AbstractSoapBinding binding)
    {
        ServiceInfo serviceInfo = service.getServiceInfo();

        String style = (String) service.getProperty(STYLE);
        String use = (String) service.getProperty(USE);
        binding.setStyle(style);
        binding.setUse(use);
        binding.setSerializer(getSerializer(binding));

        // Create SOAP metadata for the binding operation
        for (Iterator itr = serviceInfo.getOperations().iterator(); itr.hasNext();)
        {
            OperationInfo op = (OperationInfo) itr.next();
           
            createBindingOperation(service, binding, op);
        }
View Full Code Here

        return true;
    }   

    protected OperationInfo addOperation(Service endpoint, final Method method, String style)
    {
        ServiceInfo service = endpoint.getServiceInfo();

        final String opName = getOperationName(service, method);

        final OperationInfo op = service.addOperation(opName, method);

        final Class[] paramClasses = method.getParameterTypes();

        boolean isDoc = style.equals(SoapConstants.STYLE_DOCUMENT);
View Full Code Here

TOP

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

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.