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

The following examples show how to use com.sun.tools.internal.ws.processor.model.Service. 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: 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 #2
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #3
Source File: ServiceGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #4
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 #5
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #6
Source File: ServiceGenerator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #7
Source File: AnnotationProcessorContext.java    From openjdk-jdk9 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 #8
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #9
Source File: ServiceGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #10
Source File: ServiceGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #11
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #12
Source File: ServiceGenerator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #13
Source File: AnnotationProcessorContext.java    From openjdk-8-source 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 #14
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #15
Source File: ServiceGenerator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #16
Source File: AnnotationProcessorContext.java    From openjdk-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 #17
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #18
Source File: AnnotationProcessorContext.java    From openjdk-jdk8u 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 #19
Source File: ServiceGenerator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #20
Source File: AnnotationProcessorContext.java    From jdk8u60 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 #21
Source File: ServiceGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void writeWebServiceClientAnnotation(Service service, JAnnotationUse wsa) {
    String serviceName = service.getName().getLocalPart();
    String serviceNS = service.getName().getNamespaceURI();
    wsa.param("name", serviceName);
    wsa.param("targetNamespace", serviceNS);
    wsa.param("wsdlLocation", wsdlLocation);
}
 
Example #22
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 #23
Source File: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #24
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.internal.ws.wsdl.document.Service wsdlService) {
    String serviceName = wsdlService.getName();
    JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class);
    if (jaxwsCust != null && jaxwsCust.getClassName() != null) {
        CustomName name = jaxwsCust.getClassName();
        if (name != null && !name.getName().equals("")) {
            return makePackageQualified(name.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName));
}
 
Example #25
Source File: GeneratorBase.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visit(Model model) throws Exception {
    for (Service service : model.getServices()) {
        service.accept(this);
    }
}
 
Example #26
Source File: GeneratorBase.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visit(Model model) throws Exception {
    for (Service service : model.getServices()) {
        service.accept(this);
    }
}
 
Example #27
Source File: GeneratorBase.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visit(Model model) throws Exception {
    for (Service service : model.getServices()) {
        service.accept(this);
    }
}
 
Example #28
Source File: GeneratorBase.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visit(Service service) throws Exception {
    for (Port port : service.getPorts()) {
        port.accept(this);
    }
}
 
Example #29
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private Model internalBuildModel(WSDLDocument document) {
    numPasses++;

    //build the jaxbModel to be used latter
    buildJAXBModel(document);

    QName modelName =
            new QName(
                    document.getDefinitions().getTargetNamespaceURI(),
                    document.getDefinitions().getName() == null
                            ? "model"
                            : document.getDefinitions().getName());
    Model model = new Model(modelName, document.getDefinitions());
    model.setJAXBModel(getJAXBModelBuilder().getJAXBModel());

    // This fails with the changed classname (WSDLModeler to WSDLModeler11 etc.)
    // with this source comaptibility change the WSDL Modeler class name is changed. Right now hardcoding the
    // modeler class name to the same one being checked in WSDLGenerator.

    model.setProperty(
            ModelProperties.PROPERTY_MODELER_NAME,
            ModelProperties.WSDL_MODELER_NAME);

    _javaExceptions = new HashMap<String, JavaException>();
    _bindingNameToPortMap = new HashMap<QName, Port>();

    // grab target namespace
    model.setTargetNamespaceURI(document.getDefinitions().getTargetNamespaceURI());

    setDocumentationIfPresent(model,
            document.getDefinitions().getDocumentation());

    boolean hasServices = document.getDefinitions().services().hasNext();
    if (hasServices) {
        for (Iterator iter = document.getDefinitions().services();
             iter.hasNext();
                ) {
            processService((com.sun.tools.internal.ws.wsdl.document.Service) iter.next(),
                    model, document);
        }
    } else {
        // emit a warning if there are no service definitions
        warning(model.getEntity(), ModelerMessages.WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
    }

    return model;
}
 
Example #30
Source File: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private Model internalBuildModel(WSDLDocument document) {
    numPasses++;

    //build the jaxbModel to be used latter
    buildJAXBModel(document);

    QName modelName =
            new QName(
                    document.getDefinitions().getTargetNamespaceURI(),
                    document.getDefinitions().getName() == null
                            ? "model"
                            : document.getDefinitions().getName());
    Model model = new Model(modelName, document.getDefinitions());
    model.setJAXBModel(getJAXBModelBuilder().getJAXBModel());

    // This fails with the changed classname (WSDLModeler to WSDLModeler11 etc.)
    // with this source comaptibility change the WSDL Modeler class name is changed. Right now hardcoding the
    // modeler class name to the same one being checked in WSDLGenerator.

    model.setProperty(
            ModelProperties.PROPERTY_MODELER_NAME,
            ModelProperties.WSDL_MODELER_NAME);

    _javaExceptions = new HashMap<String, JavaException>();
    _bindingNameToPortMap = new HashMap<QName, Port>();

    // grab target namespace
    model.setTargetNamespaceURI(document.getDefinitions().getTargetNamespaceURI());

    setDocumentationIfPresent(model,
            document.getDefinitions().getDocumentation());

    boolean hasServices = document.getDefinitions().services().hasNext();
    if (hasServices) {
        for (Iterator iter = document.getDefinitions().services();
             iter.hasNext();
                ) {
            processService((com.sun.tools.internal.ws.wsdl.document.Service) iter.next(),
                    model, document);
        }
    } else {
        // emit a warning if there are no service definitions
        warning(model.getEntity(), ModelerMessages.WSDLMODELER_WARNING_NO_SERVICE_DEFINITIONS_FOUND());
    }

    return model;
}