com.sun.tools.internal.ws.processor.model.Block Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.model.Block. 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-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #2
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 #3
Source File: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #4
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #5
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 #6
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 #7
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #8
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #9
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 #10
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 #11
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 #12
Source File: ModelerUtils.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #13
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #14
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 #15
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 #16
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * This method uses JAXBStructured type (wrapper style operations) and
 * unwraps it to create list of parameters.
 *
 *
 * @param jaxbType instance of JAXBType, could be JAXBStructured type.
 * @param block The Block (body/Header/Attachment) to which the created Parameter belong.
 * @return list of Parameters
 */
public static List<Parameter> createUnwrappedParameters(JAXBType jaxbType,
        Block block) {
    List<Parameter> paramList = new ArrayList<Parameter>();
    JAXBStructuredType type = null;
    if (!(jaxbType instanceof JAXBStructuredType))
        type = createJAXBStructureType(jaxbType);
    else
        type = (JAXBStructuredType) jaxbType;

    JavaStructureType jst = new JavaStructureType(jaxbType.getJavaType()
            .getRealName(), true, type);
    type.setJavaType(jst);
    block.setType(type);
    List memberList = jaxbType.getWrapperChildren();
    Iterator props = memberList.iterator();
    while (props.hasNext()) {
        JAXBProperty prop = (JAXBProperty) props.next();
        paramList.add(createUnwrappedParameter(prop, jaxbType, block, type,
                jst));
    }

    return paramList;
}
 
Example #17
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 #18
Source File: ModelerUtils.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #19
Source File: ModelerUtils.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #20
Source File: ModelerUtils.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #21
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 #22
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 #23
Source File: ModelerUtils.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #24
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 #25
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 #26
Source File: ModelerUtils.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #27
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 #28
Source File: ModelerUtils.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #29
Source File: ModelerUtils.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Called for non-wrapper style operations. It returns a Parameter constructed
 * using the JAXBType and the Block.
 *
 * @param partName typically wsdl:part or any name to be given to the parameter
 * @param jaxbType type of Parameter
 * @param block Block to which the parameter belongs to
 * @return Parameter created.
 */
public static Parameter createParameter(String partName, AbstractType jaxbType,
        Block block) {
    Parameter parameter = new Parameter(partName, block.getEntity());
    parameter.setProperty(ModelProperties.PROPERTY_PARAM_MESSAGE_PART_NAME,
            partName);
    parameter.setEmbedded(false);
    parameter.setType(jaxbType);
    parameter.setTypeName(jaxbType.getJavaType().getType().getName());
    parameter.setBlock(block);
    return parameter;
}
 
Example #30
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;
}