com.sun.tools.internal.ws.processor.model.Port Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.model.Port. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Names.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static String getPortName(Port port) {
    String javaPortName =
        (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
    if (javaPortName != null) {
        return javaPortName;
    } else {
        QName portName =
            (QName) port.getProperty(
                ModelProperties.PROPERTY_WSDL_PORT_NAME);
        if (portName != null) {
            return portName.getLocalPart();
        } else {
            String name = stripQualifier(port.getJavaInterface().getName());
            return ClassNameInfo.replaceInnerClassSym(name);
        }
    }
}
 
Example #2
Source File: Names.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static String getPortName(Port port) {
    String javaPortName =
        (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
    if (javaPortName != null) {
        return javaPortName;
    } else {
        QName portName =
            (QName) port.getProperty(
                ModelProperties.PROPERTY_WSDL_PORT_NAME);
        if (portName != null) {
            return portName.getLocalPart();
        } else {
            String name = stripQualifier(port.getJavaInterface().getName());
            return ClassNameInfo.replaceInnerClassSym(name);
        }
    }
}
 
Example #3
Source File: ServiceGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #4
Source File: ServiceGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #5
Source File: WSDLModelerBase.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 *
 * @param port
 * @param wsdlPort
 */
protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) {
    if (isProvider(wsdlPort)) {
        return;
    }
    JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);

    String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null;
    if(portMethodName != null){
        port.setPortGetter(portMethodName);
    }else{
        portMethodName = Names.getPortName(port);
        portMethodName = BindingHelper.mangleNameToClassName(portMethodName);
        port.setPortGetter("get"+portMethodName);
    }

}
 
Example #6
Source File: ServiceGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #7
Source File: ServiceGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #8
Source File: Names.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public static String getPortName(Port port) {
    String javaPortName =
        (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
    if (javaPortName != null) {
        return javaPortName;
    } else {
        QName portName =
            (QName) port.getProperty(
                ModelProperties.PROPERTY_WSDL_PORT_NAME);
        if (portName != null) {
            return portName.getLocalPart();
        } else {
            String name = stripQualifier(port.getJavaInterface().getName());
            return ClassNameInfo.replaceInnerClassSym(name);
        }
    }
}
 
Example #9
Source File: WSDLModelerBase.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 *
 * @param port
 * @param wsdlPort
 */
protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) {
    if (isProvider(wsdlPort)) {
        return;
    }
    JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class);

    String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null;
    if(portMethodName != null){
        port.setPortGetter(portMethodName);
    }else{
        portMethodName = Names.getPortName(port);
        portMethodName = BindingHelper.mangleNameToClassName(portMethodName);
        port.setPortGetter("get"+portMethodName);
    }

}
 
Example #10
Source File: ServiceGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #11
Source File: ServiceGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #12
Source File: ServiceGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #13
Source File: Names.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public static String getPortName(Port port) {
    String javaPortName =
        (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
    if (javaPortName != null) {
        return javaPortName;
    } else {
        QName portName =
            (QName) port.getProperty(
                ModelProperties.PROPERTY_WSDL_PORT_NAME);
        if (portName != null) {
            return portName.getLocalPart();
        } else {
            String name = stripQualifier(port.getJavaInterface().getName());
            return ClassNameInfo.replaceInnerClassSym(name);
        }
    }
}
 
Example #14
Source File: ServiceGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void writeGetPort(Port port, JType retType, JDefinedClass cls) {
    JMethod m = cls.method(JMod.PUBLIC, retType, port.getPortGetter());
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    JCommentPart paramDoc = methodDoc.addParam("features");
    paramDoc.append("A list of ");
    paramDoc.append("{@link " + WebServiceFeature.class.getName() + "}");
    paramDoc.append("to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.");
    ret.add("returns " + retType.name());
    m.varParam(WebServiceFeature.class, "features");
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class, features);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #15
Source File: ServiceGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #16
Source File: ServiceGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeDefaultGetPort(Port port, JType retType, JDefinedClass cls) {
    String portGetter = port.getPortGetter();
    JMethod m = cls.method(JMod.PUBLIC, retType, portGetter);
    JDocComment methodDoc = m.javadoc();
    if (port.getJavaDoc() != null) {
        methodDoc.add(port.getJavaDoc());
    }
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns " + retType.name());
    JBlock body = m.body();
    StringBuilder statement = new StringBuilder("return ");
    statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), ");
    statement.append(retType.name());
    statement.append(".class);");
    body.directStatement(statement.toString());
    writeWebEndpoint(port, m);
}
 
Example #17
Source File: Names.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static String getPortName(Port port) {
    String javaPortName =
        (String) port.getProperty(ModelProperties.PROPERTY_JAVA_PORT_NAME);
    if (javaPortName != null) {
        return javaPortName;
    } else {
        QName portName =
            (QName) port.getProperty(
                ModelProperties.PROPERTY_WSDL_PORT_NAME);
        if (portName != null) {
            return portName.getLocalPart();
        } else {
            String name = stripQualifier(port.getJavaInterface().getName());
            return ClassNameInfo.replaceInnerClassSym(name);
        }
    }
}
 
Example #18
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param port
 */
private void applyWrapperStyleCustomization(Port port, PortType portType) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
    Boolean wrapperStyle = (jaxwsBinding != null) ? jaxwsBinding.isEnableWrapperStyle() : null;
    if (wrapperStyle != null) {
        port.setWrapped(wrapperStyle);
    }
}
 
Example #19
Source File: AnnotationProcessorContext.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #20
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param port
 */
