gpt4 book ai didi

com.sun.xml.ws.util.xml.XmlUtil.newTransformerFactory()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 20:09:05 25 4
gpt4 key购买 nike

本文整理了Java中com.sun.xml.ws.util.xml.XmlUtil.newTransformerFactory()方法的一些代码示例,展示了XmlUtil.newTransformerFactory()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtil.newTransformerFactory()方法的具体详情如下:
包路径:com.sun.xml.ws.util.xml.XmlUtil
类名称:XmlUtil
方法名:newTransformerFactory

XmlUtil.newTransformerFactory介绍

暂无

代码示例

代码示例来源:origin: com.sun.xml.ws/rt

public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException {
  Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL));
  JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity));
  TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
  Transformer transformer = tf.newTemplates(xsl).newTransformer();
  transformer.transform(src, result);
  return getJavaWsdlMapping(result.getResult());
}

代码示例来源:origin: javaee/metro-jax-ws

public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException {
  Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL));
  JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity));
  TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
  Transformer transformer = tf.newTemplates(xsl).newTransformer();
  transformer.transform(src, result);
  return getJavaWsdlMapping(result.getResult());
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException {
  Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL));
  JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity));
  TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
  Transformer transformer = tf.newTemplates(xsl).newTransformer();
  transformer.transform(src, result);
  return getJavaWsdlMapping(result.getResult());
}

代码示例来源:origin: com.sun.xml.ws/rt

public void writeTo(SOAPMessage saaj) throws SOAPException {
  try {
    // TODO what about in-scope namespaces
    // Not very efficient consider implementing a stream buffer
    // processor that produces a DOM node from the buffer.
    TransformerFactory tf = XmlUtil.newTransformerFactory(true);
    Transformer t = tf.newTransformer();
    XMLStreamBufferSource source = new XMLStreamBufferSource(_mark);
    DOMResult result = new DOMResult();
    t.transform(source, result);
    Node d = result.getNode();
    if(d.getNodeType() == Node.DOCUMENT_NODE)
      d = d.getFirstChild();
    SOAPHeader header = saaj.getSOAPHeader();
    if(header == null)
      header = saaj.getSOAPPart().getEnvelope().addHeader();
    Node node = header.getOwnerDocument().importNode(d, true);
    header.appendChild(node);
  } catch (Exception e) {
    throw new SOAPException(e);
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
try {
  Transformer t = tf.newTransformer();

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

public void writeTo(SOAPMessage saaj) throws SOAPException {
  try {
    // TODO what about in-scope namespaces
    // Not very efficient consider implementing a stream buffer
    // processor that produces a DOM node from the buffer.
    TransformerFactory tf = XmlUtil.newTransformerFactory(true);
    Transformer t = tf.newTransformer();
    XMLStreamBufferSource source = new XMLStreamBufferSource(_mark);
    DOMResult result = new DOMResult();
    t.transform(source, result);
    Node d = result.getNode();
    if(d.getNodeType() == Node.DOCUMENT_NODE)
      d = d.getFirstChild();
    SOAPHeader header = saaj.getSOAPHeader();
    if(header == null)
      header = saaj.getSOAPPart().getEnvelope().addHeader();
    Node node = header.getOwnerDocument().importNode(d, true);
    header.appendChild(node);
  } catch (Exception e) {
    throw new SOAPException(e);
  }
}

代码示例来源:origin: javaee/metro-jax-ws

public void writeTo(SOAPMessage saaj) throws SOAPException {
  try {
    // TODO what about in-scope namespaces
    // Not very efficient consider implementing a stream buffer
    // processor that produces a DOM node from the buffer.
    TransformerFactory tf = XmlUtil.newTransformerFactory(true);
    Transformer t = tf.newTransformer();
    XMLStreamBufferSource source = new XMLStreamBufferSource(_mark);
    DOMResult result = new DOMResult();
    t.transform(source, result);
    Node d = result.getNode();
    if(d.getNodeType() == Node.DOCUMENT_NODE)
      d = d.getFirstChild();
    SOAPHeader header = saaj.getSOAPHeader();
    if(header == null)
      header = saaj.getSOAPPart().getEnvelope().addHeader();
    Node node = header.getOwnerDocument().importNode(d, true);
    header.appendChild(node);
  } catch (Exception e) {
    throw new SOAPException(e);
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
try {
  Transformer t = tf.newTransformer();

代码示例来源:origin: javaee/metro-jax-ws

TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
try {
  Transformer t = tf.newTransformer();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com