Search in sources :

Example 1 with JAXWSBinding

use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.

the class WSDLModelerBase method isProvider.

protected boolean isProvider(com.sun.tools.ws.wsdl.document.Port wsdlPort) {
    JAXWSBinding portCustomization = (JAXWSBinding) getExtensionOfType(wsdlPort, JAXWSBinding.class);
    Boolean isProvider = (portCustomization != null) ? portCustomization.isProvider() : null;
    if (isProvider != null) {
        return isProvider;
    }
    JAXWSBinding jaxwsGlobalCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
    isProvider = (jaxwsGlobalCustomization != null) ? jaxwsGlobalCustomization.isProvider() : null;
    if (isProvider != null) {
        return isProvider;
    }
    return false;
}
Also used : JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Example 2 with JAXWSBinding

use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.

the class WSDLModeler method enableMimeContent.

private boolean enableMimeContent() {
    // first we look at binding operation
    JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.bindingOperation, JAXWSBinding.class);
    Boolean mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
    if (mimeContentMapping != null) {
        return mimeContentMapping;
    }
    // then in wsdl:binding
    Binding binding = info.port.resolveBinding(info.document);
    jaxwsCustomization = (JAXWSBinding) getExtensionOfType(binding, JAXWSBinding.class);
    mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
    if (mimeContentMapping != null) {
        return mimeContentMapping;
    }
    // at last look in wsdl:definitions
    jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.document.getDefinitions(), JAXWSBinding.class);
    mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null;
    if (mimeContentMapping != null) {
        return mimeContentMapping;
    }
    return false;
}
Also used : JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding) JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Example 3 with JAXWSBinding

use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.

the class WSDLModeler method getServiceInterfaceName.

protected String getServiceInterfaceName(QName serviceQName, com.sun.tools.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));
}
Also used : CustomName(com.sun.tools.ws.wsdl.document.jaxws.CustomName) JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Example 4 with JAXWSBinding

use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.

the class WSDLModeler method applyWrapperStyleCustomization.

/**
 */
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);
    }
}
Also used : JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Example 5 with JAXWSBinding

use of com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding in project metro-jax-ws by eclipse-ee4j.

the class WSDLModeler method getWrapperStyleCustomization.

private boolean getWrapperStyleCustomization() {
    // first we look into wsdl:portType/wsdl:operation
    com.sun.tools.ws.wsdl.document.Operation portTypeOperation = info.portTypeOperation;
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeOperation, JAXWSBinding.class);
    if (jaxwsBinding != null) {
        Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
        if (isWrappable != null) {
            return isWrappable;
        }
    }
    // then into wsdl:portType
    PortType portType = info.port.resolveBinding(document).resolvePortType(document);
    jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class);
    if (jaxwsBinding != null) {
        Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
        if (isWrappable != null) {
            return isWrappable;
        }
    }
    // then wsdl:definitions
    jaxwsBinding = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class);
    if (jaxwsBinding != null) {
        Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle();
        if (isWrappable != null) {
            return isWrappable;
        }
    }
    return true;
}
Also used : com.sun.tools.ws.wsdl.document(com.sun.tools.ws.wsdl.document) JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Aggregations

JAXWSBinding (com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)21 Iterator (java.util.Iterator)8 Element (org.w3c.dom.Element)8 CustomName (com.sun.tools.ws.wsdl.document.jaxws.CustomName)3 QName (javax.xml.namespace.QName)2 com.sun.tools.ws.wsdl.document (com.sun.tools.ws.wsdl.document)1