com.sun.tools.internal.xjc.api.S2JJAXBModel Java Examples
The following examples show how to use
com.sun.tools.internal.xjc.api.S2JJAXBModel.
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 |
/** * @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 openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * @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-8 with GNU General Public License v2.0 | 6 votes |
/** * @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 |
/** * @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 jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * @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 openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * @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 hottub with GNU General Public License v2.0 | 6 votes |
/** * @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-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * @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: JAXBModel.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #10
Source File: JAXBModel.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #11
Source File: ModelerUtils.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
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 |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #13
Source File: JAXBModel.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #14
Source File: ModelerUtils.java From hottub with GNU General Public License v2.0 | 5 votes |
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: JAXBModelBuilder.java From hottub with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #16
Source File: JAXBModel.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #17
Source File: ModelerUtils.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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: JAXBModelBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #19
Source File: JAXBModel.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #20
Source File: ModelerUtils.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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 #21
Source File: JAXBModelBuilder.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #22
Source File: JAXBModelBuilder.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #23
Source File: ModelerUtils.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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: JAXBModel.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #25
Source File: ModelerUtils.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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: JAXBModelBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #27
Source File: ModelerUtils.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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: JAXBModel.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Constructor that fills in the values from the given raw model */ public JAXBModel( com.sun.tools.internal.xjc.api.JAXBModel rawModel ) { this.rawJAXBModel = rawModel; if(rawModel instanceof S2JJAXBModel){ S2JJAXBModel model = (S2JJAXBModel)rawModel; List<JAXBMapping> ms = new ArrayList<JAXBMapping>(model.getMappings().size()); for( Mapping m : model.getMappings()) ms.add(new JAXBMapping(m)); setMappings(ms); } }
Example #29
Source File: JAXBModelBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }
Example #30
Source File: JAXBModelBuilder.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected void bind(){ S2JJAXBModel rawJaxbModel = schemaCompiler.bind(); if(rawJaxbModel == null) throw new AbortException(); options.setCodeModel(rawJaxbModel.generateCode(null, errReceiver)); jaxbModel = new JAXBModel(rawJaxbModel); jaxbModel.setGeneratedClassNames(_classNameAllocator.getJaxbGeneratedClasses()); }