private void applyWrapperStyleCustomization(Port port, PortType portType) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
    Boolean wrapperStyle = (jaxwsBinding != null) ? jaxwsBinding.isEnableWrapperStyle() : null;
    if (wrapperStyle != null) {
        port.setWrapped(wrapperStyle);
    }
}
 
Example #21
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected String getJavaNameOfSEI(Port port) {
    QName portTypeName =
            (QName) port.getProperty(
                    ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
    PortType pt = (PortType) document.find(Kinds.PORT_TYPE, portTypeName);
    //populate the portType map here. We should get rid of all these properties
    // lets not do it as it may break NB
    //TODO: clean all these stuff part of NB RFE
    port.portTypes.put(portTypeName, pt);
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(pt, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }

    String interfaceName;
    if (portTypeName != null) {
        // got portType information from WSDL, use it to name the interface
        interfaceName =
                makePackageQualified(BindingHelper.mangleNameToClassName(portTypeName.getLocalPart()));
    } else {
        // somehow we only got the port name, so we use that
        interfaceName =
                makePackageQualified(BindingHelper.mangleNameToClassName(port.getName().getLocalPart()));
    }
    return interfaceName;
}
 
Example #22
Source File: AnnotationProcessorContext.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #23
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void createJavaInterfaceForPort(Port port, boolean isProvider) {
    if (isProvider) {
        createJavaInterfaceForProviderPort(port);
        return;
    }
    String interfaceName = getJavaNameOfSEI(port);

    if (isConflictingPortClassName(interfaceName)) {
        interfaceName += "_PortType";
    }

    JavaInterface intf = new JavaInterface(interfaceName);
    for (Operation operation : port.getOperations()) {
        createJavaMethodForOperation(
                port,
                operation,
                intf);

        for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) {
            Parameter param = jParam.getParameter();
            if (param.getCustomName() != null) {
                jParam.setName(param.getCustomName());
            }
        }
    }

    port.setJavaInterface(intf);
}
 
Example #24
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param port
 */
private void applyWrapperStyleCustomization(Port port, PortType portType) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
    Boolean wrapperStyle = (jaxwsBinding != null) ? jaxwsBinding.isEnableWrapperStyle() : null;
    if (wrapperStyle != null) {
        port.setWrapped(wrapperStyle);
    }
}
 
Example #25
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void createJavaInterfaceForPort(Port port, boolean isProvider) {
    if (isProvider) {
        createJavaInterfaceForProviderPort(port);
        return;
    }
    String interfaceName = getJavaNameOfSEI(port);

    if (isConflictingPortClassName(interfaceName)) {
        interfaceName += "_PortType";
    }

    JavaInterface intf = new JavaInterface(interfaceName);
    for (Operation operation : port.getOperations()) {
        createJavaMethodForOperation(
                port,
                operation,
                intf);

        for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) {
            Parameter param = jParam.getParameter();
            if (param.getCustomName() != null) {
                jParam.setName(param.getCustomName());
            }
        }
    }

    port.setJavaInterface(intf);
}
 
Example #26
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected String getJavaNameOfSEI(Port port) {
    QName portTypeName =
            (QName) port.getProperty(
                    ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
    PortType pt = (PortType) document.find(Kinds.PORT_TYPE, portTypeName);
    //populate the portType map here. We should get rid of all these properties
    // lets not do it as it may break NB
    //TODO: clean all these stuff part of NB RFE
    port.portTypes.put(portTypeName, pt);
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(pt, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }

    String interfaceName;
    if (portTypeName != null) {
        // got portType information from WSDL, use it to name the interface
        interfaceName =
                makePackageQualified(BindingHelper.mangleNameToClassName(portTypeName.getLocalPart()));
    } else {
        // somehow we only got the port name, so we use that
        interfaceName =
                makePackageQualified(BindingHelper.mangleNameToClassName(port.getName().getLocalPart()));
    }
    return interfaceName;
}
 
Example #27
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected void createJavaInterfaceForPort(Port port, boolean isProvider) {
    if (isProvider) {
        createJavaInterfaceForProviderPort(port);
        return;
    }
    String interfaceName = getJavaNameOfSEI(port);

    if (isConflictingPortClassName(interfaceName)) {
        interfaceName += "_PortType";
    }

    JavaInterface intf = new JavaInterface(interfaceName);
    for (Operation operation : port.getOperations()) {
        createJavaMethodForOperation(
                port,
                operation,
                intf);

        for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) {
            Parameter param = jParam.getParameter();
            if (param.getCustomName() != null) {
                jParam.setName(param.getCustomName());
            }
        }
    }

    port.setJavaInterface(intf);
}
 
Example #28
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @param port
 */
private void applyWrapperStyleCustomization(Port port, PortType portType) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
    Boolean wrapperStyle = (jaxwsBinding != null) ? jaxwsBinding.isEnableWrapperStyle() : null;
    if (wrapperStyle != null) {
        port.setWrapped(wrapperStyle);
    }
}
 
Example #29
Source File: AnnotationProcessorContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #30
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected void createJavaInterfaceForPort(Port port, boolean isProvider) {
    if (isProvider) {
        createJavaInterfaceForProviderPort(port);
        return;
    }
    String interfaceName = getJavaNameOfSEI(port);

    if (isConflictingPortClassName(interfaceName)) {
        interfaceName += "_PortType";
    }

    JavaInterface intf = new JavaInterface(interfaceName);
    for (Operation operation : port.getOperations()) {
        createJavaMethodForOperation(
                port,
                operation,
                intf);

        for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) {
            Parameter param = jParam.getParameter();
            if (param.getCustomName() != null) {
                jParam.setName(param.getCustomName());
            }
        }
    }

    port.setJavaInterface(intf);
}