Java Code Examples for com.sun.tools.internal.xjc.api.S2JJAXBModel#getJavaType()

The following examples show how to use com.sun.tools.internal.xjc.api.S2JJAXBModel#getJavaType() . 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: WSDLModeler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 2
Source File: WSDLModeler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 3
Source File: WSDLModeler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 4
Source File: WSDLModeler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 5
Source File: WSDLModeler.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 6
Source File: WSDLModeler.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 7
Source File: WSDLModeler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 8
Source File: WSDLModeler.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param part
 * @return Returns a JAXBType object
 */
private JAXBType getJAXBType(MessagePart part) {
    JAXBType type;
    QName name = part.getDescriptor();
    if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) {
        type = getJAXBModelBuilder().getJAXBType(name);
        if(type == null){
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
    } else {
        S2JJAXBModel jaxbModel = getJAXBModelBuilder().getJAXBModel().getS2JJAXBModel();
        TypeAndAnnotation typeAnno = jaxbModel.getJavaType(name);
        if (typeAnno == null) {
            error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName()));
        }
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAnno));
        type = new JAXBType(new QName("", part.getName()), javaType);
    }
    return type;
}
 
Example 9
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 10
Source File: ModelerUtils.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 11
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 12
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 13
Source File: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 14
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 15
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}
 
Example 16
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static List<Parameter> createRpcLitParameters(Message message, Block block, S2JJAXBModel jaxbModel, ErrorReceiverFilter errReceiver){
    RpcLitStructure rpcStruct = (RpcLitStructure)block.getType();

    List<Parameter> parameters = new ArrayList<Parameter>();
    for(MessagePart part : message.getParts()){
        if(!ModelerUtils.isBoundToSOAPBody(part))
            continue;
        QName name = part.getDescriptor();
        TypeAndAnnotation typeAndAnn = jaxbModel.getJavaType(name);
        if(typeAndAnn == null){
            String msgQName = "{"+message.getDefining().getTargetNamespaceURI()+"}"+message.getName();
            errReceiver.error(part.getLocator(), ModelerMessages.WSDLMODELER_RPCLIT_UNKOWNSCHEMATYPE(name.toString(),
                    part.getName(), msgQName));
            throw new AbortException();
        }
        String type = typeAndAnn.getTypeClass().fullName();
        type = ClassNameInfo.getGenericClass(type);
        RpcLitMember param = new RpcLitMember(new QName("", part.getName()), type);
        JavaType javaType = new JavaSimpleType(new JAXBTypeAndAnnotation(typeAndAnn));
        param.setJavaType(javaType);
        rpcStruct.addRpcLitMember(param);
        Parameter parameter = ModelerUtils.createParameter(part.getName(), param, block);
        parameter.setEmbedded(true);
        parameters.add(parameter);
    }
    return parameters;
}