com.sun.tools.internal.ws.processor.model.java.JavaSimpleType Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.model.java.JavaSimpleType. 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: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #2
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #3
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #4
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #5
Source File: ModelerUtils.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #6
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #7
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #8
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @param prop
 * @param jaxbType
 * @param block
 * @return unwrapped parameter
 */
private static Parameter createUnwrappedParameter(JAXBProperty prop,
        JAXBType jaxbType, Block block, JAXBStructuredType type,
        JavaStructureType jst) {
    QName elementName = prop.getElementName();
    JavaType javaType = new JavaSimpleType(prop.getType());
    JAXBElementMember eType = new JAXBElementMember(elementName, jaxbType);
    JavaStructureMember jsm = new JavaStructureMember(elementName
            .getLocalPart(), javaType, eType);
    eType.setJavaStructureMember(jsm);
    jst.add(jsm);
    eType.setProperty(prop);
    type.add(eType);
    JAXBType t = new JAXBType(elementName, javaType, jaxbType
            .getJaxbMapping(), jaxbType.getJaxbModel());
    t.setUnwrapped(true);
    Parameter parameter = createParameter(elementName.getLocalPart(), t, block);
    parameter.setEmbedded(true);
    return parameter;
}
 
Example #9
Source File: AsyncOperation.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #10
Source File: AsyncOperation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}
 
Example #11
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 #12
Source File: JAXBModelBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public JAXBType  getJAXBType(QName qname){
    JAXBMapping mapping = jaxbModel.get(qname);
    if (mapping == null){
        return null;
    }
    JavaType javaType = new JavaSimpleType(mapping.getType());
    return new JAXBType(qname, javaType, mapping, jaxbModel);
}
 
Example #13
Source File: AsyncOperation.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #14
Source File: AsyncOperation.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}
 
Example #15
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 #16
Source File: JAXBModelBuilder.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public JAXBType  getJAXBType(QName qname){
    JAXBMapping mapping = jaxbModel.get(qname);
    if (mapping == null){
        return null;
    }
    JavaType javaType = new JavaSimpleType(mapping.getType());
    return new JAXBType(qname, javaType, mapping, jaxbModel);
}
 
Example #17
Source File: AsyncOperation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #18
Source File: AsyncOperation.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}
 
Example #19
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 #20
Source File: JAXBModelBuilder.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public JAXBType  getJAXBType(QName qname){
    JAXBMapping mapping = jaxbModel.get(qname);
    if (mapping == null){
        return null;
    }
    JavaType javaType = new JavaSimpleType(mapping.getType());
    return new JAXBType(qname, javaType, mapping, jaxbModel);
}
 
Example #21
Source File: AsyncOperation.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #22
Source File: AsyncOperation.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}
 
Example #23
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;
}
 
Example #24
Source File: JAXBModelBuilder.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public JAXBType  getJAXBType(QName qname){
    JAXBMapping mapping = jaxbModel.get(qname);
    if (mapping == null){
        return null;
    }
    JavaType javaType = new JavaSimpleType(mapping.getType());
    return new JAXBType(qname, javaType, mapping, jaxbModel);
}
 
Example #25
Source File: AsyncOperation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #26
Source File: AsyncOperation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}
 
Example #27
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 #28
Source File: JAXBModelBuilder.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public JAXBType  getJAXBType(QName qname){
    JAXBMapping mapping = jaxbModel.get(qname);
    if (mapping == null){
        return null;
    }
    JavaType javaType = new JavaSimpleType(mapping.getType());
    return new JAXBType(qname, javaType, mapping, jaxbModel);
}
 
Example #29
Source File: AsyncOperation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getResponseBeanJavaType(){
    JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JClass future = cm.ref(java.util.concurrent.Future.class).narrow(cm.ref(Object.class).wildcard());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(future));
    }else if(_asyncOpType.equals(AsyncOperationType.POLLING)){
        JClass polling = cm.ref(javax.xml.ws.Response.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(polling));
    }
    return null;
}
 
Example #30
Source File: AsyncOperation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public JavaType getCallBackType(){
    if(_asyncOpType.equals(AsyncOperationType.CALLBACK)){
        JCodeModel cm = _responseBean.getJavaType().getType().getType().owner();
        JClass cb = cm.ref(javax.xml.ws.AsyncHandler.class).narrow(_responseBean.getJavaType().getType().getType().boxify());
        return new JavaSimpleType(new JAXBTypeAndAnnotation(cb));

    }
    return null;
}