com.sun.xml.internal.ws.spi.db.BindingHelper Java Examples

The following examples show how to use com.sun.xml.internal.ws.spi.db.BindingHelper. 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: WSDLModelerBase.java    From openjdk-jdk8u-backup 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 #2
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 #3
Source File: WSDLModelerBase.java    From hottub 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 #4
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 #5
Source File: WebServiceWrapperGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #6
Source File: WSDLModelerBase.java    From openjdk-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 #7
Source File: WebServiceWrapperGenerator.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #8
Source File: WebServiceWrapperGenerator.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #9
Source File: WebServiceWrapperGenerator.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #10
Source File: WSDLModelerBase.java    From jdk8u60 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 #11
Source File: WebServiceWrapperGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #12
Source File: WebServiceWrapperGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #13
Source File: WSDLModelerBase.java    From openjdk-jdk9 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 #14
Source File: WSDLModelerBase.java    From openjdk-jdk8u 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 #15
Source File: WebServiceWrapperGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #16
Source File: WebServiceWrapperGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void writeMember(JDefinedClass cls, TypeMirror paramType,
                         String paramName) {

    if (cls == null)
        return;

    String accessorName =BindingHelper.mangleNameToPropertyName(paramName);
    String getterPrefix = paramType.toString().equals("boolean")? "is" : "get";
    JType propType = getType(paramType);
    JMethod m = cls.method(JMod.PUBLIC, propType, getterPrefix+ accessorName);
    JDocComment methodDoc = m.javadoc();
    JCommentPart ret = methodDoc.addReturn();
    ret.add("returns "+propType.name());
    JBlock body = m.body();
    body._return( JExpr._this().ref(paramName) );

    m = cls.method(JMod.PUBLIC, cm.VOID, "set"+accessorName);
    JVar param = m.param(propType, paramName);
    methodDoc = m.javadoc();
    JCommentPart part = methodDoc.addParam(paramName);
    part.add("the value for the "+ paramName+" property");
    body = m.body();
    body.assign( JExpr._this().ref(paramName), param );
}
 
Example #17
Source File: AbstractWrapperBeanGenerator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the property name by mangling using JAX-WS rules
 * @param name to be mangled
 * @return property name
 */
private static String getPropertyName(String name) {
    String propertyName = BindingHelper.mangleNameToVariableName(name);
    //We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
    //care of mangling java identifiers
    return getJavaReservedVarialbeName(propertyName);
}
 
Example #18
Source File: WSDLModeler.java    From hottub 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 #19
Source File: AbstractWrapperBeanGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the property name by mangling using JAX-WS rules
 * @param name to be mangled
 * @return property name
 */
private static String getPropertyName(String name) {
    String propertyName = BindingHelper.mangleNameToVariableName(name);
    //We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
    //care of mangling java identifiers
    return getJavaReservedVarialbeName(propertyName);
}
 
Example #20
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private String getFaultClassName(com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeFault, JAXWSBinding.class);
    if (jaxwsBinding != null) {
        CustomName className = jaxwsBinding.getClassName();
        if (className != null) {
            return makePackageQualified(className.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(portTypeFault.getMessage().getLocalPart()));
}
 
Example #21
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 #22
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 #23
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 #24
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 #25
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private String getFaultClassName(com.sun.tools.internal.ws.wsdl.document.Fault portTypeFault) {
    JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeFault, JAXWSBinding.class);
    if (jaxwsBinding != null) {
        CustomName className = jaxwsBinding.getClassName();
        if (className != null) {
            return makePackageQualified(className.getName());
        }
    }
    return makePackageQualified(BindingHelper.mangleNameToClassName(portTypeFault.getMessage().getLocalPart()));
}
 
Example #26
Source File: WSDLModeler.java    From openjdk-8 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: Operation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public String getJavaMethodName(){
    //if JavaMethod is created return the name
    if(_javaMethod != null){
        return _javaMethod.getName();
    }

    //return the customized operation name if any without mangling
    if(customizedName != null){
        return customizedName;
    }

    return BindingHelper.mangleNameToVariableName(_name.getLocalPart());
}
 
Example #28
Source File: AbstractWrapperBeanGenerator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the property name by mangling using JAX-WS rules
 * @param name to be mangled
 * @return property name
 */
private static String getPropertyName(String name) {
    String propertyName = BindingHelper.mangleNameToVariableName(name);
    //We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
    //care of mangling java identifiers
    return getJavaReservedVarialbeName(propertyName);
}
 
Example #29
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 #30
Source File: AbstractWrapperBeanGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Gets the property name by mangling using JAX-WS rules
 * @param name to be mangled
 * @return property name
 */
private static String getPropertyName(String name) {
    String propertyName = BindingHelper.mangleNameToVariableName(name);
    //We wont have to do this if JAXBRIContext.mangleNameToVariableName() takes
    //care of mangling java identifiers
    return getJavaReservedVarialbeName(propertyName);
}