com.sun.xml.internal.txw2.output.XmlSerializer Java Examples
The following examples show how to use
com.sun.xml.internal.txw2.output.XmlSerializer.
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: WSDLGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #2
Source File: TXW.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #3
Source File: WSDLGenerator.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #4
Source File: WSDLGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #5
Source File: TXW.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #6
Source File: TXW.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #7
Source File: WSDLGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #8
Source File: WSDLGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #9
Source File: TXW.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #10
Source File: WSDLGenerator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #11
Source File: TXW.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #12
Source File: TXW.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #13
Source File: WSDLGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #14
Source File: WSDLGenerator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Performes the actual WSDL generation */ public void doGeneration() { XmlSerializer serviceWriter; XmlSerializer portWriter = null; String fileName = mangleName(model.getServiceQName().getLocalPart()); Result result = wsdlResolver.getWSDL(fileName + DOT_WSDL); wsdlLocation = result.getSystemId(); serviceWriter = new CommentFilter(ResultFactory.createSerializer(result)); if (model.getServiceQName().getNamespaceURI().equals(model.getTargetNamespace())) { portWriter = serviceWriter; schemaPrefix = fileName + "_"; } else { String wsdlName = mangleName(model.getPortTypeName().getLocalPart()); if (wsdlName.equals(fileName)) wsdlName += "PortType"; Holder<String> absWSDLName = new Holder<String>(); absWSDLName.value = wsdlName + DOT_WSDL; result = wsdlResolver.getAbstractWSDL(absWSDLName); if (result != null) { portWSDLID = result.getSystemId(); if (portWSDLID.equals(wsdlLocation)) { portWriter = serviceWriter; } else { portWriter = new CommentFilter(ResultFactory.createSerializer(result)); } } else { portWSDLID = absWSDLName.value; } schemaPrefix = new java.io.File(portWSDLID).getName(); int idx = schemaPrefix.lastIndexOf('.'); if (idx > 0) schemaPrefix = schemaPrefix.substring(0, idx); schemaPrefix = mangleName(schemaPrefix) + "_"; } generateDocument(serviceWriter, portWriter); }
Example #15
Source File: TXW.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #16
Source File: TXW.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a new {@link TypedXmlWriter} to write a new instance of a document. * * @param rootElement * The {@link TypedXmlWriter} interface that declares the content model of the root element. * This interface must have {@link XmlElement} annotation on it to designate the tag name * of the root element. * @param out * The target of the writing. */ public static <T extends TypedXmlWriter> T create( Class<T> rootElement, XmlSerializer out ) { if (out instanceof TXWSerializer) { TXWSerializer txws = (TXWSerializer) out; return txws.txw._element(rootElement); } Document doc = new Document(out); QName n = getTagName(rootElement); return new ContainerElement(doc,null,n.getNamespaceURI(),n.getLocalPart())._cast(rootElement); }
Example #17
Source File: Document.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #18
Source File: WSDLGenerator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #19
Source File: WSDLGenerator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #20
Source File: Document.java From hottub with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #21
Source File: Document.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #22
Source File: WSDLGenerator.java From hottub with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #23
Source File: WSDLGenerator.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #24
Source File: Document.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #25
Source File: WSDLGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #26
Source File: Document.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #27
Source File: Document.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }
Example #28
Source File: WSDLGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #29
Source File: WSDLGenerator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
CommentFilter(XmlSerializer serializer) { this.serializer = serializer; }
Example #30
Source File: Document.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
Document(XmlSerializer out) { this.out = out; for( DatatypeWriter dw : DatatypeWriter.BUILTIN ) datatypeWriters.put(dw.getType(),dw); }