Examples of JavaInterface


Examples of com.sun.tools.internal.ws.processor.model.java.JavaInterface

        super(model, options, receiver);
    }

    @Override
    public void visit(Service service) {
        JavaInterface intf = service.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);
        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }
View Full Code Here

Examples of com.sun.tools.ws.processor.model.java.JavaInterface

        if (port.isProvider()) {
          continue; // Not generating for Provider based endpoint
        }
        SEIInfo seiInfo = new SEIInfo();

        JavaInterface intf = port.getJavaInterface();
        // fqn class name
        String className = intf.getName();
        // If the interface has already been defined, just skip it.
        if (interfaceClassNames.contains(className)) {
          continue;
        }
        interfaceClassNames.add(className);
       
        // package name of this interface
        String packageName = ClassNameUtil.getPackageName(className);
        seiInfo.setPackageName(packageName);
        // simple class name
        // String simpleName = intf.getSimpleName();
        String simpleName = ClassNameUtil.stripQualifier(className);
        seiInfo.setName(simpleName);
        // java doc of this interface
        String ptDoc = intf.getJavaDoc();
        seiInfo.setDocComment(ptDoc);
       
        // @WebService
        seiInfo.setWebServiceAnnotation(getWebServiceAnnotation(port));
       
View Full Code Here

