Search in sources :

Example 1 with CustomName

use of com.sun.tools.ws.wsdl.document.jaxws.CustomName 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 2 with CustomName

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

the class JAXWSBindingExtensionHandler method parseMethod.

/**
 */
private void parseMethod(com.sun.tools.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) {
    String methodName = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
    String javaDoc = getJavaDoc(e);
    CustomName name = new CustomName(methodName, javaDoc);
    jaxwsBinding.setMethodName(name);
}
Also used : CustomName(com.sun.tools.ws.wsdl.document.jaxws.CustomName)

Example 3 with CustomName

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

the class JAXWSBindingExtensionHandler method parsePackage.

/**
 */
private void parsePackage(com.sun.tools.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) {
    // System.out.println("In handlePackageExtension: " + e.getNodeName());
    String packageName = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
    JAXWSBinding binding = parent;
    binding.setJaxwsPackage(new CustomName(packageName, getJavaDoc(e)));
}
Also used : CustomName(com.sun.tools.ws.wsdl.document.jaxws.CustomName) JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Example 4 with CustomName

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

the class JAXWSBindingExtensionHandler method parseClass.

/**
 */
private void parseClass(com.sun.tools.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) {
    String className = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR);
    String javaDoc = getJavaDoc(e);
    jaxwsBinding.setClassName(new CustomName(className, javaDoc));
}
Also used : CustomName(com.sun.tools.ws.wsdl.document.jaxws.CustomName)

Example 5 with CustomName

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

the class WSDLModeler method getJavaNameOfSEI.

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;
}
Also used : CustomName(com.sun.tools.ws.wsdl.document.jaxws.CustomName) QName(javax.xml.namespace.QName) JAXWSBinding(com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)

Aggregations

CustomName (com.sun.tools.ws.wsdl.document.jaxws.CustomName)5 JAXWSBinding (com.sun.tools.ws.wsdl.document.jaxws.JAXWSBinding)3 QName (javax.xml.namespace.QName)1