Examples of net.percederberg.grammatica.code.java.JavaInterface

        if (gen.getPublicAccess()) {
            modifiers = JavaInterface.PUBLIC;
        } else {
            modifiers = JavaInterface.PACKAGE_LOCAL;
        }
        this.ifc = new JavaInterface(modifiers,
                                     gen.getBaseName() + "Constants");
        initializeCode();
    }
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.type.JavaInterface

  public JavaClassConcrete createConcreteClass (String name, Scope scope, boolean isStatic, boolean isFinal) {
    return new JavaClassConcrete(this, name, scope, isStatic, isFinal);
  }
 
  public JavaInterface createJavaInterface (String name, Scope scope, boolean isStatic, boolean isFinal) {
    return new JavaInterface(this, name, scope, isStatic, isFinal);
  }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaInterface

            enableOpMime = true;
            if (bopBinding.getJaxwsPara() != null) {
                jaxwsBinding.setJaxwsPara(bopBinding.getJaxwsPara());
            }
        }
        JavaInterface jf = null;
        for (JavaInterface jf2 : model.getInterfaces().values()) {
            if (binding.getInterface().getName().getLocalPart()
                    .equals(jf2.getWebServiceName())) {
                jf = jf2;
            }
        }
        if (isSoapBinding()) {
            SoapBinding soapBinding = (SoapBinding)bindingObj;
            if (SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()) == null) {
                jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
            } else {
                jf.setSOAPStyle(SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()));
            }
        } else {
            // REVISIT: fix for xml binding
            jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
        }

        Object[] methods = jf.getMethods().toArray();
        for (int i = 0; i < methods.length; i++) {
            JavaMethod jm = (JavaMethod)methods[i];
            if (jm.getOperationName() != null && jm.getOperationName().equals(bop.getName().getLocalPart())) {
                if (isSoapBinding()) {
                    // TODO: add customize here
                    //doCustomizeOperation(jf, jm, bop);
                    Map prop = getSoapOperationProp(bop);
                    String soapAction = prop.get(soapOPAction) == null ? "" : (String)prop.get(soapOPAction);
                    String soapStyle = prop.get(soapOPStyle) == null ? "" : (String)prop.get(soapOPStyle);
                    jm.setSoapAction(soapAction);

                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null && this.bindingObj == null) {
                        org.apache.cxf.common.i18n.Message msg =
                            new  org.apache.cxf.common.i18n.Message("BINDING_STYLE_NOT_DEFINED",
                                                                         LOG);
                        throw new ToolException(msg);
                    }
                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null) {
                        jm.setSoapStyle(jf.getSOAPStyle());
                    } else {
                        jm.setSoapStyle(SOAPBindingUtil.getSoapStyle(soapStyle));
                    }
                } else {
                    // REVISIT: fix for xml binding
                    jm.setSoapStyle(jf.getSOAPStyle());
                }

                if (jm.getSoapStyle().equals(javax.jws.soap.SOAPBinding.Style.RPC)) {
                    jm.getAnnotationMap().remove("SOAPBinding");
                }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaInterface

    }

    private JavaPort processPort(JavaModel model, ServiceInfo si, EndpointInfo port) throws ToolException {
        BindingInfo binding = port.getBinding();
        String portType = binding.getInterface().getName().getLocalPart();
        JavaInterface intf = PortTypeProcessor.getInterface(context, si, binding.getInterface());
        JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
        jport.setPackageName(intf.getPackageName());
       
        jport.setPortName(port.getName().getLocalPart());
        jport.setBindingAdress(port.getAddress());
        jport.setBindingName(binding.getName().getLocalPart());


        jport.setPortType(portType);


        jport.setInterfaceClass(intf.getName());
        bindingType = getBindingType(binding);

        if (bindingType == null) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaInterface

            enableOpMime = true;
            if (bopBinding.getJaxwsParas() != null) {
                jaxwsBinding.setJaxwsParas(bopBinding.getJaxwsParas());
            }
        }
        JavaInterface jf = null;
        for (JavaInterface jf2 : model.getInterfaces().values()) {
            if (binding.getInterface().getName().getLocalPart()
                    .equals(jf2.getWebServiceName())) {
                jf = jf2;
            }
        }
        if (isSoapBinding()) {
            SoapBinding soapBinding = (SoapBinding)bindingObj;
            if (SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()) == null) {
                jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
            } else {
                jf.setSOAPStyle(SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()));
            }
        } else {
            // REVISIT: fix for xml binding
            jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
        }

        Object[] methods = jf.getMethods().toArray();
        for (int i = 0; i < methods.length; i++) {
            JavaMethod jm = (JavaMethod)methods[i];
            if (jm.getOperationName() != null && jm.getOperationName().equals(bop.getName().getLocalPart())) {
                if (isSoapBinding()) {
                    // TODO: add customize here
                    //doCustomizeOperation(jf, jm, bop);
                    Map prop = getSoapOperationProp(bop);
                    String soapAction = prop.get(soapOPAction) == null ? "" : (String)prop.get(soapOPAction);
                    String soapStyle = prop.get(soapOPStyle) == null ? "" : (String)prop.get(soapOPStyle);
                    jm.setSoapAction(soapAction);

                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null && this.bindingObj == null) {
                        org.apache.cxf.common.i18n.Message msg =
                            new  org.apache.cxf.common.i18n.Message("BINDING_STYLE_NOT_DEFINED",
                                                                         LOG);
                        throw new ToolException(msg);
                    }
                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null) {
                        jm.setSoapStyle(jf.getSOAPStyle());
                    } else {
                        jm.setSoapStyle(SOAPBindingUtil.getSoapStyle(soapStyle));
                    }
                } else {
                    // REVISIT: fix for xml binding
                    jm.setSoapStyle(jf.getSOAPStyle());
                }

                if (jm.getSoapStyle().equals(javax.jws.soap.SOAPBinding.Style.RPC)) {
                    jm.getAnnotationMap().remove("SOAPBinding");
                }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaInterface

            enableOpMime = true;
            if (bopBinding.getJaxwsPara() != null) {
                jaxwsBinding.setJaxwsPara(bopBinding.getJaxwsPara());
            }
        }
        JavaInterface jf = null;
        for (JavaInterface jf2 : model.getInterfaces().values()) {
            if (binding.getInterface().getName().getLocalPart()
                    .equals(jf2.getWebServiceName())) {
                jf = jf2;
            }
        }
        if (isSoapBinding()) {
            SoapBinding soapBinding = (SoapBinding)bindingObj;
            if (SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()) == null) {
                jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
            } else {
                jf.setSOAPStyle(SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()));
            }
        } else {
            // REVISIT: fix for xml binding
            jf.setSOAPStyle(javax.jws.soap.SOAPBinding.Style.DOCUMENT);
        }

        Object[] methods = jf.getMethods().toArray();
        for (int i = 0; i < methods.length; i++) {
            JavaMethod jm = (JavaMethod)methods[i];
            if (jm.getOperationName() != null && jm.getOperationName().equals(bop.getName().getLocalPart())) {
                if (isSoapBinding()) {
                    // TODO: add customize here
                    //doCustomizeOperation(jf, jm, bop);
                    Map prop = getSoapOperationProp(bop);
                    String soapAction = prop.get(soapOPAction) == null ? "" : (String)prop.get(soapOPAction);
                    String soapStyle = prop.get(soapOPStyle) == null ? "" : (String)prop.get(soapOPStyle);
                    jm.setSoapAction(soapAction);

                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null && this.bindingObj == null) {
                        org.apache.cxf.common.i18n.Message msg =
                            new  org.apache.cxf.common.i18n.Message("BINDING_STYLE_NOT_DEFINED",
                                                                         LOG);
                        throw new ToolException(msg);
                    }
                    if (SOAPBindingUtil.getSoapStyle(soapStyle) == null) {
                        jm.setSoapStyle(jf.getSOAPStyle());
                    } else {
                        jm.setSoapStyle(SOAPBindingUtil.getSoapStyle(soapStyle));
                    }
                } else {
                    // REVISIT: fix for xml binding
                    jm.setSoapStyle(jf.getSOAPStyle());
                }

                if (jm.getSoapStyle().equals(javax.jws.soap.SOAPBinding.Style.RPC)) {
                    jm.getAnnotationMap().remove("SOAPBinding");
                }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaInterface

            JavaServiceClass service = null;
            if (!services.values().isEmpty()) {
                for (JavaServiceClass javaservice : services.values()) {
                    service = javaservice;
                    for (JavaPort jport : javaservice.getPorts()) {
                        JavaInterface intf = interfaces.get(jport.getInterfaceClass());
                        outputImpl(intf, service, jport.getPortName(), penv);
                       
                    }
                }
            } else {
                for (String interfaceName : interfaces.keySet()) {
                    JavaInterface intf = interfaces.get(interfaceName);
                    outputImpl(intf, null, "", penv);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.java.JavaInterface

           
            // We have no component type description, simply introspect the POJO and
            // create a single Service for it
            Service service = assemblyFactory.createService();
            service.setName(pojoClass.getSimpleName());
            JavaInterface javaInterface;
            try {
                javaInterface = javaFactory.createJavaInterface(pojoClass);
            } catch (InvalidInterfaceException e) {
                throw new ContributionResolveException(e);
            }
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.